mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
fixes for xslt sheets from Mike Hommey <mh@glandium.org>,
reported by Alex Owen <r.alex.owen@gmail.com> git-svn-id: svn://coreboot.org/openbios/openbios-devel@118 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -10,14 +10,14 @@
|
||||
<xsl:for-each select="//dictionary">
|
||||
<xsl:sort select="@name"/>
|
||||
|
||||
<xsl:param name="conditions">
|
||||
<xsl:variable name="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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$conditions = 0">
|
||||
|
||||
@@ -31,26 +31,26 @@
|
||||
<!-- Add all forth source files to their dictionaries -->
|
||||
<xsl:for-each select="//dictionary/object">
|
||||
|
||||
<xsl:param name="path">
|
||||
<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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:param name="conditions">
|
||||
<xsl:variable name="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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:param name="dictname">
|
||||
<xsl:variable name="dictname">
|
||||
<xsl:value-of select="parent::*/@name"/>
|
||||
</xsl:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$conditions=0">
|
||||
<xsl:value-of select="$dictname"/><xsl:text>-DICTIONARY:=$(</xsl:text>
|
||||
@@ -68,22 +68,22 @@
|
||||
<xsl:for-each select="//dictionary">
|
||||
<xsl:sort select="@name"/>
|
||||
|
||||
<xsl:param name="outer-conditions">
|
||||
<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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$outer-conditions = 0">
|
||||
|
||||
<xsl:if test="not(preceding::dictionary/@name = @name)">
|
||||
<xsl:param name="name"><xsl:value-of select="@name"/></xsl:param>
|
||||
<xsl:param name="init">
|
||||
<xsl:variable name="name"><xsl:value-of select="@name"/></xsl:variable>
|
||||
<xsl:variable name="init">
|
||||
<xsl:value-of select="(//dictionary[@name=$name]/attribute::init)[last()]"/>
|
||||
</xsl:param>
|
||||
</xsl:variable>
|
||||
<!-- dictionary name and dependencies -->
|
||||
<xsl:text>$(ODIR)/</xsl:text>
|
||||
<xsl:value-of select="@name"/><xsl:text>.dict: $(</xsl:text>
|
||||
@@ -97,22 +97,22 @@
|
||||
<xsl:text>	$(ODIR)/forthstrap</xsl:text>
|
||||
<xsl:for-each select="//dictionary[@name = @name]">
|
||||
|
||||
<xsl:param name="conditions">
|
||||
<xsl:variable name="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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:param name="path">
|
||||
<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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$conditions = 0">
|
||||
<xsl:text> -I</xsl:text>
|
||||
@@ -139,14 +139,14 @@
|
||||
<xsl:for-each select="//dictionary">
|
||||
<xsl:sort select="@name"/>
|
||||
|
||||
<xsl:param name="conditions">
|
||||
<xsl:variable name="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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$conditions = 0">
|
||||
|
||||
|
||||
@@ -24,22 +24,22 @@
|
||||
<!-- create rules for all compile objects -->
|
||||
<xsl:for-each select="//object[(ancestor-or-self::*)[@target = $target]]">
|
||||
|
||||
<xsl:param name="path">
|
||||
<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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:param name="conditions">
|
||||
<xsl:variable name="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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$conditions=0">
|
||||
|
||||
@@ -78,14 +78,14 @@
|
||||
<!-- Create linker targets for all executables -->
|
||||
<xsl:for-each select="//executable">
|
||||
|
||||
<xsl:param name="outer-conditions">
|
||||
<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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$outer-conditions = 0">
|
||||
<xsl:if test="(ancestor-or-self::*)[@target = $target]">
|
||||
@@ -98,24 +98,24 @@
|
||||
<!-- add all objects -->
|
||||
<xsl:for-each select="object">
|
||||
|
||||
<xsl:param name="conditions">
|
||||
<xsl:variable name="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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$conditions=0">
|
||||
|
||||
<xsl:param name="path">
|
||||
<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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:text> $(ODIR)/</xsl:text>
|
||||
<xsl:value-of select="$target"/>
|
||||
@@ -130,14 +130,14 @@
|
||||
<!-- external objects last -->
|
||||
<xsl:for-each select="external-object">
|
||||
|
||||
<xsl:param name="conditions">
|
||||
<xsl:variable name="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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$conditions=0">
|
||||
<xsl:text> $(ODIR)/</xsl:text>
|
||||
@@ -166,14 +166,14 @@
|
||||
<xsl:for-each select="//library">
|
||||
<xsl:sort select="@name"/>
|
||||
|
||||
<xsl:param name="outer-conditions">
|
||||
<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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$outer-conditions = 0">
|
||||
|
||||
@@ -196,29 +196,29 @@
|
||||
</xsl:choose>
|
||||
<xsl:text>: </xsl:text>
|
||||
|
||||
<xsl:param name="name"><xsl:value-of select="@name"/></xsl:param>
|
||||
<xsl:variable name="name"><xsl:value-of select="@name"/></xsl:variable>
|
||||
|
||||
<!-- enumerate all objects for library target -->
|
||||
<xsl:for-each select="//library[@name=$name]/object">
|
||||
|
||||
<xsl:param name="conditions">
|
||||
<xsl:variable name="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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$conditions=0">
|
||||
|
||||
<xsl:param name="path">
|
||||
<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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:text>$(ODIR)/</xsl:text>
|
||||
<xsl:value-of select="$target"/>
|
||||
@@ -234,14 +234,14 @@
|
||||
<!-- external objects last -->
|
||||
<xsl:for-each select="external-object">
|
||||
|
||||
<xsl:param name="conditions">
|
||||
<xsl:variable name="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:param>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$conditions=0">
|
||||
<xsl:text> $(ODIR)/</xsl:text>
|
||||
@@ -267,14 +267,14 @@
|
||||
<xsl:for-each select="//library">
|
||||
<xsl:if test="object[(ancestor-or-self::*)[@target = $target]]">
|
||||
|
||||
<xsl:param name="conditions">
|
||||
<xsl:variable name="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:param>
|
||||
</xsl:variable>
|
||||
<xsl:if test="$conditions=0">
|
||||
<xsl:text> $(ODIR)/</xsl:text>
|
||||
<xsl:text>lib</xsl:text>
|
||||
@@ -300,14 +300,14 @@
|
||||
<xsl:for-each select="//executable">
|
||||
<xsl:if test="(ancestor-or-self::*)[@target = $target]">
|
||||
|
||||
<xsl:param name="conditions">
|
||||
<xsl:variable name="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:param>
|
||||
</xsl:variable>
|
||||
<xsl:if test="$conditions=0">
|
||||
<xsl:text> $(ODIR)/</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$expression!=''">
|
||||
<xsl:param name="value"><xsl:value-of select="document('../../config.xml')//option[@name=$confexpr]/attribute::value"/></xsl:param>
|
||||
<xsl:param name="type"><xsl:value-of select="document('../../config.xml')//option[@name=$confexpr]/attribute::type"/></xsl:param>
|
||||
<xsl:variable name="value"><xsl:value-of select="document('../../config.xml')//option[@name=$confexpr]/attribute::value"/></xsl:variable>
|
||||
<xsl:variable name="type"><xsl:value-of select="document('../../config.xml')//option[@name=$confexpr]/attribute::type"/></xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type='boolean'">
|
||||
<xsl:choose>
|
||||
|
||||
Reference in New Issue
Block a user