Changeset 575bba80 for Makefile


Ignore:
Timestamp:
04/08/2008 05:32:00 PM (16 years ago)
Author:
Dan Nichilson <dnicholson@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
1d36178d
Parents:
f3a51f3
Message:

Make Makefile timestamp based and add clean target

This helps ensure that targets are not needlessly rerun (like validxml)
unless something has been updated. It also means that parallel jobs work
and are safe.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@7358 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rf3a51f3 r575bba80  
    2020endif
    2121
    22 blfs: validxml profile-html
     22blfs: html wget-list
     23all: blfs nochunks pdf
     24world: all blfs-patch-list dump-commands test-links
     25
     26html: $(BASEDIR)/index.html
     27$(BASEDIR)/index.html: $(RENDERTMP)/blfs-html.xml
    2328        @echo "Generating chunked XHTML files..."
    2429        $(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
     
    4651        done;
    4752
    48         $(Q)$(MAKE) wget-list
    49 
    50 pdf: validxml
     53pdf: $(BASEDIR)/$(PDF_OUTPUT)
     54$(RENDERTMP)/blfs-pdf.xml: $(RENDERTMP)/blfs-full.xml
    5155        @echo "Generating profiled XML for PDF..."
    5256        $(Q)xsltproc --nonet --stringparam profile.condition pdf \
     
    5458          $(RENDERTMP)/blfs-full.xml
    5559
     60$(RENDERTMP)/blfs-pdf.fo: $(RENDERTMP)/blfs-full.xml
    5661        @echo "Generating FO file..."
    5762        $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
    58           --output $(RENDERTMP)/blfs-pdf.fo stylesheets/blfs-pdf.xsl $(RENDERTMP)/blfs-pdf.xml
     63          --output $(RENDERTMP)/blfs-pdf.fo stylesheets/blfs-pdf.xsl \
     64          $(RENDERTMP)/blfs-pdf.xml
    5965        $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/blfs-pdf.fo
    6066
     67$(BASEDIR)/$(PDF_OUTPUT): $(RENDERTMP)/blfs-pdf.fo
    6168        @echo "Generating PDF file..."
    6269        $(Q)if [ ! -e $(BASEDIR) ]; then \
     
    6572        $(Q)fop $(RENDERTMP)/blfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
    6673
    67 nochunks: validxml profile-html
     74nochunks: $(BASEDIR)/$(NOCHUNKS_OUTPUT)
     75$(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/blfs-html.xml
    6876        @echo "Generating non chunked XHTML file..."
    6977        $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
     
    7886          $(BASEDIR)/$(NOCHUNKS_OUTPUT)
    7987
    80 tmpdir:
    81         @echo "Creating and cleaning $(RENDERTMP)"
     88tmpdir: $(RENDERTMP)
     89$(RENDERTMP):
     90        @echo "Creating $(RENDERTMP)"
    8291        $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
     92
     93clean:
     94        @echo "Cleaning $(RENDERTMP)"
    8395        $(Q)rm -f $(RENDERTMP)/blfs-{full,html,pdf}.xml
    8496        $(Q)rm -f $(RENDERTMP)/blfs-pdf.fo
    8597        $(Q)rm -f $(RENDERTMP)/blfs-{patch-list,patches}
    8698
    87 validxml: tmpdir
     99validxml: $(RENDERTMP)/blfs-full.xml
     100$(RENDERTMP)/blfs-full.xml: index.xml general.ent
    88101        @echo "Validating the book..."
     102        $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
    89103        $(Q)xmllint --nonet --noent --xinclude --postvalid \
    90104          -o $(RENDERTMP)/blfs-full.xml index.xml
    91105
    92 profile-html: validxml
     106profile-html: $(RENDERTMP)/blfs-html.xml
     107$(RENDERTMP)/blfs-html.xml: $(RENDERTMP)/blfs-full.xml
    93108        @echo "Generating profiled XML for XHTML..."
    94109        $(Q)xsltproc --nonet --stringparam profile.condition html \
     
    96111          $(RENDERTMP)/blfs-full.xml
    97112
    98 blfs-patch-list: validxml
     113blfs-patch-list: $(RENDERTMP)/blfs-full.xml
    99114        @echo "Generating blfs-patch-list..."
    100115        $(Q)xsltproc --nonet --output $(RENDERTMP)/blfs-patch-list \
     
    103118        $(Q)sort $(RENDERTMP)/blfs-patches > blfs-patch-list
    104119
    105 wget-list:
     120wget-list: $(BASEDIR)/wget-list
     121$(BASEDIR)/wget-list: $(RENDERTMP)/blfs-full.xml
    106122        @echo "Generating wget list..."
    107         $(Q)[ -f $(RENDERTMP)/blfs-full.xml ] || $(MAKE) validxml
    108123        $(Q)mkdir -p $(BASEDIR)
    109124        $(Q)xsltproc --nonet --output $(BASEDIR)/wget-list \
    110125          stylesheets/wget-list.xsl $(RENDERTMP)/blfs-full.xml
    111126
    112 test-links: validxml
     127test-links: $(RENDERTMP)/blfs-full.xml
     128$(BASEDIR)/test-links: $(RENDERTMP)/blfs-full.xml
    113129        @echo "Generating test-links file..."
    114130        $(Q)mkdir -p $(BASEDIR)
     
    134150        done
    135151
    136 dump-commands: validxml
     152dump-commands: $(DUMPDIR)
     153$(DUMPDIR): $(RENDERTMP)/blfs-full.xml
    137154        @echo "Dumping book commands..."
    138155        $(Q)xsltproc --output $(DUMPDIR)/ \
    139156           stylesheets/dump-commands.xsl $(RENDERTMP)/blfs-full.xml
     157        $(Q)touch $(DUMPDIR)
    140158
    141159validate:
     
    143161        $(Q)xmllint --noout --nonet --xinclude --postvalid index.xml
    144162
    145 all: blfs nochunks pdf
    146 
    147 world: all blfs-patch-list dump-commands test-links
    148 
    149 .PHONY : all blfs blfs-patch-list dump-commands nochunks pdf profile-html \
    150          test-links tmpdir validate validxml wget-list world
     163.PHONY: blfs all world html pdf nochunks tmpdir clean validxml \
     164        profile-html wget-list test-links dump-commands validate
Note: See TracChangeset for help on using the changeset viewer.