Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rb6dd23c7 rc858ba4e  
    1 # vim:ts=3
     1#BASEDIR = ~/lfs-book
     2#SYSDDIR = ~/lfs-systemd
     3#DUMPDIR = ~/lfs-commands
    24RENDERTMP = $(HOME)/tmp
    35CHUNK_QUIET = 1
     
    2224
    2325ifeq ($(REV), sysv)
    24   BASEDIR         ?= $(HOME)/public_html/lfs-book
     26  BASEDIR         ?= ~/lfs-book
    2527  PDF_OUTPUT      ?= LFS-BOOK.pdf
    2628  NOCHUNKS_OUTPUT ?= LFS-BOOK.html
    27   DUMPDIR         ?= $(HOME)/lfs-commands
     29  DUMPDIR         ?= ~/lfs-commands
    2830else
    29   BASEDIR         ?= $(HOME)/public_html/lfs-systemd
     31  BASEDIR         ?= ~/lfs-systemd
    3032  PDF_OUTPUT      ?= LFS-SYSD-BOOK.pdf
    3133  NOCHUNKS_OUTPUT ?= LFS-SYSD-BOOK.html
    32   DUMPDIR         ?= $(HOME)/lfs-sysd-commands
     34  DUMPDIR         ?= ~/lfs-sysd-commands
    3335endif
    3436
     
    4547        $(Q)mkdir -p $(BASEDIR)/stylesheets
    4648        $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
    47         $(Q)sed -e 's|../stylesheet|stylesheet|' \
    48            -i $(BASEDIR)/index.html
     49        $(Q)sed -i 's|../stylesheet|stylesheet|' $(BASEDIR)/index.html
    4950
    5051        $(Q)mkdir -p $(BASEDIR)/images
     
    5455        $(Q)for filename in `find $(BASEDIR) -name "*.html"`; do \
    5556         tidy -config tidy.conf $$filename;           \
     57         true;                                        \
    5658         /bin/bash obfuscate.sh $$filename;           \
    57          sed -e "s|text/html|application/xhtml+xml|g" \
     59         sed -e "s@text/html@application/xhtml+xml@g" \
     60             -e "s/\xa9/\©/ "                    \
    5861             -i $$filename;                           \
    59        done
     62   done;
    6063
    6164        $(Q)$(MAKE) --no-print-directory wget-list md5sums
     
    9699                stylesheets/lfs-nochunks.xsl           \
    97100                $(RENDERTMP)/lfs-html.xml
     101#                $(RENDERTMP)/lfs-html2.xml
    98102
    99103        @echo "Running Tidy..."
    100         $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || test $$? -le 1
     104        $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
    101105
    102106        @echo "Running obfuscate.sh..."
    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)
     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)
    108112
    109113        @echo "Output at $(BASEDIR)/$(NOCHUNKS_OUTPUT)"
     
    124128        $(Q)xsltproc --nonet                               \
    125129                --xinclude                            \
     130                --output $(RENDERTMP)/lfs-html2.xml   \
    126131                --stringparam profile.revision $(REV) \
    127                 --output $(RENDERTMP)/lfs-html2.xml   \
    128132                stylesheets/lfs-xsl/profile.xsl       \
    129133                index.xml
    130134
    131135        @echo "Validating the book..."
    132         $(Q)xmllint --nonet                            \
    133                --encode UTF-8                     \
    134                --postvalid                        \
    135                --output $(RENDERTMP)/lfs-full.xml \
     136        $(Q)xmllint --nonet                      \
     137               --noent                      \
     138               --postvalid                  \
     139               -o $(RENDERTMP)/lfs-full.xml \
    136140               $(RENDERTMP)/lfs-html2.xml
    137141
     
    148152                $(RENDERTMP)/lfs-full.xml
    149153
    150 DOWNLOADS_DEP = chapter03/packages.xml chapter03/patches.xml \
    151                 packages.ent patches.ent general.ent
    152 
    153154wget-list: $(BASEDIR)/wget-list $(BASEDIR)/wget-list-$(REV)
    154 $(BASEDIR)/wget-list: stylesheets/wget-list.xsl $(DOWNLOADS_DEP)
     155$(BASEDIR)/wget-list: stylesheets/wget-list.xsl chapter03/chapter03.xml \
     156                      packages.ent patches.ent general.ent
    155157        @echo "Generating consolidated wget list at $(BASEDIR)/wget-list ..."
    156158        $(Q)mkdir -p $(BASEDIR)
    157         $(Q)xsltproc --nonet                       \
    158                 --xinclude                    \
     159        $(Q)xsltproc --xinclude --nonet            \
    159160                --output $(BASEDIR)/wget-list \
    160161                stylesheets/wget-list.xsl     \
    161162                chapter03/chapter03.xml
    162163
    163 $(BASEDIR)/wget-list-$(REV): stylesheets/wget-list.xsl $(DOWNLOADS_DEP)
    164         $(Q)xsltproc --nonet                               \
    165                 --xinclude                            \
     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                   \
    166168                --stringparam profile.revision $(REV) \
    167169                --output $(RENDERTMP)/wget-list.xml   \
    168170                stylesheets/lfs-xsl/profile.xsl       \
    169171                chapter03/chapter03.xml
    170 
    171         $(Q)xsltproc --nonet                              \
     172        $(Q)xsltproc --xinclude --nonet                  \
    172173                --output $(BASEDIR)/wget-list-$(REV) \
    173174                stylesheets/wget-list.xsl            \
     
    175176
    176177md5sums: $(BASEDIR)/md5sums
    177 $(BASEDIR)/md5sums: stylesheets/wget-list.xsl $(DOWNLOADS_DEP)
     178$(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \
     179                    packages.ent patches.ent
    178180        @echo "Generating consolidated md5sum file at $(BASEDIR)/md5sums ..."
    179181        $(Q)mkdir -p $(BASEDIR)
    180182
    181         $(Q)xsltproc --nonet                               \
    182                 --xinclude                            \
     183        $(Q)xsltproc --nonet --xinclude                   \
    183184                --stringparam profile.revision $(REV) \
    184185                --output $(RENDERTMP)/md5sum.xml      \
     
    186187                chapter03/chapter03.xml
    187188
    188         $(Q)xsltproc --nonet                     \
     189        $(Q)xsltproc --xinclude --nonet         \
    189190                --output $(BASEDIR)/md5sums \
    190191                stylesheets/md5sum.xsl      \
Note: See TracChangeset for help on using the changeset viewer.