Makefiles: New tools for generate dependency info for Makefiles.

Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
diff --git a/xmlsort.xsl b/xmlsort.xsl
new file mode 100644
index 0000000..6974f45
--- /dev/null
+++ b/xmlsort.xsl
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+  <xsl:output method="xml" indent="yes"/>
+  <xsl:strip-space elements="*"/>
+
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="*">
+    <xsl:copy>
+      <!-- Sort the attributes by name. -->
+      <xsl:for-each select="@*">
+        <xsl:sort select="name( . )"/>
+        <xsl:copy/>
+      </xsl:for-each>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="text()|comment()|processing-instruction()">
+    <xsl:copy/>
+  </xsl:template>
+
+</xsl:stylesheet>