[lfs-fr] r1095 - in trunk/clfs: . temp-system/multilib

jmengual at linuxfromscratch.org jmengual at linuxfromscratch.org
Sam 2 Jan 16:00:24 PST 2010


Author: jmengual
Date: 2010-01-03 01:00:23 +0100 (Sun, 03 Jan 2010)
New Revision: 1095

Added:
   trunk/clfs/tidy.sh
Modified:
   trunk/clfs/Makefile
   trunk/clfs/temp-system/multilib/bison.xml
   trunk/clfs/temp-system/multilib/choose.xml
   trunk/clfs/temp-system/multilib/flex.xml
Log:
Traduction par appzer0


Modified: trunk/clfs/Makefile
===================================================================
--- trunk/clfs/Makefile	2010-01-01 23:39:26 UTC (rev 1094)
+++ trunk/clfs/Makefile	2010-01-03 00:00:23 UTC (rev 1095)
@@ -1,15 +1,22 @@
-BASEDIR		:= ~/cross-lfs-book
-DUMPDIR		:= ~/cross-lfs-commands
-DLLISTDIR	:= ~/cross-lfs-dllist
-RENDERTMP       := $(HOME)/tmp
+TOP		:= $(PWD)
+
+WORKDIR		:= $(TOP)/render-output
+
+BASEDIR		:= $(WORKDIR)/cross-lfs-book
+DUMPDIR		:= $(WORKDIR)/cross-lfs-commands
+DLLISTDIR	:= $(WORKDIR)/cross-lfs-dllist
+RENDERTMP       := $(WORKDIR)/tmp
 CHUNK_QUIET	:= 1
-ROOT_ID         :=
+ROOT_ID	 :=
 
 S		:= -
 
 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)
@@ -24,106 +31,98 @@
   Q = @
 endif
 
-.PHONY: lfs tidy render titlepage $(ARCHS_HTML) nochunks $(ARCHS_NOCHUNKS) pdf \
-	$(ARCHS_PDF) validate $(ARCHS_VALIDATE) trouble $(ARCHS_TROUBLE) \
-	dump-commands $(ARCHS_DUMP) download-list $(ARCHS_DLLIST) tmpdir
+.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
 
-lfs: tmpdir render tidy
+clfs lfs: tmpdir render
+render: $(ARCHS_HTML) titlepage
+nochunks: tmpdir $(ARCHS_NOCHUNKS)
+pdf: tmpdir $(ARCHS_PDF)
+validate: $(ARCHS_VALIDATE)
+trouble: tmpdir $(ARCHS_TROUBLE)
+dump-commands: $(ARCHS_DUMP)
+download-list: $(ARCHS_DLLIST)
 
 tmpdir:
-	@echo "Creating and cleaning $(RENDERTMP)"
 	$(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
-	$(Q)rm -f $(RENDERTMP)/*-{full,html,pdf}.xml
-	$(Q)rm -f $(RENDERTMP)/*.fo
 
 ifeq ($(shell which tidy >/dev/null 2>&1 && echo yes),yes)
 tidy:
-	@echo "Running tidy on the created HTML"
-	$(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
-	  tidy -config $(PWD)/tidy.conf $$filename; \
-	  true; \
-	  bash $(PWD)/obfuscate.sh $$filename; \
-	  sed -i -e "s at text/html at application/xhtml+xml at g" $$filename; \
-	done;
+	@$(MAKE) --no-print-directory tidy-d TIDY_DIR=$(BASEDIR)
+
+tidy-f:
+	@echo "Running tidy on F:$(shell basename $(TIDY_FILE))"
+	@$(TOP)/tidy.sh "$(TIDY_FILE)"
+
+tidy-d:
+	@echo "Running tidy on D:$(shell basename $(TIDY_DIR))"
+	@$(TOP)/tidy.sh "$(TIDY_DIR)"
 else
-tidy:
+tidy tidy-f tidy-d:
 	@echo "Tidy is not installed on this system"
 endif
 
-render: $(ARCHS_HTML) titlepage
-
 titlepage:
+	@echo "Rendering the top-level index..."
 	$(Q)xsltproc --nonet --output $(BASEDIR)/index.html \
 	  $(PWD)/stylesheets/top-index.xsl $(PWD)/index.xml
+	@$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/index.html
 
-$(ARCHS_HTML): override html_arch = $(@:%$(S)html=%)
-$(ARCHS_HTML):
-	@echo "Validating $(html_arch) book..."
+$(ARCHS_VD_XML): override validate_dump_xml_arch = $(@:%-validate_dump-xml=%)
+$(ARCHS_VD_XML): tmpdir
+	@echo "Validating $(validate_dump_xml_arch) book..."
 	$(Q)xmllint --nonet --noent --xinclude --postvalid \
-	  -o $(RENDERTMP)/$(html_arch)-full.xml $(PWD)/$(html_arch)-index.xml
+	  -o $(RENDERTMP)/$(validate_dump_xml_arch)-full.xml $(PWD)/$(validate_dump_xml_arch)-index.xml
 
-	@echo "Generating profiled $(html_arch) book for XHTML..."
+$(ARCHS_P_XML): override profiled_xml_arch = $(@:%-profiled-xml=%)
+$(ARCHS_P_XML): tmpdir
+	@$(MAKE) --no-print-directory $(profiled_xml_arch)-validate_dump-xml
+
+	@echo "Generating profiled $(profiled_xml_arch) book for XHTML..."
 	$(Q)xsltproc --nonet --stringparam profile.condition html \
-	  --output $(RENDERTMP)/$(html_arch)-html.xml \
-	  $(PWD)/stylesheets/lfs-xsl/profile.xsl $(RENDERTMP)/$(html_arch)-full.xml
+	  --output $(RENDERTMP)/$(profiled_xml_arch)-html.xml \
+	  $(PWD)/stylesheets/lfs-xsl/profile.xsl $(RENDERTMP)/$(profiled_xml_arch)-full.xml
 
+$(ARCHS_HTML): override html_arch = $(@:%$(S)html=%)
+$(ARCHS_HTML): tmpdir
+	@$(MAKE) --no-print-directory $(html_arch)-profiled-xml
+
 	@echo "Rendering chunked XHTML of $(html_arch)..."
 	$(Q)mkdir -p $(BASEDIR)/$(html_arch)
 	$(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
+	  -stringparam paper.type A4 \
 	  -stringparam rootid "$(ROOT_ID)" \
 	  -stringparam base.dir $(BASEDIR)/$(html_arch)/ \
 	  $(PWD)/stylesheets/clfs-chunked.xsl $(RENDERTMP)/$(html_arch)-html.xml
 
-	@echo "Copying CSS code and images..."
+	@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 at ../stylesheets at 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 at ../images at images@g" $(BASEDIR)/$(html_arch)/*.html
-	$(Q)$(MAKE) ARCHS=$(html_arch) DLLISTDIR=$(BASEDIR) download-list
 
-nochunks: tmpdir $(ARCHS_NOCHUNKS) tidy
+	@$(MAKE) --no-print-directory tidy-d TIDY_DIR=$(BASEDIR)/$(html_arch)
 
 $(ARCHS_NOCHUNKS): override nochunk_arch = $(@:%$(S)nochunks=%)
-$(ARCHS_NOCHUNKS):
-	@echo "Validating $(nochunk_arch) book..."
-	$(Q)xmllint --nonet --noent --xinclude --postvalid \
-	  -o $(RENDERTMP)/$(nochunk_arch)-full.xml $(PWD)/$(nochunk_arch)-index.xml
+$(ARCHS_NOCHUNKS): tmpdir
+	@$(MAKE) --no-print-directory $(nochunk_arch)-profiled-xml
 
-	@echo "Generating profiled $(nochunk_arch) book for XHTML..."
-	$(Q)xsltproc --nonet --stringparam profile.condition html \
-	  --output $(RENDERTMP)/$(nochunk_arch)-html.xml \
-	  $(PWD)/stylesheets/lfs-xsl/profile.xsl \
-	  $(RENDERTMP)/$(nochunk_arch)-full.xml
-
 	@echo "Rendering Single File HTML of $(nochunk_arch)..."
 	$(Q)mkdir -p $(BASEDIR)
 	$(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
+		-stringparam paper.type A4 \
 	  --output $(BASEDIR)/CLFS-$(nochunk_arch).html \
 	  $(PWD)/stylesheets/clfs-nochunks.xsl $(RENDERTMP)/$(nochunk_arch)-html.xml
 
-	@echo "Running Tidy..."
-	$(Q)tidy -config $(PWD)/tidy.conf $(BASEDIR)/CLFS-$(nochunk_arch).html || true
-	@echo "Running obfuscate.sh..."
-	$(Q)bash $(PWD)/obfuscate.sh $(BASEDIR)/CLFS-$(nochunk_arch).html
-	$(Q)sed -i -e "s at text/html at application/xhtml+xml at g"  \
-	  $(BASEDIR)/CLFS-$(nochunk_arch).html
+	@$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(BASEDIR)/CLFS-$(nochunk_arch).html
 
-pdf: tmpdir $(ARCHS_PDF)
-
 $(ARCHS_PDF): override pdf_arch =  $(@:%$(S)pdf=%)
-$(ARCHS_PDF):
-	@echo "Validating $(pdf_arch) book..."
-	$(Q)xmllint --nonet --noent --xinclude --postvalid \
-	  -o $(RENDERTMP)/$(pdf_arch)-full.xml $(PWD)/$(pdf_arch)-index.xml
+$(ARCHS_PDF): tmpdir
+	@$(MAKE) --no-print-directory $(pdf_arch)-profiled-xml
 
-	@echo "Generating profiled $(pdf_arch) book for PDF..."
-	$(Q)xsltproc --nonet --stringparam profile.condition pdf \
-	  --output $(RENDERTMP)/$(pdf_arch)-pdf.xml \
-	  $(PWD)/stylesheets/lfs-xsl/profile.xsl \
-	  $(RENDERTMP)/$(pdf_arch)-full.xml
-
 	@echo "Generating FO file of $(pdf_arch)..."
 	$(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
 	  --output $(RENDERTMP)/$(pdf_arch).fo $(PWD)/stylesheets/clfs-pdf.xsl \
@@ -134,25 +133,19 @@
 	$(Q)mkdir -p $(BASEDIR)
 	$(Q)fop $(RENDERTMP)/$(pdf_arch).fo $(BASEDIR)/CLFS-$(pdf_arch).pdf
 
-validate: $(ARCHS_VALIDATE)
-
 $(ARCHS_VALIDATE): override validate_arch =  $(@:%$(S)validate=%)
 $(ARCHS_VALIDATE):
 	@echo "Validating $(validate_arch)..."
 	$(Q)xmllint --xinclude --noout --nonet --postvalid $(PWD)/$(validate_arch)-index.xml
 
-trouble: tmpdir $(ARCHS_TROUBLE)
-
 $(ARCHS_TROUBLE): override trouble_arch =  $(@:%$(S)trouble=%)
-$(ARCHS_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"
 
-dump-commands: $(ARCHS_DUMP)
-
 $(ARCHS_DUMP): override dump_arch =  $(@:%$(S)dump=%)
 $(ARCHS_DUMP):
 	@echo "Extracting commands from $(dump_arch)..."
@@ -160,8 +153,6 @@
 	$(Q)xsltproc --xinclude --nonet --output $(DUMPDIR)/$(dump_arch)/ \
 	  $(PWD)/stylesheets/dump-commands.xsl $(PWD)/$(dump_arch)-index.xml
 
-download-list: $(ARCHS_DLLIST)
-
 $(ARCHS_DLLIST): override dllist_arch = $(@:%$(S)dllist=%)
 $(ARCHS_DLLIST):
 	@echo "Creating download list for $(dllist_arch)..."
@@ -170,8 +161,10 @@
 	  $(PWD)/stylesheets/wget.xsl $(PWD)/$(dllist_arch)-index.xml
 
 help:
+	@echo "Output: $(WORKDIR)"
+	@echo
 	@echo "HTML Targets"
-	@echo -e "  \e[0;32mlfs tidy render titlepage \e[0;34m$(ARCHS_HTML)\e[0;0m"
+	@echo -e "  \e[0;32mclfs lfs tidy render titlepage \e[0;34m$(ARCHS_HTML)\e[0;0m"
 	@echo
 	@echo "NoChunks Targets"
 	@echo -e "  \e[0;32mnochunks tidy \e[0;34m$(ARCHS_NOCHUNKS)\e[0;0m"

Modified: trunk/clfs/temp-system/multilib/bison.xml
===================================================================
--- trunk/clfs/temp-system/multilib/bison.xml	2010-01-01 23:39:26 UTC (rev 1094)
+++ trunk/clfs/temp-system/multilib/bison.xml	2010-01-03 00:00:23 UTC (rev 1095)
@@ -12,7 +12,7 @@
 
   <indexterm zone="ch-temp-system-bison">
     <primary sortas="a-Bison">Bison</primary>
-    <secondary>temporary system</secondary>
+    <secondary>système temporaire</secondary>
   </indexterm>
 
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"

Modified: trunk/clfs/temp-system/multilib/choose.xml
===================================================================
--- trunk/clfs/temp-system/multilib/choose.xml	2010-01-01 23:39:26 UTC (rev 1094)
+++ trunk/clfs/temp-system/multilib/choose.xml	2010-01-03 00:00:23 UTC (rev 1095)
@@ -26,8 +26,7 @@
 /tools/lib64/libc.so.6
 /tools/bin/gcc -v</userinput></screen>
 
-  <para os="d">If any of these commands fail, you will have to follow the boot
-  method.</para>
+  <para os="d">Si l'une de ces commandes échoue, vous devrez choisir la méthode du démarrage.</para>
 
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"

Modified: trunk/clfs/temp-system/multilib/flex.xml
===================================================================
--- trunk/clfs/temp-system/multilib/flex.xml	2010-01-01 23:39:26 UTC (rev 1094)
+++ trunk/clfs/temp-system/multilib/flex.xml	2010-01-03 00:00:23 UTC (rev 1095)
@@ -12,7 +12,7 @@
 
   <indexterm zone="ch-temp-system-flex">
     <primary sortas="a-Flex">Flex</primary>
-    <secondary>temporary system</secondary>
+    <secondary>système temporaire</secondary>
   </indexterm>
 
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"

Added: trunk/clfs/tidy.sh
===================================================================
--- trunk/clfs/tidy.sh	                        (rev 0)
+++ trunk/clfs/tidy.sh	2010-01-03 00:00:23 UTC (rev 1095)
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Written By: Joe Ciccone <jciccone at gmail.com>
+
+if test -z "$1"; then
+  echo "Usage: $0 path"
+  exit 1
+fi
+
+TOP=`dirname $0`
+
+if test -d "$1"; then
+  find "$1" -type f -name \*.html | while read file; do
+    tidy -config "${TOP}/tidy.conf" "$file"
+    bash "${TOP}/obfuscate.sh" "$file"
+    sed -i -e "s at text/html at application/xhtml+xml at g" "$file"
+  done
+else
+  tidy -config "${TOP}/tidy.conf" "$1"
+    bash "${TOP}/obfuscate.sh" "$1"
+    sed -i -e "s at text/html at application/xhtml+xml at g" "$1"
+fi
+
+exit $?


Property changes on: trunk/clfs/tidy.sh
___________________________________________________________________
Added: svn:executable
   + *




More information about the lfs-traducfr mailing list