Index: BOOK/Makefile
===================================================================
--- BOOK/Makefile	(revision dabbced1dfa098d3fd9aa1a8330cb100429613d4)
+++ BOOK/Makefile	(revision b47a4a1d93d92208ef3ed33694b28a4eda285fe2)
@@ -10,19 +10,24 @@
 ROOT_ID	 :=
 
-S		:= -
+FG_GREEN	:= $(shell echo -e '\e[0;32m')
+FG_BLUE		:= $(shell echo -e '\e[0;34m')
+FG_DEFAULT	:= $(shell echo -e '\e[0;0m')
 
-ARCHS		:= x86 x86_64 x86_64-64 sparc sparc64 sparc64-64 mips mips64 mips64-64 \
-		   ppc ppc64 alpha
+ARCHS		:= x86 x86_64 x86_64-64 \
+		   sparc sparc64 sparc64-64 \
+		   mips mips64 mips64-64 \
+		   ppc ppc64 \
+		   alpha
 
 ARCHS_VD_XML	:= $(ARCHS:%=%-validate_dump-xml)
 ARCHS_P_XML	:= $(ARCHS:%=%-profiled-xml)
 
-ARCHS_HTML	:= $(ARCHS:%=%$(S)html)
-ARCHS_NOCHUNKS	:= $(ARCHS:%=%$(S)nochunks)
-ARCHS_PDF	:= $(ARCHS:%=%$(S)pdf)
-ARCHS_VALIDATE	:= $(ARCHS:%=%$(S)validate)
-ARCHS_TROUBLE	:= $(ARCHS:%=%$(S)trouble)
-ARCHS_DUMP	:= $(ARCHS:%=%$(S)dump)
-ARCHS_DLLIST	:= $(ARCHS:%=%$(S)dllist)
+ARCHS_HTML	:= $(ARCHS:%=%-html)
+ARCHS_NOCHUNKS	:= $(ARCHS:%=%-nochunks)
+ARCHS_PDF	:= $(ARCHS:%=%-pdf)
+ARCHS_VALIDATE	:= $(ARCHS:%=%-validate)
+ARCHS_TROUBLE	:= $(ARCHS:%=%-trouble)
+ARCHS_DUMP	:= $(ARCHS:%=%-dump)
+ARCHS_DLLIST	:= $(ARCHS:%=%-dllist)
 
 ifdef V
@@ -32,8 +37,5 @@
 endif
 
-.PHONY: clfs lfs tidy render titlepage nochunks pdf validate trouble dump-commands \
-	download-list tmpdir $(ARCHS_HTML) $(ARCHS_NOCHUNKS) $(ARCHS_PDF) \
-	$(ARCHS_VALIDATE) $(ARCHS_TROUBLE) $(ARCHS_DUMP) $(ARCHS_DLLIST) tmpdir
-
+.PHONY: clfs lfs render nochunks pdf validate trouble dump-commands download-list
 clfs lfs: tmpdir render
 render: $(ARCHS_HTML) titlepage
@@ -45,7 +47,9 @@
 download-list: $(ARCHS_DLLIST)
 
+.PHONY: tmpdir
 tmpdir:
-	$(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
+	$(Q)mkdir -p $(RENDERTMP)
 
+.PHONY: tidy tidy-f tidy-d
 ifeq ($(shell which tidy >/dev/null 2>&1 && echo yes),yes)
 tidy:
@@ -64,4 +68,5 @@
 endif
 
+.PHONY: titlepage
 titlepage:
 	@echo "Rendering the top-level index..."
@@ -70,92 +75,102 @@
 	@$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/index.html
 
-$(ARCHS_VD_XML): override validate_dump_xml_arch = $(@:%-validate_dump-xml=%)
+
+.PHONY: $(ARCHS_VD_XML)
+$(ARCHS_VD_XML): override arch = $(@:%-validate_dump-xml=%)
 $(ARCHS_VD_XML): tmpdir
-	@echo "Validating $(validate_dump_xml_arch) book..."
+	@echo "Validating $(arch) book..."
 	$(Q)xmllint --nonet --noent --xinclude --postvalid \
-	  -o $(RENDERTMP)/$(validate_dump_xml_arch)-full.xml $(PWD)/$(validate_dump_xml_arch)-index.xml
+	  -o $(RENDERTMP)/$(arch)-full.xml $(PWD)/$(arch)-index.xml
 
-$(ARCHS_P_XML): override profiled_xml_arch = $(@:%-profiled-xml=%)
+.PHONY: $(ARCHS_P_XML)
+$(ARCHS_P_XML): override arch = $(@:%-profiled-xml=%)
 $(ARCHS_P_XML): tmpdir
-	@$(MAKE) --no-print-directory $(profiled_xml_arch)-validate_dump-xml
+	@$(MAKE) --no-print-directory $(arch)-validate_dump-xml
 
-	@echo "Generating profiled $(profiled_xml_arch) book for XHTML..."
+	@echo "Generating profiled $(arch) book for XHTML..."
 	$(Q)xsltproc --nonet --stringparam profile.condition html \
-	  --output $(RENDERTMP)/$(profiled_xml_arch)-html.xml \
-	  $(PWD)/stylesheets/lfs-xsl/profile.xsl $(RENDERTMP)/$(profiled_xml_arch)-full.xml
+	  --output $(RENDERTMP)/$(arch)-html.xml \
+	  $(PWD)/stylesheets/lfs-xsl/profile.xsl $(RENDERTMP)/$(arch)-full.xml
 
-$(ARCHS_HTML): override html_arch = $(@:%$(S)html=%)
+.PHONY: $(ARCHS_HTML)
+$(ARCHS_HTML): override arch = $(@:%-html=%)
 $(ARCHS_HTML): tmpdir
-	@$(MAKE) --no-print-directory $(html_arch)-profiled-xml
+	@$(MAKE) --no-print-directory $(arch)-profiled-xml
 
-	@echo "Rendering chunked XHTML of $(html_arch)..."
-	$(Q)mkdir -p $(BASEDIR)/$(html_arch)
+	@echo "Rendering chunked XHTML of $(arch)..."
+	$(Q)mkdir -p $(BASEDIR)/$(arch)
 	$(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
 	  -stringparam rootid "$(ROOT_ID)" \
-	  -stringparam base.dir $(BASEDIR)/$(html_arch)/ \
-	  $(PWD)/stylesheets/clfs-chunked.xsl $(RENDERTMP)/$(html_arch)-html.xml
+	  -stringparam base.dir $(BASEDIR)/$(arch)/ \
+	  $(PWD)/stylesheets/clfs-chunked.xsl $(RENDERTMP)/$(arch)-html.xml
 
-	@echo "Copying CSS code and images for $(html_arch)..."
-	$(Q)mkdir -p $(BASEDIR)/$(html_arch)/stylesheets
-	$(Q)cp $(PWD)/stylesheets/lfs-xsl/*.css $(BASEDIR)/$(html_arch)/stylesheets
-	$(Q)sed -i -e "s@../stylesheets@stylesheets@g" $(BASEDIR)/$(html_arch)/*.html
-	$(Q)mkdir -p $(BASEDIR)/$(html_arch)/images
-	$(Q)cp $(PWD)/images/*.png $(BASEDIR)/$(html_arch)/images
-	$(Q)sed -i -e "s@../images@images@g" $(BASEDIR)/$(html_arch)/*.html
+	@echo "Copying CSS code and images for $(arch)..."
+	$(Q)mkdir -p $(BASEDIR)/$(arch)/stylesheets
+	$(Q)cp $(PWD)/stylesheets/lfs-xsl/*.css $(BASEDIR)/$(arch)/stylesheets
+	$(Q)sed -i -e "s@../stylesheets@stylesheets@g" $(BASEDIR)/$(arch)/*.html
+	$(Q)mkdir -p $(BASEDIR)/$(arch)/images
+	$(Q)cp $(PWD)/images/*.png $(BASEDIR)/$(arch)/images
+	$(Q)sed -i -e "s@../images@images@g" $(BASEDIR)/$(arch)/*.html
 
-	@$(MAKE) --no-print-directory tidy-d TIDY_DIR=$(BASEDIR)/$(html_arch)
+	@$(MAKE) --no-print-directory tidy-d TIDY_DIR=$(BASEDIR)/$(arch)
 
-$(ARCHS_NOCHUNKS): override nochunk_arch = $(@:%$(S)nochunks=%)
+.PHONY: $(ARCHS_NOCHUNKS)
+$(ARCHS_NOCHUNKS): override arch = $(@:%-nochunks=%)
 $(ARCHS_NOCHUNKS): tmpdir
-	@$(MAKE) --no-print-directory $(nochunk_arch)-profiled-xml
+	@$(MAKE) --no-print-directory $(arch)-profiled-xml
 
-	@echo "Rendering Single File HTML of $(nochunk_arch)..."
+	@echo "Rendering Single File HTML of $(arch)..."
 	$(Q)mkdir -p $(BASEDIR)
 	$(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
-	  --output $(BASEDIR)/CLFS-$(nochunk_arch).html \
-	  $(PWD)/stylesheets/clfs-nochunks.xsl $(RENDERTMP)/$(nochunk_arch)-html.xml
+	  --output $(BASEDIR)/CLFS-$(arch).html \
+	  $(PWD)/stylesheets/clfs-nochunks.xsl $(RENDERTMP)/$(arch)-html.xml
 
-	@$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/CLFS-$(nochunk_arch).html
+	@$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/CLFS-$(arch).html
 
-$(ARCHS_PDF): override pdf_arch =  $(@:%$(S)pdf=%)
+.PHONY: $(ARCHS_PDF)
+$(ARCHS_PDF): override arch =  $(@:%-pdf=%)
 $(ARCHS_PDF): tmpdir
-	@$(MAKE) --no-print-directory $(pdf_arch)-profiled-xml
+	@$(MAKE) --no-print-directory $(arch)-profiled-xml
 
-	@echo "Generating FO file of $(pdf_arch)..."
+	@echo "Generating FO file of $(arch)..."
 	$(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
-	  --output $(RENDERTMP)/$(pdf_arch).fo $(PWD)/stylesheets/clfs-pdf.xsl \
-	  $(RENDERTMP)/$(pdf_arch)-html.xml
-	$(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/$(pdf_arch).fo
+	  --output $(RENDERTMP)/$(arch).fo $(PWD)/stylesheets/clfs-pdf.xsl \
+	  $(RENDERTMP)/$(arch)-html.xml
+	$(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/$(arch).fo
 
-	@echo "Rendering PDF of $(pdf_arch)..."
+	@echo "Rendering PDF of $(arch)..."
 	$(Q)mkdir -p $(BASEDIR)
-	$(Q)fop $(RENDERTMP)/$(pdf_arch).fo $(BASEDIR)/CLFS-$(pdf_arch).pdf
+	$(Q)fop $(RENDERTMP)/$(arch).fo $(BASEDIR)/CLFS-$(arch).pdf
 
-$(ARCHS_VALIDATE): override validate_arch =  $(@:%$(S)validate=%)
+.PHONY: $(ARCHS_VALIDATE)
+$(ARCHS_VALIDATE): override arch =  $(@:%-validate=%)
 $(ARCHS_VALIDATE):
-	@echo "Validating $(validate_arch)..."
-	$(Q)xmllint --xinclude --noout --nonet --postvalid $(PWD)/$(validate_arch)-index.xml
+	@echo "Validating $(arch)..."
+	$(Q)xmllint --xinclude --noout --nonet --postvalid $(PWD)/$(arch)-index.xml
 
-$(ARCHS_TROUBLE): override trouble_arch =  $(@:%$(S)trouble=%)
+.PHONY: $(ARCHS_TROUBLE)
+$(ARCHS_TROUBLE): override trouble_arch =  $(@:%-trouble=%)
 $(ARCHS_TROUBLE): tmpdir
 	@echo "Troubleshooting $(trouble_arch)..."
 	$(Q)xmllint --xinclude --nonet --postvalid \
-	  -o $(RENDERTMP)/dump-$(trouble_arch) $(PWD)/$(trouble_arch)-index.xml
-	$(Q)xmllint --xinclude --noout --nonet --valid $(RENDERTMP)/dump-$(trouble_arch)
-	@echo "You can now look at $(RENDERTMP)/dump-$(trouble_arch) to see the errors"
+	  -o $(RENDERTMP)/dump-$(arch) $(PWD)/$(arch)-index.xml
+	$(Q)xmllint --xinclude --noout --nonet --valid $(RENDERTMP)/dump-$(arch)
+	@echo "You can now look at $(RENDERTMP)/dump-$(arch) to see the errors"
 
-$(ARCHS_DUMP): override dump_arch =  $(@:%$(S)dump=%)
+.PHONY: $(ARCHS_DUMP)
+$(ARCHS_DUMP): override arch =  $(@:%-dump=%)
 $(ARCHS_DUMP):
-	@echo "Extracting commands from $(dump_arch)..."
-	$(Q)mkdir -p $(DUMPDIR)/$(dump_arch)
-	$(Q)xsltproc --xinclude --nonet --output $(DUMPDIR)/$(dump_arch)/ \
-	  $(PWD)/stylesheets/dump-commands.xsl $(PWD)/$(dump_arch)-index.xml
+	@echo "Extracting commands from $(arch)..."
+	$(Q)mkdir -p $(DUMPDIR)/$(arch)
+	$(Q)xsltproc --xinclude --nonet --output $(DUMPDIR)/$(arch)/ \
+	  $(PWD)/stylesheets/dump-commands.xsl $(PWD)/$(arch)-index.xml
 
-$(ARCHS_DLLIST): override dllist_arch = $(@:%$(S)dllist=%)
+.PHONY: $(ARCHS_DLLIST)
+$(ARCHS_DLLIST): override arch = $(@:%-dllist=%)
 $(ARCHS_DLLIST):
-	@echo "Creating download list for $(dllist_arch)..."
+	@echo "Creating download list for $(arch)..."
 	$(Q)mkdir -p $(DLLISTDIR)
-	$(Q)xsltproc --xinclude --nonet --output $(DLLISTDIR)/$(dllist_arch)/dl.list \
-	  $(PWD)/stylesheets/wget.xsl $(PWD)/$(dllist_arch)-index.xml
+	$(Q)xsltproc --xinclude --nonet --output $(DLLISTDIR)/$(arch)/dl.list \
+	  $(PWD)/stylesheets/wget.xsl $(PWD)/$(arch)-index.xml
 
 help:
@@ -163,21 +178,21 @@
 	@echo
 	@echo "HTML Targets"
-	@echo -e "  \e[0;32mclfs lfs tidy render titlepage \e[0;34m$(ARCHS_HTML)\e[0;0m"
+	@echo "  $(FG_GREEN)clfs lfs tidy render titlepage $(FG_BLUE)$(ARCHS_HTML)$(FG_DEFAULT)"
 	@echo
 	@echo "NoChunks Targets"
-	@echo -e "  \e[0;32mnochunks tidy \e[0;34m$(ARCHS_NOCHUNKS)\e[0;0m"
+	@echo "  $(FG_GREEN)nochunks tidy $(FG_BLUE)$(ARCHS_NOCHUNKS)$(FG_DEFAULT)"
 	@echo
 	@echo "PDF Targets"
-	@echo -e "  \e[0;32mpdf \e[0;34m$(ARCHS_PDF)\e[0;0m"
+	@echo "  $(FG_GREEN)pdf $(FG_BLUE)$(ARCHS_PDF)$(FG_DEFAULT)"
 	@echo
 	@echo "Validate Targets"
-	@echo -e "  \e[0;32mvalidate \e[0;34m$(ARCHS_VALIDATE)\e[0;0m"
+	@echo "  $(FG_GREEN)validate $(FG_BLUE)$(ARCHS_VALIDATE)$(FG_DEFAULT)"
 	@echo
 	@echo "Trouble Targets"
-	@echo -e "  \e[0;32mtrouble \e[0;34m$(ARCHS_TROUBLE)\e[0;0m"
+	@echo "  $(FG_GREEN)trouble $(FG_BLUE)$(ARCHS_TROUBLE)$(FG_DEFAULT)"
 	@echo
 	@echo "Dump-Commands Targets"
-	@echo -e "  \e[0;32mdump-commands \e[0;34m$(ARCHS_DUMP)\e[0;0m"
+	@echo "  $(FG_GREEN)dump-commands $(FG_BLUE)$(ARCHS_DUMP)$(FG_DEFAULT)"
 	@echo
 	@echo "Download-List Targets"
-	@echo -e "  \e[0;32mdownload-list \e[0;34m$(ARCHS_DLLIST)\e[0;0m"
+	@echo "  $(FG_GREEN)download-list $(FG_BLUE)$(ARCHS_DLLIST)$(FG_DEFAULT)"
