Changeset eef46e9


Ignore:
Timestamp:
Feb 26, 2011, 10:33:56 PM (14 years ago)
Author:
Joe Ciccone <jciccone@…>
Children:
4fe47e3
Parents:
da28cc3
Message:

Add a custom schema for CLFS as well as an intermediate target in
the Makefile that validate against this schema and then docbooks
standard schema.

Location:
BOOK
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • BOOK/Makefile

    rda28cc3 reef46e9  
    6262$(ARCHS_VD_XML): override arch = $(@:%-validate_dump-xml=%)
    6363$(ARCHS_VD_XML):
    64         @echo "Validating $(arch) book..."
     64        @echo "Validating $(arch) against the CLFS Schema..."
    6565        $(Q)mkdir -p $(VALIDATEDIR)
    6666        $(Q)xmllint --nonet --noent --xinclude \
    67           --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \
     67          --relaxng $(TOP)/schema/clfs/0.1/rng/clfs.rng \
    6868          -o $(VALIDATEDIR)/$(arch)-full.xml \
    69           $(PWD)/$(arch)-index.xml
     69          $(PWD)/$(arch)-index.xml \
     70          2>&1 | grep -v " validates$$"; \
     71          if test $${?} -ne 0; then true; else false; fi
    7072
    7173ARCHS_P_XML := $(ARCHS:%=%-profiled-xml)
     
    7476$(ARCHS_P_XML):
    7577        @$(MAKE) --no-print-directory $(arch)-validate_dump-xml
    76         @echo "Generating profiled $(arch) book..."
     78        @echo "Profiling $(arch) for rendering..."
    7779        $(Q)mkdir -p $(PROFILEDIR)
    7880        $(Q)xsltproc --nonet --stringparam profile.condition html \
     
    8082          $(PWD)/stylesheets/lfs-xsl/profile.xsl \
    8183          $(VALIDATEDIR)/$(arch)-full.xml
     84
     85ARCHS_VDB_XML := $(ARCHS:%=%-validate_db-xml)
     86.PHONY: $(ARCHS_VDB_XML)
     87$(ARCHS_VDB_XML): override arch = $(@:%-validate_db-xml=%)
     88$(ARCHS_VDB_XML):
     89        @echo "Validating $(arch) against the DocBook Schema..."
     90        $(Q)xmllint --noout --nonet \
     91          --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \
     92          $(VALIDATEDIR)/$(arch)-full.xml \
     93          2>&1 | grep -v " validates$$"; \
     94          if test $${?} -ne 0; then true; else false; fi
    8295
    8396ARCHS_HTML := $(ARCHS:%=%-html)
     
    87100$(ARCHS_HTML):
    88101        @$(MAKE) --no-print-directory $(arch)-profiled-xml
     102        @$(MAKE) --no-print-directory $(arch)-validate_db-xml
    89103
    90104        @echo "Rendering chunked XHTML of $(arch)..."
     
    112126$(ARCHS_NOCHUNKS):
    113127        @$(MAKE) --no-print-directory $(arch)-profiled-xml
     128        @$(MAKE) --no-print-directory $(arch)-validate_db-xml
    114129
    115130        @echo "Rendering Single File HTML of $(arch)..."
     
    128143$(ARCHS_FO):
    129144        @$(MAKE) --no-print-directory $(arch)-profiled-xml
     145        @$(MAKE) --no-print-directory $(arch)-validate_db-xml
    130146
    131147        @echo "Generating FO file of $(arch)..."
     
    153169$(ARCHS_VALIDATE): override arch =  $(@:%-validate=%)
    154170$(ARCHS_VALIDATE):
    155         @echo "Validating $(arch)..."
     171        @echo "Validating $(arch) against the CLFS Schema..."
    156172        $(Q)xmllint --xinclude --noout --nonet \
    157           --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \
    158           $(PWD)/$(arch)-index.xml
     173          --relaxng $(TOP)/schema/clfs/0.1/rng/clfs.rng \
     174          $(PWD)/$(arch)-index.xml \
     175          2>&1 | grep -v " validates$$"; \
     176          if test $${?} -ne 0; then true; else false; fi
    159177
    160178ARCHS_TROUBLE := $(ARCHS:%=%-trouble)
     
    166184        @mkdir -p $(TROUBLEDIR)
    167185        $(Q)xmllint --xinclude --nonet \
    168           --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \
     186          --relaxng $(TOP)/schema/clfs/0.1/rng/clfs.rng \
    169187          -o $(TROUBLEDIR)/dump-$(arch) \
    170           $(PWD)/$(arch)-index.xml
     188          $(PWD)/$(arch)-index.xml \
     189          2>&1 | grep -v " validates$$"; \
     190          if test $${?} -ne 0; then true; else false; fi
    171191        $(Q)xmllint --xinclude --noout --nonet \
    172           --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \
    173           $(TROUBLEDIR)/dump-$(arch)
     192          --relaxng $(TOP)/schema/clfs/0.1/rng/clfs.rng \
     193          $(TROUBLEDIR)/dump-$(arch) \
     194          2>&1 | grep -v " validates$$"; \
     195          if test $${?} -ne 0; then true; else false; fi
    174196        @echo "You can now look at $(TROUBLEDIR)/dump-$(arch) to see the errors"
    175197
Note: See TracChangeset for help on using the changeset viewer.