diff --git a/Makefile b/Makefile index aee4f9a61..ee44d0049 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,4 @@ # vim:ts=3 -#BASEDIR = ~/lfs-book -#SYSDDIR = ~/lfs-systemd -#DUMPDIR = ~/lfs-commands RENDERTMP = $(HOME)/tmp CHUNK_QUIET = 1 ROOT_ID = @@ -24,15 +21,15 @@ ifneq ($(REV), sysv) endif ifeq ($(REV), sysv) - BASEDIR ?= ~/public_html/lfs-book + BASEDIR ?= $(HOME)/public_html/lfs-book PDF_OUTPUT ?= LFS-BOOK.pdf NOCHUNKS_OUTPUT ?= LFS-BOOK.html - DUMPDIR ?= ~/lfs-commands + DUMPDIR ?= $(HOME)/lfs-commands else - BASEDIR ?= ~/public_html/lfs-systemd + BASEDIR ?= $(HOME)/public_html/lfs-systemd PDF_OUTPUT ?= LFS-SYSD-BOOK.pdf NOCHUNKS_OUTPUT ?= LFS-SYSD-BOOK.html - DUMPDIR ?= ~/lfs-sysd-commands + DUMPDIR ?= $(HOME)/lfs-sysd-commands endif ifndef ARCH @@ -60,7 +57,8 @@ book: validate profile-html @echo "Copying CSS code and images..." $(Q)mkdir -p $(BASEDIR)/stylesheets $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets - $(Q)sed -i 's|../stylesheet|stylesheet|' $(BASEDIR)/index.html + $(Q)sed -e 's|../stylesheet|stylesheet|' \ + -i $(BASEDIR)/index.html $(Q)mkdir -p $(BASEDIR)/images $(Q)cp images/*.png $(BASEDIR)/images @@ -68,11 +66,10 @@ book: validate profile-html @echo "Running Tidy and obfuscate.sh..." $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \ tidy -config tidy.conf $$filename; \ - true; \ /bin/bash obfuscate.sh $$filename; \ - sed -e "s@text/html@application/xhtml+xml@g" \ + sed -e "s|text/html|application/xhtml+xml|g" \ -i $$filename; \ - done; + done $(Q)$(MAKE) --no-print-directory wget-list md5sums @@ -111,16 +108,16 @@ nochunks: validate profile-html --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \ stylesheets/lfs-nochunks.xsl \ $(RENDERTMP)/lfs-html.xml -# $(RENDERTMP)/lfs-html2.xml @echo "Running Tidy..." - $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true + $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || test $$? -le 1 @echo "Running obfuscate.sh..." - $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT) - $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT) - $(Q)sed -i -e "s@../wget-list@wget-list@" $(BASEDIR)/$(NOCHUNKS_OUTPUT) - $(Q)sed -i -e "s@../md5sums@md5sums@" $(BASEDIR)/$(NOCHUNKS_OUTPUT) + $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT) + $(Q)sed -e "s|text/html|application/xhtml+xml|g" \ + -e "s|../wget-list|wget-list|" \ + -e "s|../md5sums|md5sums|" \ + -i $(BASEDIR)/$(NOCHUNKS_OUTPUT) @echo "Output at $(BASEDIR)/$(NOCHUNKS_OUTPUT)" @@ -139,17 +136,17 @@ validate: tmpdir version @echo "Adjusting for revision $(REV)..." $(Q)xsltproc --nonet \ --xinclude \ - --output $(RENDERTMP)/lfs-html2.xml \ --stringparam profile.revision $(REV) \ --stringparam profile.arch $(ARCH) \ + --output $(RENDERTMP)/lfs-html2.xml \ stylesheets/lfs-xsl/profile.xsl \ index.xml @echo "Validating the book..." - $(Q)xmllint --nonet \ - --noent \ - --postvalid \ - -o $(RENDERTMP)/lfs-full.xml \ + $(Q)xmllint --nonet \ + --encode UTF-8 \ + --postvalid \ + --output $(RENDERTMP)/lfs-full.xml \ $(RENDERTMP)/lfs-html2.xml $(Q)rm -f appendices/*.script @@ -171,18 +168,21 @@ wget-list: $(BASEDIR)/wget-list $(BASEDIR)/wget-list-$(REV) $(BASEDIR)/wget-list: stylesheets/wget-list.xsl $(DOWNLOADS_DEP) @echo "Generating consolidated wget list at $(BASEDIR)/wget-list ..." $(Q)mkdir -p $(BASEDIR) - $(Q)xsltproc --xinclude --nonet \ + $(Q)xsltproc --nonet \ + --xinclude \ --output $(BASEDIR)/wget-list \ stylesheets/wget-list.xsl \ chapter03/chapter03.xml $(BASEDIR)/wget-list-$(REV): stylesheets/wget-list.xsl $(DOWNLOADS_DEP) - $(Q)xsltproc --nonet --xinclude \ + $(Q)xsltproc --nonet \ + --xinclude \ --stringparam profile.revision $(REV) \ --output $(RENDERTMP)/wget-list.xml \ stylesheets/lfs-xsl/profile.xsl \ chapter03/chapter03.xml - $(Q)xsltproc --xinclude --nonet \ + + $(Q)xsltproc --nonet \ --output $(BASEDIR)/wget-list-$(REV) \ stylesheets/wget-list.xsl \ $(RENDERTMP)/wget-list.xml @@ -192,14 +192,15 @@ $(BASEDIR)/md5sums: stylesheets/wget-list.xsl $(DOWNLOADS_DEP) @echo "Generating consolidated md5sum file at $(BASEDIR)/md5sums ..." $(Q)mkdir -p $(BASEDIR) - $(Q)xsltproc --nonet --xinclude \ + $(Q)xsltproc --nonet \ + --xinclude \ --stringparam profile.revision $(REV) \ --stringparam profile.arch $(ARCH) \ --output $(RENDERTMP)/md5sum.xml \ stylesheets/lfs-xsl/profile.xsl \ chapter03/chapter03.xml - $(Q)xsltproc --xinclude --nonet \ + $(Q)xsltproc --nonet \ --output $(BASEDIR)/md5sums \ stylesheets/md5sum.xsl \ $(RENDERTMP)/md5sum.xml diff --git a/stylesheets/dump-commands.xsl b/stylesheets/dump-commands.xsl index 48af34c20..83e24dfc6 100644 --- a/stylesheets/dump-commands.xsl +++ b/stylesheets/dump-commands.xsl @@ -1,14 +1,13 @@ - + + xmlns:exsl="http://exslt.org/common" + extension-element-prefixes="exsl" + version="1.0"> - - + diff --git a/stylesheets/lfs-xsl/chunk-slave.xsl b/stylesheets/lfs-xsl/chunk-slave.xsl index f5bc8a956..45d33e04a 100644 --- a/stylesheets/lfs-xsl/chunk-slave.xsl +++ b/stylesheets/lfs-xsl/chunk-slave.xsl @@ -10,6 +10,14 @@ + + + + + + + + @@ -31,9 +39,6 @@ - - - book toc,title diff --git a/stylesheets/lfs-xsl/nochunks.xsl b/stylesheets/lfs-xsl/nochunks.xsl index 5a5ad36f5..896449d7c 100644 --- a/stylesheets/lfs-xsl/nochunks.xsl +++ b/stylesheets/lfs-xsl/nochunks.xsl @@ -10,6 +10,13 @@ + diff --git a/stylesheets/lfs-xsl/pdf.xsl b/stylesheets/lfs-xsl/pdf.xsl index 679f73b84..ea247f5db 100644 --- a/stylesheets/lfs-xsl/pdf.xsl +++ b/stylesheets/lfs-xsl/pdf.xsl @@ -53,8 +53,8 @@ We have expanded the support to several inline tags. See pdf/lfs-mixed.xsl. Note: the argument in select= is a zero-width space - (unicode 200b, encoded in utf-8)--> - + (unicode 200b)--> + diff --git a/stylesheets/md5sum.xsl b/stylesheets/md5sum.xsl index bb7268276..57723df97 100644 --- a/stylesheets/md5sum.xsl +++ b/stylesheets/md5sum.xsl @@ -3,7 +3,7 @@ + version="1.0"> @@ -31,8 +31,7 @@ - - + diff --git a/stylesheets/wget-list.xsl b/stylesheets/wget-list.xsl index aa8d263c4..eca53a4c9 100644 --- a/stylesheets/wget-list.xsl +++ b/stylesheets/wget-list.xsl @@ -4,7 +4,7 @@ with wget. --> + version="1.0"> @@ -28,8 +28,7 @@ - - +