cvs commit: ALFS/nALFS/doc/users_guide Makefile README

jwrober at linuxfromscratch.org jwrober at linuxfromscratch.org
Mon May 31 08:44:16 PDT 2004


jwrober     04/05/31 09:44:16

  Added:       nALFS/doc/users_guide Makefile README
  Log:
  * Adding new files for rendering
  
  Revision  Changes    Path
  1.1                  ALFS/nALFS/doc/users_guide/Makefile
  
  Index: Makefile
  ===================================================================
  OUTDIR=./output/
  XSLROOTDIR=/usr/share/docbook-xsl/
  
  clean:
  	if [ -e $(OUTDIR) ]; then \
  	  rm -rf $(OUTDIR); \
  	fi;
  
  	if [ -e nALFS-HACKERS-GUIDE ]; then \
  	  rm -rf nALFS-HACKERS-GUIDE; \
  	fi;
  
  dist-clean: clean
  	if [ -e *.bz2 ]; then \
  	  rm *.bz2; \
  	fi;
  
  	if [ -e *.html ]; then \
  	  rm *.html; \
  	fi;
  
  	if [ -e *.txt ]; then \
  	  rm *.txt; \
  	fi;
  
  common: clean
  	if [ ! -e $(OUTDIR) ]; then \
  	  mkdir -p $(OUTDIR); \
  	fi;
  
  chunks-html: common
  	if [ ! -e $(OUTDIR)stylesheets ]; then \
  	  mkdir -p $(OUTDIR)stylesheets; \
  	fi;
  
  	if [ ! -e $(OUTDIR)images ]; then \
  	  mkdir -p $(OUTDIR)images; \
  	fi;
  
  	sed -e "s at XSLROOTDIR@$(XSLROOTDIR)@" \
  	  stylesheets/alfs-chunked.xsl \
  	  > $(OUTDIR)stylesheets/alfs-chunked.xsl
  
  	xsltproc -nonet -stringparam base.dir $(OUTDIR) \
  	  $(OUTDIR)stylesheets/alfs-chunked.xsl \
  	  index.xml
  
  	cp stylesheets/alfs.css $(OUTDIR)stylesheets
  
  	cp $(XSLROOTDIR)images/*.png \
  	  $(OUTDIR)images
  
  	sed -i -e "s at ../stylesheets at stylesheets@" \
  	  $(OUTDIR)index.html
  
  	sed -i -e "s at ../stylesheets at ../../stylesheets@" \
  	  $(OUTDIR)introduction/welcome/*.html 
  
  	sed -i -e "s at images@../images at g" \
  	  $(OUTDIR)chapter01/*.html $(OUTDIR)introduction/*.html \
  	  $(OUTDIR)preface/*.html
  
  	sed -i -e "s at images@../../images at g" \
  	  $(OUTDIR)introduction/welcome/*.html
  
  	echo indent-spaces: 2 > $(OUTDIR)tidy.conf
  	echo wrap: 78 >> $(OUTDIR)tidy.conf
  	echo tab-size: 8 >> $(OUTDIR)tidy.conf
  	echo input-encoding: latin1 >> $(OUTDIR)tidy.conf
  	echo output-encoding: latin1 >> $(OUTDIR)tidy.conf
  	echo newline: CRLF >> $(OUTDIR)tidy.conf
  	echo write-back: yes >> $(OUTDIR)tidy.conf
  	echo markup: yes >> $(OUTDIR)tidy.conf
  	echo show-warnings: no >> $(OUTDIR)tidy.conf
  	echo quiet: yes >> $(OUTDIR)tidy.conf
  	echo indent: yes >> $(OUTDIR)tidy.conf
  	echo hide-endtags: no >> $(OUTDIR)tidy.conf
  	echo uppercase-tags: yes >> $(OUTDIR)tidy.conf
  	echo logical-emphasis: yes >> $(OUTDIR)tidy.conf
  	echo drop-font-tags: yes >> $(OUTDIR)tidy.conf
  	echo tidy-mark: no >> $(OUTDIR)tidy.conf
  	echo numeric-entities: yes >> $(OUTDIR)tidy.conf
  
  	bash stylesheets/goTidy $(OUTDIR)
  	rm $(OUTDIR)tidy.conf
  	rm $(OUTDIR)stylesheets/alfs-chunked.xsl
  	mv $(OUTDIR) nALFS-HACKERS-GUIDE
  
  	tar -cjvf nALFS-HACKERS-GUIDE-CVS-CHUNKS-html.tar.bz2 nALFS-HACKERS-GUIDE/*
  
  nochunks-html: common
  	sed -e "s at XSLROOTDIR@$(XSLROOTDIR)@" \
  	  stylesheets/alfs-onechunk.xsl \
  	  > $(OUTDIR)alfs-onechunk.xsl
  
  	xsltproc --nonet -stringparam base.dir $(OUTDIR) \
  	  $(OUTDIR)alfs-onechunk.xsl \
  	  index.xml
  
  	echo indent-spaces: 2 > $(OUTDIR)tidy.conf
  	echo wrap: 78 >> $(OUTDIR)tidy.conf
  	echo tab-size: 8 >> $(OUTDIR)tidy.conf
  	echo input-encoding: latin1 >> $(OUTDIR)tidy.conf
  	echo output-encoding: latin1 >> $(OUTDIR)tidy.conf
  	echo newline: CRLF >> $(OUTDIR)tidy.conf
  	echo write-back: yes >> $(OUTDIR)tidy.conf
  	echo markup: yes >> $(OUTDIR)tidy.conf
  	echo show-warnings: no >> $(OUTDIR)tidy.conf
  	echo quiet: yes >> $(OUTDIR)tidy.conf
  	echo indent: yes >> $(OUTDIR)tidy.conf
  	echo hide-endtags: no >> $(OUTDIR)tidy.conf
  	echo uppercase-tags: yes >> $(OUTDIR)tidy.conf
  	echo logical-emphasis: yes >> $(OUTDIR)tidy.conf
  	echo drop-font-tags: yes >> $(OUTDIR)tidy.conf
  	echo tidy-mark: no >> $(OUTDIR)tidy.conf
  	echo numeric-entities: yes >> $(OUTDIR)tidy.conf
  
  	bash stylesheets/goTidy $(OUTDIR)
  	rm $(OUTDIR)tidy.conf
  	rm $(OUTDIR)alfs-onechunk.xsl
  	mv $(OUTDIR)index.html nALFS-HACKERS-GUIDE-CVS-NOCHUNKS.html
  
  flat-text: nochunks-html
  	lynx -dump nALFS-HACKERS-GUIDE-CVS-NOCHUNKS.html > nALFS-HACKERS-GUIDE-CVS.txt
  
  .PHONY: clean dist-clean common chunks-html nochunks-html flat-text
  
  
  
  1.1                  ALFS/nALFS/doc/users_guide/README
  
  Index: README
  ===================================================================
  README for the ALFS syntax_doc module
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  0. Introduction
  ~~~~~~~~~~~~~~~
  
  This is a quick readme file on setting up the tools necessary to parse the
  nALFS Users Guide XML source into other formats (e.g. HTML or TXT).  If
  you do not want to do that, then you do not need to read this file.  The
  XML source is generally available for viewing and download on the LFS
  website at http://linuxfromscratch.org/alfs.
  
  1. Requirements
  ~~~~~~~~~~~~~~~
  
  * libxml2-2.6.10 or better
  	-- http://www.linuxfromscratch.org/blfs/view/cvs/general/libxml2.html
  
  * libxslt-1.1.6 or better
  	-- http://www.linuxfromscratch.org/blfs/view/cvs/general/libxslt.html
  
  * DocBook XML DTD-4.3
  	-- http://www.linuxfromscratch.org/blfs/view/cvs/pst/xml.html
  
  * DocBook XSL Stylesheets-1.65.1 or better 
  	-- http://www.linuxfromscratch.org/blfs/view/cvs/pst/docbook-xsl.html
  
  * lynx-2.8.5 or better
  	-- http://www.linuxfromscratch.org/blfs/view/cvs/basicnet/lynx.html
  
  2. Setting up the DTD
  ~~~~~~~~~~~~~~~~~~~~~
  
  Follow the steps in the BLFS book for all the packages listed above in the
  requirements section.  It is pretty simple.  The biggest thing is making
  sure that your /etc/xml/catalog and /etc/xml/docbook files are setup
  correctly.
  
  *** Note that the directory that the HTML files are output to
  can be altered by changing the OUTDIR variable at the top of the Makefile
  or by passing a new variable via the command line, ensuring that when you
  do so, you're new value has a trailing "/".  Also note that the directory
  that DocBook XSL is installed in can be altered by changing the XSLROOTDIR
  variable at the top of the Makefile.  This one is important as a sed later
  on won't work if you have this set wrong. ***
  
  3. Processing the sources
  ~~~~~~~~~~~~~~~~~~~~~~~~~
  
  By far the easiest way to process the source is by running 
  `make chunks-html`.  An explanation of the process follows:
  
  For the chunked HTML output, we run the top-level index.xml file through
  xsltproc in conjunction with the alfs-chunked.xsl stylesheet.  The
  index.xml file just has a bunch of entity instructions in it, which
  pulls in all the different chapters of the book.  The alfs-chunked
  stylesheet (in stylesheets/) is a customisation layer, on top of the
  docbook-xsl XHTML/chunked.xsl stylesheet.  It basically configures some
  layout related variables to tweak the output to the liking of the ALFS
  readership.  The majority of work is delegated to the docbook-xsl
  stylesheets.  HTML visual representation is provided by alfs.css also in
  the stylesheets/ directory.
  
  For the non-chunked HTML output, run `make nochunks-html`.  We do a lot of
  the same processing like the chunked version, except we use
  alfs-nochunks.xsl which like alfs-chunked.xsl is a customisation layer to
  onechunk.xsl provided by docbook-xsl.  The commnad for this one is `make
  nochunks-html`.
  
  For the flat text output, run `make flat-text`.  We run the nochunks-html
  target first and then pass the result through lynx. 
  
  
  
  
  



More information about the alfs-log mailing list