[jhalfs] branch trunk updated: BLFS, process-replaceable: use $jobs
"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]> Sat, 01 Feb 2025 15:47:15 +0000
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <173842483516.30242.7817404838613904118@rivendell.linuxfromscratch.org> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch trunk
in repository jhalfs.
The following commit(s) were added to refs/heads/trunk by this push:
new 24cbea5 BLFS, process-replaceable: use $jobs
24cbea5 is described below
commit 24cbea592519b7b8e8c5b955bfa4a589cde3bf45
Author: Pierre Labastie <[email protected]>
AuthorDate: Sat Feb 1 16:43:24 2025 +0100
BLFS, process-replaceable: use $jobs
When we see <replaceable><N></replaceable> or
<replaceable>N</replaceable> or <replaceable>$(nproc)</replaceable>,
insert the value of $jobs (or $(nproc) if $jobs=0) instead of 4 (to
replace N) or $(nproc) (to replace $(nproc))...
---
BLFS/xsl/process-replaceable.xsl | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/BLFS/xsl/process-replaceable.xsl b/BLFS/xsl/process-replaceable.xsl
index 2795627..b4426bd 100644
--- a/BLFS/xsl/process-replaceable.xsl
+++ b/BLFS/xsl/process-replaceable.xsl
@@ -92,13 +92,20 @@
<xsl:copy-of select="$xkblayout"/>
</xsl:when>
<!-- At several places, the number of jobs is given as "N" in a replaceable
- tag. We either detect "N" alone or <N> Replace N with 4. -->
- <xsl:when test="contains(string(),'<N>') or string()='N'">
- <xsl:text>4</xsl:text>
- </xsl:when>
- <!-- we have now also -j$(nproc) in some replaceable elements-->
- <xsl:when test="contains(string(),'nproc')">
- <xsl:apply-templates/>
+ tag. We either detect "N" alone or <N> Also, we have now a few
+ instances of $(nproc) in a replaceable tag. Replace with with the
+ number of jobs chosen by the user. -->
+ <xsl:when test="contains(string(),'<N>') or
+ string()='N' or
+ contains(string(),'nproc')">
+ <xsl:choose>
+ <xsl:when test="$jobs=0">
+ <xsl:text>$(nproc)</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$jobs"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<!-- Mercurial config file uses user_name. Replace only if non root.
Add a bogus mail field. That works for the proposed tests anyway. -->
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
--
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page