On Fri, 2012-02-17 at 23:55 +0100, Pierre Labastie wrote:

> pierre@turboli:~/downloads/lfsbook$ make validxml
> Creating and cleaning /home/pierre/tmp
> Processing bootscripts...
> Validating the book...
> ls: cannot access lfs-bootscripts*.bz2: No such file or directory
> [hangs]
> 
> The reason is that the line:
> 
> validxml: tmpdir (in Makefile)
> 
> should be:
> 
> validxml: maketar tmpdir

Yeah, it's the call out to md5sum in aux-file-date.sh that actually
hangs because $bootscript is the null string because the `ls` failed as
you quoted above.

I'm not sure your fix is right though. Being a pedant, the last 2
commands in the validxml target have nothing to do with validating the
XML; that is obviously achieved by the call to xmllint.  Then again,
those last 2 commands are required in order to *produce* valid XML for
other targets to then make use of.

I think the proper fix is to remove the maketar target completely, and
move the call to make-aux-files.sh into the aux-file-data.sh script.  My
reasoning is that you can't even call ./aux-file-data.sh  from the
command line on a freshly checked-out copy of the book without it
hanging.  Running that script shouldn't require any 'make' dependency
magic in order to be run successfully.

As an aside, MAKETAR is never defined anywhere, so the guard doesn't
appear to ever do anything.

Suggested patch attached.

Regards,

Matt.
Index: lfs-trunk/Makefile
===================================================================
--- lfs-trunk.orig/Makefile
+++ lfs-trunk/Makefile
@@ -13,7 +13,7 @@ else
   Q = @
 endif
 
-lfs: maketar validxml profile-html
+lfs: validate profile-html
 	@echo "Generating chunked XHTML files..."
 	$(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
 	  -stringparam rootid "$(ROOT_ID)" -stringparam base.dir $(BASEDIR)/ \
@@ -41,7 +41,7 @@ lfs: maketar validxml profile-html
 
 	$(Q)$(MAKE) wget-list
 
-pdf: validxml
+pdf: validate
 	@echo "Generating profiled XML for PDF..."
 	$(Q)xsltproc --nonet --stringparam profile.condition pdf \
 	  --output $(RENDERTMP)/lfs-pdf.xml stylesheets/lfs-xsl/profile.xsl \
@@ -60,7 +60,7 @@ pdf: validxml
 	fi;
 	$(Q)fop $(RENDERTMP)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
 
-nochunks: maketar validxml profile-html
+nochunks: validate profile-html
 	@echo "Generating non chunked XHTML file..."
 	$(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
 	  --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
@@ -82,7 +82,7 @@ tmpdir:
 	$(Q)rm -f $(RENDERTMP)/lfs-{full,html,pdf}.xml
 	$(Q)rm -f $(RENDERTMP)/lfs-pdf.fo
 
-validxml: tmpdir
+validate: tmpdir
 	@echo "Processing bootscripts..."
 	$(Q)bash process-scripts.sh
 	@echo "Validating the book..."
@@ -90,14 +90,9 @@ validxml: tmpdir
 	  -o $(RENDERTMP)/lfs-full.xml index.xml
 	$(Q)rm -f appendices/*.script
 	$(Q)./aux-file-data.sh $(RENDERTMP)/lfs-full.xml
+	@echo "Validation complete."
 
-maketar:
-	$(Q)if [ "x$(MAKETAR)" == "x" ]; then \
-	   echo "Making tarballs..."; \
-	   sh make-aux-files.sh; \
-	fi;
-
-profile-html: validxml
+profile-html: validate
 	@echo "Generating profiled XML for XHTML..."
 	$(Q)xsltproc --nonet --stringparam profile.condition html \
 	  --output $(RENDERTMP)/lfs-html.xml stylesheets/lfs-xsl/profile.xsl \
@@ -120,15 +115,13 @@ md5sums:
       $(BASEDIR)/md5sums
 
 
-dump-commands: validxml
+dump-commands: validate
 	@echo "Dumping book commands..."
 	$(Q)xsltproc --output $(DUMPDIR)/ \
 	   stylesheets/dump-commands.xsl $(RENDERTMP)/lfs-full.xml
 
-validate: maketar validxml
-	@echo "Validation complete."
 
 all: lfs nochunks pdf dump-commands md5sums
 
 .PHONY : all dump-commands lfs nochunks pdf profile-html tmpdir validate \
-	 validxml wget-list maketar md5sums
+	 validate wget-list maketar md5sums
Index: lfs-trunk/aux-file-data.sh
===================================================================
--- lfs-trunk.orig/aux-file-data.sh
+++ lfs-trunk/aux-file-data.sh
@@ -7,6 +7,8 @@ fi
 
 FILE=$1
 
+./make-aux-files.sh
+
 # Bootscript data
 bootscripts=$(ls lfs-bootscripts*.bz2)
 base=$(basename $bootscripts .tar.bz2)
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to