diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/openbios/config/xml/fcode.xsl | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/openbios/config/xml/fcode.xsl')
-rw-r--r-- | roms/openbios/config/xml/fcode.xsl | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/roms/openbios/config/xml/fcode.xsl b/roms/openbios/config/xml/fcode.xsl new file mode 100644 index 000000000..ccc7e6e84 --- /dev/null +++ b/roms/openbios/config/xml/fcode.xsl @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="ISO-8859-15" ?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/" mode="fcode"> + + <xsl:text> # # fcode rules # </xsl:text> + + <!-- Create linker targets for FCode roms --> + <xsl:for-each select="//fcode"> + <xsl:variable name="outer-conditions"> + <xsl:text>0</xsl:text> + <xsl:for-each select="(ancestor-or-self::*)[@condition!='']"> + <xsl:call-template name="resolve-condition"> + <xsl:with-param select="@condition" name="expression"/> + </xsl:call-template> + </xsl:for-each> + </xsl:variable> + + <xsl:if test="$outer-conditions = 0"> + <xsl:if test="(ancestor-or-self::*)"> + + <xsl:variable name="path"> + <xsl:for-each select="ancestor::build"> + <xsl:call-template name="get-dirname"> + <xsl:with-param select="@base" name="path"/> + </xsl:call-template> + </xsl:for-each> + </xsl:variable> + + <!-- Fcode name --> + <xsl:text>$(ODIR)/</xsl:text> + <xsl:value-of select="@name"/> + <xsl:text>:</xsl:text> + + <xsl:text> $(SRCDIR)/</xsl:text> + <xsl:value-of select="$path"/> + <xsl:value-of select="@source"/> + + <!-- FIXME this requires strict spaces in rules.xml --> + <xsl:value-of select="document('rules.xml',.)//rule[@target='host'][@entity='fcode']"/> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:if> + </xsl:for-each> + + </xsl:template> +</xsl:stylesheet> |