Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r869909a r28909b72  
    22# By Tushar Teredesai <tushar@linuxfromscratch.org>
    33# 2004-01-31
    4 # $LastChangedBy$
    5 # $Date$
    64
    75# Adjust these to suit your installation
     
    5250blfs: html wget-list
    5351
     52help:
     53        @echo ""
     54        @echo "make <parameters> <targets>"
     55        @echo ""
     56        @echo "Parameters:"
     57        @echo "  REV=<rev>            Build variation of book"
     58        @echo "                       Valid values for REV are:"
     59        @echo "                       * sysv    - Build book for SysV"
     60        @echo "                       * systemd - Build book for systemd"
     61        @echo "                       Defaults to 'sysv'"
     62        @echo ""
     63        @echo "  BASEDIR=<dir>        Put the output in directory <dir>."
     64        @echo "                       Defaults to"
     65        @echo "                       'HOME/public_html/blfs-book' if REV=sysv (or unset)"
     66        @echo "                       or to"
     67        @echo "                       'HOME/public_html/blfs-book-systemd' if REV=systemd"
     68        @echo ""
     69        @echo "  V=<val>              If <val> is a non-empty value, all"
     70        @echo "                       steps to produce the output is shown."
     71        @echo "                       Default is unset."
     72        @echo ""
     73        @echo "Targets:"
     74        @echo "  help                 Show this help text."
     75        @echo ""
     76        @echo "  blfs                 Builds targets 'html' and 'wget-list'."
     77        @echo ""
     78        @echo "  html                 Builds the HTML pages of the book."
     79        @echo ""
     80        @echo "  wget-list            Produces a list of all packages to download."
     81        @echo "                       Output is BASEDIR/wget-list"
     82        @echo ""
     83        @echo "  nochunks             Builds the book as a one-pager. The output"
     84        @echo "                       is a large single HTML page containing the"
     85        @echo "                       whole book."
     86        @echo ""
     87        @echo "                       Parameter NOCHUNKS_OUTPUT=<filename> controls"
     88        @echo "                       the name of the HTML file."
     89        @echo ""
     90        @echo "  validate             Runs validation checks on the XML files."
     91        @echo ""
     92        @echo "  test-links           Runs validation checks on URLs in the book."
     93        @echo "                       Produces a file named BASEDIR/bad_urls containing"
     94        @echo "                       URLS which are invalid and a BASEDIR/good_urls"
     95        @echo "                       containing all valid URLs."
     96        @echo ""
     97
    5498all: blfs nochunks
    5599world: all blfs-patch-list dump-commands test-links
    56100
    57101html: $(BASEDIR)/index.html
    58 $(BASEDIR)/index.html: $(RENDERTMP)/$(BLFSHTML)
     102$(BASEDIR)/index.html: $(RENDERTMP)/$(BLFSHTML) version
    59103        @echo "Generating chunked XHTML files..."
    60104        $(Q)xsltproc --nonet                                    \
     
    71115
    72116        $(Q)cp stylesheets/lfs-xsl/*.css $(BASEDIR)/stylesheets
     117        $(Q)sed -i 's|../stylesheet|stylesheet|' $(BASEDIR)/index.html
    73118
    74119        $(Q)if [ ! -e $(BASEDIR)/images ]; then \
     
    85130      true;                                                       \
    86131      bash obfuscate.sh $$filename;                               \
    87       sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
     132      sed -i -e "1,20s@text/html@application/xhtml+xml@g" $$filename; \
    88133   done;
    89134
    90135nochunks: $(BASEDIR)/$(NOCHUNKS_OUTPUT)
    91 $(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/$(BLFSHTML)
     136$(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/$(BLFSHTML) version
    92137        @echo "Generating non-chunked XHTML file..."
    93138        $(Q)xsltproc --nonet                                \
     
    100145        $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
    101146        $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)
    102         $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
     147        $(Q)sed -i -e "1,20s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
    103148
    104149tmpdir: $(RENDERTMP)
     
    112157
    113158validate: $(RENDERTMP)/$(BLFSFULL)
    114 $(RENDERTMP)/$(BLFSFULL): general.ent packages.ent $(ALLXML) $(ALLXSL)
     159$(RENDERTMP)/$(BLFSFULL): general.ent packages.ent $(ALLXML) $(ALLXSL) version
    115160        $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
    116161
     
    131176
    132177profile-html: $(RENDERTMP)/$(BLFSHTML)
    133 $(RENDERTMP)/$(BLFSHTML): $(RENDERTMP)/$(BLFSFULL)
     178$(RENDERTMP)/$(BLFSHTML): $(RENDERTMP)/$(BLFSFULL) version
    134179        @echo "Generating profiled XML for XHTML..."
    135180        $(Q)xsltproc --nonet                              \
     
    144189          blfs-patches.sh > blfs-patch-list
    145190
    146 blfs-patches.sh: $(RENDERTMP)/$(BLFSFULL)
     191blfs-patches.sh: $(RENDERTMP)/$(BLFSFULL) version
    147192        @echo "Generating blfs patch script..."
    148193        $(Q)xsltproc --nonet                     \
     
    152197
    153198wget-list: $(BASEDIR)/wget-list
    154 $(BASEDIR)/wget-list: $(RENDERTMP)/$(BLFSFULL)
     199$(BASEDIR)/wget-list: $(RENDERTMP)/$(BLFSFULL) version
    155200        @echo "Generating wget list for $(REV) at $(BASEDIR)/wget-list ..."
    156201        $(Q)mkdir -p $(BASEDIR)
     
    161206
    162207test-links: $(BASEDIR)/test-links
    163 $(BASEDIR)/test-links: $(RENDERTMP)/$(BLFSFULL)
     208$(BASEDIR)/test-links: $(RENDERTMP)/$(BLFSFULL) version
    164209        @echo "Generating test-links file..."
    165210        $(Q)mkdir -p $(BASEDIR)
     
    213258
    214259dump-commands: $(DUMPDIR)
    215 $(DUMPDIR): $(RENDERTMP)/$(BLFSFULL)
     260$(DUMPDIR): $(RENDERTMP)/$(BLFSFULL) version
    216261        @echo "Dumping book commands..."
    217262        $(Q)xsltproc --output $(DUMPDIR)/          \
     
    222267.PHONY: blfs all world html nochunks tmpdir clean  \
    223268   validate profile-html blfs-patch-list wget-list test-links \
    224    dump-commands  bootscripts systemd-units
    225 
    226 
     269   dump-commands  bootscripts systemd-units version
     270
     271version:
     272        $(Q)./git-version.sh
Note: See TracChangeset for help on using the changeset viewer.