Adds -j1 to "make install", impose a dependency on preceding package in X*
chapter
This commit is contained in:
parent
7e51281ea6
commit
96a30c7a23
3 changed files with 55 additions and 7 deletions
|
@ -74,6 +74,16 @@ cat >$SPECIAL_FILE << EOF
|
|||
</xsl:element>
|
||||
</xsl:if>
|
||||
<!-- Dependencies -->
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:element name="dependency">
|
||||
<xsl:attribute name="status">required</xsl:attribute>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of
|
||||
select="preceding-sibling::sect1[1]/@id"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="type">ref</xsl:attribute>
|
||||
</xsl:element>
|
||||
<xsl:apply-templates select=".//para[@role='required' or
|
||||
@role='recommended' or
|
||||
@role='optional']"
|
||||
|
|
|
@ -202,6 +202,22 @@
|
|||
</xsl:element>
|
||||
</xsl:if>
|
||||
<!-- Dependencies -->
|
||||
<!-- If in Xorg chapter, consider that the preceding package is
|
||||
the first dependency (not always noted in the book) -->
|
||||
<xsl:if test="ancestor::chapter[@id='x-window-system'] and
|
||||
preceding-sibling::sect1[@id != 'xorg7']">
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:element name="dependency">
|
||||
<xsl:attribute name="status">required</xsl:attribute>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of
|
||||
select="preceding-sibling::sect1[1]/@id"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="type">ref</xsl:attribute>
|
||||
</xsl:element>
|
||||
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select=".//para[@role='required' or
|
||||
@role='recommended' or
|
||||
@role='optional']"
|
||||
|
|
|
@ -372,13 +372,20 @@ mv ../${sect_ver}.md5.orig ../${sect_ver}.md5
</xsl:text>
|
|||
|
||||
<xsl:template match="screen">
|
||||
<xsl:if test="child::* = userinput and not(@role = 'nodump')">
|
||||
<xsl:if test="@role = 'root' and $sudo = 'y'">
|
||||
<xsl:text>sudo sh -c '</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="userinput"/>
|
||||
<xsl:if test="@role = 'root' and $sudo = 'y'">
|
||||
<xsl:text>'</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@role = 'root'">
|
||||
<xsl:if test="$sudo = 'y'">
|
||||
<xsl:text>sudo sh -c '</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="userinput" mode="root"/>
|
||||
<xsl:if test="$sudo = 'y'">
|
||||
<xsl:text>'</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="userinput"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
@ -436,6 +443,21 @@ popd</xsl:text>
|
|||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="userinput" mode="root">
|
||||
<xsl:for-each select="child::node()">
|
||||
<xsl:choose>
|
||||
<xsl:when test="self::text() and contains(string(),'make')">
|
||||
<xsl:value-of select="substring-before(string(),'make')"/>
|
||||
<xsl:text>make -j1</xsl:text>
|
||||
<xsl:value-of select="substring-after(string(),'make')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="self::node()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="replaceable">
|
||||
<!-- Not needed anymore
|
||||
<xsl:choose>
|
||||
|
|
Reference in a new issue