Author: pierre
Date: Mon Feb  5 01:54:15 2018
New Revision: 4039

Log:
Add DESTDIR instructions when the command is "ninja install" (in LFS/lfs.xsl)

Modified:
   jhalfs/trunk/LFS/lfs.xsl

Modified: jhalfs/trunk/LFS/lfs.xsl
==============================================================================
--- jhalfs/trunk/LFS/lfs.xsl    Sun Feb  4 07:19:14 2018        (r4038)
+++ jhalfs/trunk/LFS/lfs.xsl    Mon Feb  5 01:54:15 2018        (r4039)
@@ -845,7 +845,31 @@
           </xsl:otherwise>
         </xsl:choose>
       </xsl:when>
-      <xsl:otherwise> <!-- no make in this string -->
+      <xsl:when test="contains($outputstring,'ninja ')">
+        <xsl:choose>
+          <xsl:when test="not(starts-with($outputstring,'ninja'))">
+            <xsl:call-template name="outputpkgdest">
+              <xsl:with-param name="outputstring"
+                              
select="substring-before($outputstring,'ninja')"/>
+            </xsl:call-template>
+            <xsl:call-template name="outputpkgdest">
+              <xsl:with-param
+                 name="outputstring"
+                 select="substring-after($outputstring,
+                                      
substring-before($outputstring,'ninja'))"/>
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise> <!-- ninja is the first word -->
+            <xsl:text>DESTDIR=$PKG_DEST ninja</xsl:text>
+            <xsl:call-template name="outputpkgdest">
+              <xsl:with-param
+                  name="outputstring"
+                  select="substring-after($outputstring,'ninja')"/>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise> <!-- no make nor ninja in this string -->
         <xsl:choose>
           <xsl:when test="contains($outputstring,'&gt;/') and
                                  
not(contains(substring-before($outputstring,'&gt;/'),' /'))">
-- 
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page

Reply via email to