Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOOK/Makefile

    r4fe47e3 rd63b7ee  
    1 TOP             := $(PWD)
     1TOP             := $(shell pwd)
    22RENDERDIR       := $(TOP)/../render
    33
    44VALIDATEDIR     := $(RENDERDIR)/validate
    5 DBXMLDIR        := $(RENDERDIR)/docbook
    65PROFILEDIR      := $(RENDERDIR)/profile
    76
     
    2423                   ppc ppc64 \
    2524                   alpha
    26 
    27 x86_ML          := 32
    28 x86_64_ML       := 32,64
    29 x86_64-64_ML    := 64
    30 sparc_ML        := 32
    31 sparc64_ML      := 32,64
    32 sparc64-64_ML   := 64
    33 mips_ML         := 32
    34 mips64_ML       := 32,n32,64
    35 mips64-64_ML    := 64
    36 ppc_ML          := 32
    37 ppc64_ML        := 32,64
    38 alpha_ML        := 64
    3925
    4026ifdef V
     
    6854        @echo "Rendering the top-level index..."
    6955        $(Q)xsltproc --nonet --output $(HTMLDIR)/index.html \
    70           $(PWD)/stylesheets/top-index.xsl \
    71           $(PWD)/index.xml
     56          $(TOP)/stylesheets/top-index.xsl \
     57          $(TOP)/index.xml
    7258        @$(MAKE) --no-print-directory tidy-f TIDY_FILE=$(HTMLDIR)/index.html
    7359
     
    7662$(ARCHS_VD_XML): override arch = $(@:%-validate_dump-xml=%)
    7763$(ARCHS_VD_XML):
    78         @echo "Validating $(arch) against the CLFS Schema..."
     64        @echo "Validating $(arch) book..."
    7965        $(Q)mkdir -p $(VALIDATEDIR)
    8066        $(Q)xmllint --nonet --noent --xinclude \
    81           --relaxng $(TOP)/schema/clfs/0.1/rng/clfs.rng \
     67          --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \
    8268          -o $(VALIDATEDIR)/$(arch)-full.xml \
    83           $(PWD)/$(arch)-index.xml \
    84           2>&1 | grep -v " validates$$"; \
    85           if test $${?} -ne 0; then true; else false; fi
    86 
    87 ARCHS_DB_XML := $(ARCHS:%=%-db-xml)
    88 .PHONY: $(ARCHS_DB_XML)
    89 $(ARCHS_DB_XML): override arch = $(@:%-db-xml=%)
    90 $(ARCHS_DB_XML):
    91         @$(MAKE) --no-print-directory $(arch)-validate_dump-xml
    92         @echo "Generating DocBook XML for $(arch)..."
    93         $(Q)mkdir -p $(DBXMLDIR)
    94         $(Q)xsltproc --nonet \
    95           --stringparam clfs.arch "$(arch)" \
    96           --stringparam clfs.multilib "$($(arch)_ML)" \
    97           --output $(DBXMLDIR)/$(arch)-db.xml \
    98           $(PWD)/stylesheets/clfs-profile.xsl \
    99           $(VALIDATEDIR)/$(arch)-full.xml
     69          $(TOP)/$(arch)-index.xml
    10070
    10171ARCHS_P_XML := $(ARCHS:%=%-profiled-xml)
     
    10373$(ARCHS_P_XML): override arch = $(@:%-profiled-xml=%)
    10474$(ARCHS_P_XML):
    105         @$(MAKE) --no-print-directory $(arch)-db-xml
    106         @echo "Profiling $(arch) for rendering..."
     75        @$(MAKE) --no-print-directory $(arch)-validate_dump-xml
     76        @echo "Generating profiled $(arch) book..."
    10777        $(Q)mkdir -p $(PROFILEDIR)
    108         $(Q)xsltproc --nonet \
    109           --stringparam profile.condition html \
     78        $(Q)xsltproc --nonet --stringparam profile.condition html \
    11079          --output $(PROFILEDIR)/$(arch)-html.xml \
    111           $(PWD)/stylesheets/lfs-xsl/profile.xsl \
    112           $(DBXMLDIR)/$(arch)-db.xml
    113 
    114 ARCHS_VDB_XML := $(ARCHS:%=%-validate_db-xml)
    115 .PHONY: $(ARCHS_VDB_XML)
    116 $(ARCHS_VDB_XML): override arch = $(@:%-validate_db-xml=%)
    117 $(ARCHS_VDB_XML):
    118         @echo "Validating $(arch) against the DocBook Schema..."
    119         $(Q)xmllint --noout --nonet \
    120           --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \
    121           $(PROFILEDIR)/$(arch)-html.xml \
    122           2>&1 | grep -v " validates$$"; \
    123           if test $${?} -ne 0; then true; else false; fi
     80          $(TOP)/stylesheets/lfs-xsl/profile.xsl \
     81          $(VALIDATEDIR)/$(arch)-full.xml
    12482
    12583ARCHS_HTML := $(ARCHS:%=%-html)
     
    12987$(ARCHS_HTML):
    13088        @$(MAKE) --no-print-directory $(arch)-profiled-xml
    131         @$(MAKE) --no-print-directory $(arch)-validate_db-xml
    13289
    13390        @echo "Rendering chunked XHTML of $(arch)..."
     
    13693          -stringparam rootid "$(ROOT_ID)" \
    13794          -stringparam base.dir $(HTMLDIR)/$(arch)/ \
    138           $(PWD)/stylesheets/clfs-chunked.xsl \
     95          $(TOP)/stylesheets/clfs-chunked.xsl \
    13996          $(PROFILEDIR)/$(arch)-html.xml
    14097
    14198        @echo "Copying CSS code and images for $(arch)..."
    14299        $(Q)mkdir -p $(HTMLDIR)/$(arch)/stylesheets
    143         $(Q)cp $(PWD)/stylesheets/lfs-xsl/*.css $(HTMLDIR)/$(arch)/stylesheets
     100        $(Q)cp $(TOP)/stylesheets/lfs-xsl/*.css $(HTMLDIR)/$(arch)/stylesheets
    144101        $(Q)sed -i -e "s@../stylesheets@stylesheets@g" $(HTMLDIR)/$(arch)/*.html
    145102        $(Q)mkdir -p $(HTMLDIR)/$(arch)/images
    146         $(Q)cp $(PWD)/images/*.png $(HTMLDIR)/$(arch)/images
     103        $(Q)cp $(TOP)/images/*.png $(HTMLDIR)/$(arch)/images
    147104        $(Q)sed -i -e "s@../images@images@g" $(HTMLDIR)/$(arch)/*.html
    148105
     
    155112$(ARCHS_NOCHUNKS):
    156113        @$(MAKE) --no-print-directory $(arch)-profiled-xml
    157         @$(MAKE) --no-print-directory $(arch)-validate_db-xml
    158114
    159115        @echo "Rendering Single File HTML of $(arch)..."
     
    161117        $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
    162118          --output $(NOCHUNKDIR)/CLFS-$(arch).html \
    163           $(PWD)/stylesheets/clfs-nochunks.xsl \
     119          $(TOP)/stylesheets/clfs-nochunks.xsl \
    164120          $(PROFILEDIR)/$(arch)-html.xml
    165121
     
    172128$(ARCHS_FO):
    173129        @$(MAKE) --no-print-directory $(arch)-profiled-xml
    174         @$(MAKE) --no-print-directory $(arch)-validate_db-xml
    175130
    176131        @echo "Generating FO file of $(arch)..."
     
    178133        $(Q)xsltproc --nonet -stringparam rootid "$(ROOT_ID)" \
    179134          --output $(FODIR)/$(arch).fo \
    180           $(PWD)/stylesheets/clfs-pdf.xsl \
     135          $(TOP)/stylesheets/clfs-pdf.xsl \
    181136          $(PROFILEDIR)/$(arch)-html.xml
    182137        $(Q)sed -i -e 's/span="inherit"/span="all"/' $(FODIR)/$(arch).fo
     
    198153$(ARCHS_VALIDATE): override arch =  $(@:%-validate=%)
    199154$(ARCHS_VALIDATE):
    200         @echo "Validating $(arch) against the CLFS Schema..."
     155        @echo "Validating $(arch)..."
    201156        $(Q)xmllint --xinclude --noout --nonet \
    202           --relaxng $(TOP)/schema/clfs/0.1/rng/clfs.rng \
    203           $(PWD)/$(arch)-index.xml \
    204           2>&1 | grep -v " validates$$"; \
    205           if test $${?} -ne 0; then true; else false; fi
     157          --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \
     158          $(TOP)/$(arch)-index.xml
    206159
    207160ARCHS_TROUBLE := $(ARCHS:%=%-trouble)
     
    213166        @mkdir -p $(TROUBLEDIR)
    214167        $(Q)xmllint --xinclude --nonet \
    215           --relaxng $(TOP)/schema/clfs/0.1/rng/clfs.rng \
     168          --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \
    216169          -o $(TROUBLEDIR)/dump-$(arch) \
    217           $(PWD)/$(arch)-index.xml \
    218           2>&1 | grep -v " validates$$"; \
    219           if test $${?} -ne 0; then true; else false; fi
     170          $(TOP)/$(arch)-index.xml
    220171        $(Q)xmllint --xinclude --noout --nonet \
    221           --relaxng $(TOP)/schema/clfs/0.1/rng/clfs.rng \
    222           $(TROUBLEDIR)/dump-$(arch) \
    223           2>&1 | grep -v " validates$$"; \
    224           if test $${?} -ne 0; then true; else false; fi
     172          --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \
     173          $(TROUBLEDIR)/dump-$(arch)
    225174        @echo "You can now look at $(TROUBLEDIR)/dump-$(arch) to see the errors"
    226175
     
    234183        $(Q)xsltproc --xinclude --nonet \
    235184          --output $(DUMPDIR)/$(arch)/ \
    236           $(PWD)/stylesheets/dump-commands.xsl \
    237           $(PWD)/$(arch)-index.xml
     185          $(TOP)/stylesheets/dump-commands.xsl \
     186          $(TOP)/$(arch)-index.xml
    238187
    239188ARCHS_DLLIST := $(ARCHS:%=%-dllist)
     
    246195        $(Q)xsltproc --xinclude --nonet \
    247196          --output $(DLLISTDIR)/$(arch).list \
    248           $(PWD)/stylesheets/wget.xsl \
    249           $(PWD)/$(arch)-index.xml
     197          $(TOP)/stylesheets/wget.xsl \
     198          $(TOP)/$(arch)-index.xml
    250199
    251200FG_GREEN := $(shell echo -e '\e[0;32m')
Note: See TracChangeset for help on using the changeset viewer.