Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r47bc996 rb6dd23c7  
    11# vim:ts=3
    2 #BASEDIR = ~/lfs-book
    3 #SYSDDIR = ~/lfs-systemd
    4 #DUMPDIR = ~/lfs-commands
    52RENDERTMP = $(HOME)/tmp
    63CHUNK_QUIET = 1
     
    2522
    2623ifeq ($(REV), sysv)
    27   BASEDIR         ?= ~/public_html/lfs-book
     24  BASEDIR         ?= $(HOME)/public_html/lfs-book
    2825  PDF_OUTPUT      ?= LFS-BOOK.pdf
    2926  NOCHUNKS_OUTPUT ?= LFS-BOOK.html
    30   DUMPDIR         ?= ~/lfs-commands
     27  DUMPDIR         ?= $(HOME)/lfs-commands
    3128else
    32   BASEDIR         ?= ~/public_html/lfs-systemd
     29  BASEDIR         ?= $(HOME)/public_html/lfs-systemd
    3330  PDF_OUTPUT      ?= LFS-SYSD-BOOK.pdf
    3431  NOCHUNKS_OUTPUT ?= LFS-SYSD-BOOK.html
    35   DUMPDIR         ?= ~/lfs-sysd-commands
     32  DUMPDIR         ?= $(HOME)/lfs-sysd-commands
    3633endif
    3734
     
    4845        $(Q)mkdir -p $(BASEDIR)/stylesheets
    4946        $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
    50         $(Q)sed -i 's|../stylesheet|stylesheet|' $(BASEDIR)/index.html
     47        $(Q)sed -e 's|../stylesheet|stylesheet|' \
     48           -i $(BASEDIR)/index.html
    5149
    5250        $(Q)mkdir -p $(BASEDIR)/images
     
    5654        $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
    5755         tidy -config tidy.conf $$filename;           \
    58          true;                                        \
    5956         /bin/bash obfuscate.sh $$filename;           \
    60          sed -e "s@text/html@application/xhtml+xml@g" \
     57         sed -e "s|text/html|application/xhtml+xml|g" \
    6158             -i $$filename;                           \
    62    done;
     59       done
    6360
    6461        $(Q)$(MAKE) --no-print-directory wget-list md5sums
     
    9996                stylesheets/lfs-nochunks.xsl           \
    10097                $(RENDERTMP)/lfs-html.xml
    101 #                $(RENDERTMP)/lfs-html2.xml
    10298
    10399        @echo "Running Tidy..."
    104         $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
     100        $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || test $$? -le 1
    105101
    106102        @echo "Running obfuscate.sh..."
    107         $(Q)bash obfuscate.sh                                $(BASEDIR)/$(NOCHUNKS_OUTPUT)
    108         $(Q)sed -i -e "s@text/html@application/xhtml+xml@g"  $(BASEDIR)/$(NOCHUNKS_OUTPUT)
    109         $(Q)sed -i -e "s@../wget-list@wget-list@"            $(BASEDIR)/$(NOCHUNKS_OUTPUT)
    110         $(Q)sed -i -e "s@../md5sums@md5sums@"                $(BASEDIR)/$(NOCHUNKS_OUTPUT)
     103        $(Q)bash obfuscate.sh      $(BASEDIR)/$(NOCHUNKS_OUTPUT)
     104        $(Q)sed -e "s|text/html|application/xhtml+xml|g" \
     105           -e "s|../wget-list|wget-list|"           \
     106           -e "s|../md5sums|md5sums|"               \
     107           -i $(BASEDIR)/$(NOCHUNKS_OUTPUT)
    111108
    112109        @echo "Output at $(BASEDIR)/$(NOCHUNKS_OUTPUT)"
     
    127124        $(Q)xsltproc --nonet                               \
    128125                --xinclude                            \
     126                --stringparam profile.revision $(REV) \
    129127                --output $(RENDERTMP)/lfs-html2.xml   \
    130                 --stringparam profile.revision $(REV) \
    131128                stylesheets/lfs-xsl/profile.xsl       \
    132129                index.xml
    133130
    134131        @echo "Validating the book..."
    135         $(Q)xmllint --nonet                      \
    136                --noent                      \
    137                --postvalid                  \
    138                -o $(RENDERTMP)/lfs-full.xml \
     132        $(Q)xmllint --nonet                            \
     133               --encode UTF-8                     \
     134               --postvalid                        \
     135               --output $(RENDERTMP)/lfs-full.xml \
    139136               $(RENDERTMP)/lfs-html2.xml
    140137
     
    158155        @echo "Generating consolidated wget list at $(BASEDIR)/wget-list ..."
    159156        $(Q)mkdir -p $(BASEDIR)
    160         $(Q)xsltproc --xinclude --nonet            \
     157        $(Q)xsltproc --nonet                       \
     158                --xinclude                    \
    161159                --output $(BASEDIR)/wget-list \
    162160                stylesheets/wget-list.xsl     \
     
    164162
    165163$(BASEDIR)/wget-list-$(REV): stylesheets/wget-list.xsl $(DOWNLOADS_DEP)
    166         $(Q)xsltproc --nonet --xinclude                   \
     164        $(Q)xsltproc --nonet                               \
     165                --xinclude                            \
    167166                --stringparam profile.revision $(REV) \
    168167                --output $(RENDERTMP)/wget-list.xml   \
    169168                stylesheets/lfs-xsl/profile.xsl       \
    170169                chapter03/chapter03.xml
    171         $(Q)xsltproc --xinclude --nonet                  \
     170
     171        $(Q)xsltproc --nonet                              \
    172172                --output $(BASEDIR)/wget-list-$(REV) \
    173173                stylesheets/wget-list.xsl            \
     
    179179        $(Q)mkdir -p $(BASEDIR)
    180180
    181         $(Q)xsltproc --nonet --xinclude                   \
     181        $(Q)xsltproc --nonet                               \
     182                --xinclude                            \
    182183                --stringparam profile.revision $(REV) \
    183184                --output $(RENDERTMP)/md5sum.xml      \
     
    185186                chapter03/chapter03.xml
    186187
    187         $(Q)xsltproc --xinclude --nonet         \
     188        $(Q)xsltproc --nonet                     \
    188189                --output $(BASEDIR)/md5sums \
    189190                stylesheets/md5sum.xsl      \
Note: See TracChangeset for help on using the changeset viewer.