Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rc858ba4e rb6dd23c7  
    1 #BASEDIR = ~/lfs-book
    2 #SYSDDIR = ~/lfs-systemd
    3 #DUMPDIR = ~/lfs-commands
     1# vim:ts=3
    42RENDERTMP = $(HOME)/tmp
    53CHUNK_QUIET = 1
     
    2422
    2523ifeq ($(REV), sysv)
    26   BASEDIR         ?= ~/lfs-book
     24  BASEDIR         ?= $(HOME)/public_html/lfs-book
    2725  PDF_OUTPUT      ?= LFS-BOOK.pdf
    2826  NOCHUNKS_OUTPUT ?= LFS-BOOK.html
    29   DUMPDIR         ?= ~/lfs-commands
     27  DUMPDIR         ?= $(HOME)/lfs-commands
    3028else
    31   BASEDIR         ?= ~/lfs-systemd
     29  BASEDIR         ?= $(HOME)/public_html/lfs-systemd
    3230  PDF_OUTPUT      ?= LFS-SYSD-BOOK.pdf
    3331  NOCHUNKS_OUTPUT ?= LFS-SYSD-BOOK.html
    34   DUMPDIR         ?= ~/lfs-sysd-commands
     32  DUMPDIR         ?= $(HOME)/lfs-sysd-commands
    3533endif
    3634
     
    4745        $(Q)mkdir -p $(BASEDIR)/stylesheets
    4846        $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
    49         $(Q)sed -i 's|../stylesheet|stylesheet|' $(BASEDIR)/index.html
     47        $(Q)sed -e 's|../stylesheet|stylesheet|' \
     48           -i $(BASEDIR)/index.html
    5049
    5150        $(Q)mkdir -p $(BASEDIR)/images
     
    5554        $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
    5655         tidy -config tidy.conf $$filename;           \
    57          true;                                        \
    5856         /bin/bash obfuscate.sh $$filename;           \
    59          sed -e "s@text/html@application/xhtml+xml@g" \
    60              -e "s/\xa9/\©/ "                    \
     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)
    111         $(Q)sed -i -e "s@\xa9@\©@"                      $(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)
    112108
    113109        @echo "Output at $(BASEDIR)/$(NOCHUNKS_OUTPUT)"
     
    128124        $(Q)xsltproc --nonet                               \
    129125                --xinclude                            \
     126                --stringparam profile.revision $(REV) \
    130127                --output $(RENDERTMP)/lfs-html2.xml   \
    131                 --stringparam profile.revision $(REV) \
    132128                stylesheets/lfs-xsl/profile.xsl       \
    133129                index.xml
    134130
    135131        @echo "Validating the book..."
    136         $(Q)xmllint --nonet                      \
    137                --noent                      \
    138                --postvalid                  \
    139                -o $(RENDERTMP)/lfs-full.xml \
     132        $(Q)xmllint --nonet                            \
     133               --encode UTF-8                     \
     134               --postvalid                        \
     135               --output $(RENDERTMP)/lfs-full.xml \
    140136               $(RENDERTMP)/lfs-html2.xml
    141137
     
    152148                $(RENDERTMP)/lfs-full.xml
    153149
     150DOWNLOADS_DEP = chapter03/packages.xml chapter03/patches.xml \
     151                packages.ent patches.ent general.ent
     152
    154153wget-list: $(BASEDIR)/wget-list $(BASEDIR)/wget-list-$(REV)
    155 $(BASEDIR)/wget-list: stylesheets/wget-list.xsl chapter03/chapter03.xml \
    156                       packages.ent patches.ent general.ent
     154$(BASEDIR)/wget-list: stylesheets/wget-list.xsl $(DOWNLOADS_DEP)
    157155        @echo "Generating consolidated wget list at $(BASEDIR)/wget-list ..."
    158156        $(Q)mkdir -p $(BASEDIR)
    159         $(Q)xsltproc --xinclude --nonet            \
     157        $(Q)xsltproc --nonet                       \
     158                --xinclude                    \
    160159                --output $(BASEDIR)/wget-list \
    161160                stylesheets/wget-list.xsl     \
    162161                chapter03/chapter03.xml
    163162
    164 $(BASEDIR)/wget-list-$(REV): stylesheets/wget-list.xsl \
    165                              chapter03/chapter03.xml \
    166                              packages.ent patches.ent general.ent
    167         $(Q)xsltproc --nonet --xinclude                   \
     163$(BASEDIR)/wget-list-$(REV): stylesheets/wget-list.xsl $(DOWNLOADS_DEP)
     164        $(Q)xsltproc --nonet                               \
     165                --xinclude                            \
    168166                --stringparam profile.revision $(REV) \
    169167                --output $(RENDERTMP)/wget-list.xml   \
    170168                stylesheets/lfs-xsl/profile.xsl       \
    171169                chapter03/chapter03.xml
    172         $(Q)xsltproc --xinclude --nonet                  \
     170
     171        $(Q)xsltproc --nonet                              \
    173172                --output $(BASEDIR)/wget-list-$(REV) \
    174173                stylesheets/wget-list.xsl            \
     
    176175
    177176md5sums: $(BASEDIR)/md5sums
    178 $(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \
    179                     packages.ent patches.ent
     177$(BASEDIR)/md5sums: stylesheets/wget-list.xsl $(DOWNLOADS_DEP)
    180178        @echo "Generating consolidated md5sum file at $(BASEDIR)/md5sums ..."
    181179        $(Q)mkdir -p $(BASEDIR)
    182180
    183         $(Q)xsltproc --nonet --xinclude                   \
     181        $(Q)xsltproc --nonet                               \
     182                --xinclude                            \
    184183                --stringparam profile.revision $(REV) \
    185184                --output $(RENDERTMP)/md5sum.xml      \
     
    187186                chapter03/chapter03.xml
    188187
    189         $(Q)xsltproc --xinclude --nonet         \
     188        $(Q)xsltproc --nonet                     \
    190189                --output $(BASEDIR)/md5sums \
    191190                stylesheets/md5sum.xsl      \
Note: See TracChangeset for help on using the changeset viewer.