On 06/01/2016 02:19 PM, Bruce Dubbs wrote:

OK, I've committed the changes to the Makefile to support the merge.  I
checked the daily update script for trunk and it is good, so just start
adding revision= attributes and it should still be good.

We still will generate the systemd book from the branch for a while so
updates to both trunk and one branch will be needed until we are ready
to stop using the branch.

Okay, FYI, you'll need to clear ~/tmp (or make clean) when generating both books. Fairly simple fix...I think. Also, no units (equivalent for bootscripts) for systemd yet. Please review attached patch. AFAICT, no ill effects, but a second set of eyes would be much appreciated.

--DJ
Index: Makefile
===================================================================
--- Makefile    (revision 17423)
+++ Makefile    (working copy)
@@ -35,10 +35,17 @@
   BASEDIR         ?= $(HOME)/public_html/blfs-book
   NOCHUNKS_OUTPUT ?= blfs-book.html
   DUMPDIR         ?= ~/blfs-commands
+  BLFSHTML        ?= blfs-html.xml
+  BLFSHTML2       ?= blfs-html2.xml
+  BLFSFULL        ?= blfs-full.xml
 else
   BASEDIR         ?= $(HOME)/public_html/blfs-systemd
   NOCHUNKS_OUTPUT ?= blfs-sysd-book.html
   DUMPDIR         ?= ~/blfs-sysd-commands
+  BLFSHTML        ?= blfs-systemd-html.xml
+  BLFSHTML2       ?= blfs-systemd-html2.xml
+  BLFSFULL        ?= blfs-systemd-full.xml
+
 endif
 
 
@@ -48,7 +55,7 @@
 world: all blfs-patch-list dump-commands test-links
 
 html: $(BASEDIR)/index.html
-$(BASEDIR)/index.html: $(RENDERTMP)/blfs-html.xml
+$(BASEDIR)/index.html: $(RENDERTMP)/$(BLFSHTML)
        @echo "Generating chunked XHTML files..."
        $(Q)xsltproc --nonet                                    \
                 --stringparam chunk.quietly $(CHUNK_QUIET) \
@@ -55,7 +62,7 @@
                 --stringparam rootid "$(ROOT_ID)"          \
                 --stringparam base.dir $(BASEDIR)/         \
                 stylesheets/blfs-chunked.xsl               \
-                $(RENDERTMP)/blfs-html.xml
+                $(RENDERTMP)/$(BLFSHTML)
 
        @echo "Copying CSS code and images..."
        $(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \
@@ -82,13 +89,13 @@
    done;
 
 nochunks: $(BASEDIR)/$(NOCHUNKS_OUTPUT)
-$(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/blfs-html.xml
+$(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/$(BLFSHTML)
        @echo "Generating non-chunked XHTML file..."
        $(Q)xsltproc --nonet                                \
                 --stringparam rootid "$(ROOT_ID)"      \
                 --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
                 stylesheets/blfs-nochunks.xsl          \
-                $(RENDERTMP)/blfs-html.xml
+                $(RENDERTMP)/$(BLFSHTML)
 
        @echo "Running Tidy and obfuscate.sh on non-chunked XHTML..."
        $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
@@ -102,17 +109,17 @@
 
 clean:
        @echo "Cleaning $(RENDERTMP)"
-       $(Q)rm -f $(RENDERTMP)/blfs-{full,html}.xml
+       $(Q)rm -f $(RENDERTMP)/blfs-{,systemd-}{html{,2},full}.xml
        $(Q)rm -f $(RENDERTMP)/blfs-{patch-list,patches}
 
-validate: $(RENDERTMP)/blfs-full.xml
-$(RENDERTMP)/blfs-full.xml: general.ent $(ALLXML) $(ALLXSL)
+validate: $(RENDERTMP)/$(BLFSFULL)
+$(RENDERTMP)/$(BLFSFULL): general.ent $(ALLXML) $(ALLXSL)
        $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
 
        @echo "Adjusting for revision $(REV)..."
        $(Q)xsltproc --nonet                               \
                 --xinclude                            \
-                --output $(RENDERTMP)/blfs-html2.xml  \
+                --output $(RENDERTMP)/$(BLFSHTML2)  \
                 --stringparam profile.revision $(REV) \
                 stylesheets/lfs-xsl/profile.xsl       \
                 index.xml
@@ -121,17 +128,17 @@
        $(Q)xmllint --nonet                             \
                --noent                             \
                --postvalid                         \
-               --output $(RENDERTMP)/blfs-full.xml \
-               $(RENDERTMP)/blfs-html2.xml
+               --output $(RENDERTMP)/$(BLFSFULL) \
+               $(RENDERTMP)/$(BLFSHTML2)
 
-profile-html: $(RENDERTMP)/blfs-html.xml
-$(RENDERTMP)/blfs-html.xml: $(RENDERTMP)/blfs-full.xml
+profile-html: $(RENDERTMP)/$(BLFSHTML)
+$(RENDERTMP)/$(BLFSHTML): $(RENDERTMP)/$(BLFSFULL)
        @echo "Generating profiled XML for XHTML..."
        $(Q)xsltproc --nonet                              \
                 --stringparam profile.condition html \
-                --output $(RENDERTMP)/blfs-html.xml  \
+                --output $(RENDERTMP)/$(BLFSHTML)  \
                 stylesheets/lfs-xsl/profile.xsl      \
-                $(RENDERTMP)/blfs-full.xml
+                $(RENDERTMP)/$(BLFSFULL)
 
 blfs-patch-list: blfs-patches.sh
        @echo "Generating blfs patch list..."
@@ -138,24 +145,24 @@
        $(Q)awk '{if ($$1 == "copy") {sub(/.*\//, "", $$2); print $$2}}' \
          blfs-patches.sh > blfs-patch-list
 
-blfs-patches.sh: $(RENDERTMP)/blfs-full.xml
+blfs-patches.sh: $(RENDERTMP)/$(BLFSFULL)
        @echo "Generating blfs patch script..."
        $(Q)xsltproc --nonet                     \
                 --output blfs-patches.sh    \
                 stylesheets/patcheslist.xsl \
-                $(RENDERTMP)/blfs-full.xml
+                $(RENDERTMP)/$(BLFSFULL)
 
 wget-list: $(BASEDIR)/wget-list
-$(BASEDIR)/wget-list: $(RENDERTMP)/blfs-full.xml
+$(BASEDIR)/wget-list: $(RENDERTMP)/$(BLFSFULL)
        @echo "Generating wget list for $(REV) at $(BASEDIR)/wget-list ..."
        $(Q)mkdir -p $(BASEDIR)
        $(Q)xsltproc --nonet                       \
                 --output $(BASEDIR)/wget-list \
                 stylesheets/wget-list.xsl     \
-                $(RENDERTMP)/blfs-full.xml
+                $(RENDERTMP)/$(BLFSFULL)
 
 test-links: $(BASEDIR)/test-links
-$(BASEDIR)/test-links: $(RENDERTMP)/blfs-full.xml
+$(BASEDIR)/test-links: $(RENDERTMP)/$(BLFSFULL)
        @echo "Generating test-links file..."
        $(Q)mkdir -p $(BASEDIR)
        $(Q)xsltproc --nonet                        \
@@ -162,7 +169,7 @@
                 --stringparam list_mode full   \
                 --output $(BASEDIR)/test-links \
                 stylesheets/wget-list.xsl      \
-                $(RENDERTMP)/blfs-full.xml
+                $(RENDERTMP)/$(BLFSFULL)
 
        @echo "Checking URLs, first pass..."
        $(Q)rm -f $(BASEDIR)/{good,bad,true_bad}_urls
@@ -188,7 +195,7 @@
 bootscripts:
        @VERSION=`grep "bootscripts-version " general.ent | cut -d\" -f2`; \
    BOOTSCRIPTS="blfs-bootscripts-$$VERSION";                          \
-   if [ ! -e $$BOOTSCRIPTS.tar.xz ]; then                             \
+   if [ ! -e $$BOOTSCRIPTS.tar.xz -a "$(REV)" == "sysv" ]; then       \
      rm -rf $(RENDERTMP)/$$BOOTSCRIPTS;                               \
      mkdir $(RENDERTMP)/$$BOOTSCRIPTS;                                \
      cp -a ../bootscripts/* $(RENDERTMP)/$$BOOTSCRIPTS;               \
@@ -196,16 +203,26 @@
      tar  -cJhf $$BOOTSCRIPTS.tar.xz -C $(RENDERTMP) $$BOOTSCRIPTS;   \
    fi
 
+systemd-units:
+       @VERSION=`grep "systemd-units-version " general.ent | cut -d\" -f2`; \
+   UNITS="blfs-systemd-units-$$VERSION";                        \
+   if [ ! -e $$UNITS.tar.xz -a "$(REV)" == "systemd" ]; then    \
+     rm -rf $(RENDERTMP)/$$UNITS;                               \
+     mkdir $(RENDERTMP)/$$UNITS;                                \
+     cp -a ../systemd-units/* $(RENDERTMP)/$$UNITTS;            \
+     tar -cJhf $$UNITS.tar.xz -C $(RENDERTMP) $$UNITS;          \
+   fi
+
 dump-commands: $(DUMPDIR)
-$(DUMPDIR): $(RENDERTMP)/blfs-full.xml
+$(DUMPDIR): $(RENDERTMP)/$(BLFSFULL)
        @echo "Dumping book commands..."
        $(Q)xsltproc --output $(DUMPDIR)/          \
                 stylesheets/dump-commands.xsl \
-                $(RENDERTMP)/blfs-full.xml
+                $(RENDERTMP)/$(BLFSFULL)
        $(Q)touch $(DUMPDIR)
 
 .PHONY: blfs all world html nochunks tmpdir clean  \
    validate profile-html blfs-patch-list wget-list test-links \
-   dump-commands  bootscripts
+   dump-commands  bootscripts systemd-units
 
 
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to