aboutsummaryrefslogtreecommitdiffstats
path: root/lib/lufa/LUFA/StudioIntegration/XDK/lufa_filelist_transform.xslt
diff options
context:
space:
mode:
authorCallum Oakley <callum@pusher.com>2017-08-19 10:34:45 +0100
committerCallum Oakley <callum@pusher.com>2017-08-19 10:34:45 +0100
commita6845036e25c4f4d936dcd12cd0ddedd2894b30e (patch)
treeb23b4e8d9d757aa3c0d42be561572533ae0d126c /lib/lufa/LUFA/StudioIntegration/XDK/lufa_filelist_transform.xslt
parent84a8aabe5bf8807595f98de44d18f6a31b892edf (diff)
parent7277f09bbadcce120f819132dec8ff7172caacc4 (diff)
downloadfirmware-a6845036e25c4f4d936dcd12cd0ddedd2894b30e.tar.gz
firmware-a6845036e25c4f4d936dcd12cd0ddedd2894b30e.tar.bz2
firmware-a6845036e25c4f4d936dcd12cd0ddedd2894b30e.zip
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Diffstat (limited to 'lib/lufa/LUFA/StudioIntegration/XDK/lufa_filelist_transform.xslt')
-rw-r--r--lib/lufa/LUFA/StudioIntegration/XDK/lufa_filelist_transform.xslt35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/lufa/LUFA/StudioIntegration/XDK/lufa_filelist_transform.xslt b/lib/lufa/LUFA/StudioIntegration/XDK/lufa_filelist_transform.xslt
new file mode 100644
index 000000000..2998b879f
--- /dev/null
+++ b/lib/lufa/LUFA/StudioIntegration/XDK/lufa_filelist_transform.xslt
@@ -0,0 +1,35 @@
+<!--
+ LUFA Library
+ Copyright (C) Dean Camera, 2017.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+-->
+
+<!-- Atmel Studio framework Module XML transform file -->
+
+<!-- Outputs a flat file list of all source files referenced in all modules of
+ the input manifest XML file, so that they can be checked for existence. -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="xml" omit-xml-declaration="yes"/>
+
+ <!-- Read manifest list, add a comment to indicate the source filename
+ and then process all ASF nodes in the referenced document -->
+ <xsl:template match="lufa-manifest">
+ <xsl:for-each select="xml-source">
+ <xsl:comment>Sourced from <xsl:value-of select="@filename"/></xsl:comment>
+ <xsl:apply-templates select="document(@filename)/lufa/asf/*"/>
+ </xsl:for-each>
+ </xsl:template>
+
+ <!-- Recursively match and process all nodes/attributes -->
+ <xsl:template match="@*|node()">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:template>
+
+ <!-- Match source file nodes, output filename -->
+ <xsl:template match="build[@type='c-source']|build[@type='header-file']|build[@type='distribute']">
+ <xsl:value-of select="@value"/>
+ <xsl:text>&#xA;</xsl:text>
+ </xsl:template>
+</xsl:stylesheet>