Mercurial > ecos
view packages/pkgconf/rules.doc @ 167:59f91bb9f684
Fix inconsistency
| author | jlarmour |
|---|---|
| date | Mon, 02 Jul 2001 13:39:23 +0000 |
| parents | ac086aa3217e |
| children | e0c0827131d1 |
line wrap: on
line source
#============================================================================= # # rules.doc # # Additional rules for processing documentation written in DocBook/SGML # #============================================================================= #####COPYRIGHTBEGIN#### # # ------------------------------------------- # The contents of this file are subject to the Red Hat eCos Public License # Version 1.1 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://www.redhat.com/ # # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the # License for the specific language governing rights and limitations under # the License. # # The Original Code is eCos - Embedded Configurable Operating System, # released September 30, 1998. # # The Initial Developer of the Original Code is Red Hat. # Portions created by Red Hat are # Copyright (C) 2001 Red Hat, Inc. # All Rights Reserved. # ------------------------------------------- # #####COPYRIGHTEND#### #============================================================================= #####DESCRIPTIONBEGIN#### # # Author(s): bartv # Date: 2001-01-11 # Purpose: Rules for processing documentation # Description: # Each package's doc directory's makefile should define the # following variables: # TOPLEVEL - of the component repository # MAIN_SGML - documentation entry point # OTHER_SGML - any other .sgml files accessed from main # PICTURES - referenced by the SGML files #####DESCRIPTIONEND#### #============================================================================= .PHONY: default check html pdf clean # Locations of the stylesheets and other SGML support files. These # have moved around in various releases of the tools. ifneq (,$(wildcard /usr/share/sgml/docbook)) CATALOG := /etc/sgml/catalog DSSSL_CATALOG := $(firstword $(wildcard /usr/share/sgml/docbook/dsssl-stylesheets-*/catalog)) else ifneq (,$(wildcard /usr/lib/sgml/stylesheets/nwalsh-modular/catalog)) CATALOG := /usr/lib/sgml/CATALOG DSSSL_CATALOG := /usr/lib/sgml/stylesheets/nwalsh-modular/catalog else Error: unable to locate DocBook tools. endif endif ECOS_STYLESHEET := $(TOPLEVEL)/pkgconf/stylesheet.dsl FIXHTML := $(TOPLEVEL)/pkgconf/fixhtml.tcl # The files that will be generated: ifeq (,$(MAIN_HTML)) MAIN_HTML := $(subst .sgml,.html,$(MAIN_SGML)) endif ifeq (,$(MAIN_PDF)) MAIN_PDF := $(subst .sgml,.pdf,$(MAIN_SGML)) endif # Rules for generating pictures GIFS := $(foreach x,$(PICTURES),$(x).gif) EPS := $(foreach x,$(PICTURES),$(x).eps) %.gif: %.fig convert -crop 0x0 $< $@ %.eps: %.fig convert -crop 0x0 $< $@ default: check # Validating an sgml document can be achieved with check: $(MAIN_SGML) $(OTHER_SGML) $(GIFS) $(EPS) nsgmls -vs -c $(CATALOG) $< # Generating HTML from the SGML. In practice multiple .html files may # be generated, but for the purposes of dependency analysis the others # can be ignored. html: $(MAIN_HTML) $(MAIN_HTML): $(MAIN_SGML) $(OTHER_SGML) $(GIFS) $(ECOS_STYLESHEET) $(FIXHTML) jade -t sgml -i html -c $(DSSSL_CATALOG) -d $(ECOS_STYLESHEET)#html $< tclsh $(FIXHTML) # PDF files can be generated in a similar fashion. pdf: $(MAIN_PDF) $(MAIN_PDF): $(MAIN_SGML) $(OTHER_SGML) $(EPS) $(ECOS_STYLESHEET) jade -o $(subst .sgml,.tex,$(MAIN_SGML)) -t tex -V tex-backend -c $(DSSSL_CATALOG) -d $(ECOS_STYLESHEET)#print $< pdfjadetex $(subst .sgml,.tex,$(MAIN_SGML)) pdfjadetex $(subst .sgml,.tex,$(MAIN_SGML)) pdfjadetex $(subst .sgml,.tex,$(MAIN_SGML)) #$(MAIN_PDF): $(MAIN_SGML) $(OTHER_SGML) $(EPS) $(ECOS_STYLESHEET) # jade -o $(subst .sgml,.tex,$(MAIN_SGML)) -t tex -V tex-backend -d $(ECOS_STYLESHEET)#print $< # jadetex $(subst .sgml,.tex,$(MAIN_SGML)) # jadetex $(subst .sgml,.tex,$(MAIN_SGML)) # jadetex $(subst .sgml,.tex,$(MAIN_SGML)) # dvips -o $(subst .sgml,.ps,$(MAIN_SGML)) $(subst .sgml,.dvi,$(MAIN_SGML)) # ps2pdf $(subst .sgml,.ps,$(MAIN_SGML)) $(subst .sgml,.pdf,$(MAIN_SGML)) # Clean. For now assume that all .html, .gif etc files are generated clean: rm -rf *.html *.tex *.dvi *.aux *.log *.out *.ps *.pdf *.gif *.eps
