OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [pkgconf/] [rules.doc] - Diff between revs 27 and 174

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 27 Rev 174
#=============================================================================
#=============================================================================
#
#
#    rules.doc
#    rules.doc
#
#
#    Additional rules for processing documentation written in DocBook/SGML
#    Additional rules for processing documentation written in DocBook/SGML
#
#
#=============================================================================
#=============================================================================
#####ECOSGPLCOPYRIGHTBEGIN####
#####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
## This file is part of eCos, the Embedded Configurable Operating System.
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
##
##
## eCos is free software; you can redistribute it and/or modify it under
## eCos is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
## the terms of the GNU General Public License as published by the Free
## Software Foundation; either version 2 or (at your option) any later version.
## Software Foundation; either version 2 or (at your option) any later version.
##
##
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
## for more details.
## for more details.
##
##
## You should have received a copy of the GNU General Public License along
## You should have received a copy of the GNU General Public License along
## with eCos; if not, write to the Free Software Foundation, Inc.,
## with eCos; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
##
##
## As a special exception, if other files instantiate templates or use macros
## As a special exception, if other files instantiate templates or use macros
## or inline functions from this file, or you compile this file and link it
## or inline functions from this file, or you compile this file and link it
## with other works to produce a work based on this file, this file does not
## with other works to produce a work based on this file, this file does not
## by itself cause the resulting work to be covered by the GNU General Public
## by itself cause the resulting work to be covered by the GNU General Public
## License. However the source code for this file must still be made available
## License. However the source code for this file must still be made available
## in accordance with section (3) of the GNU General Public License.
## in accordance with section (3) of the GNU General Public License.
##
##
## This exception does not invalidate any other reasons why a work based on
## This exception does not invalidate any other reasons why a work based on
## this file might be covered by the GNU General Public License.
## this file might be covered by the GNU General Public License.
##
##
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
## at http://sources.redhat.com/ecos/ecos-license/
## at http://sources.redhat.com/ecos/ecos-license/
## -------------------------------------------
## -------------------------------------------
#####ECOSGPLCOPYRIGHTEND####
#####ECOSGPLCOPYRIGHTEND####
#=============================================================================
#=============================================================================
#####DESCRIPTIONBEGIN####
#####DESCRIPTIONBEGIN####
#
#
# Author(s):     bartv
# Author(s):     bartv
# Date:          2001-01-11
# Date:          2001-01-11
# Purpose:       Rules for processing documentation
# Purpose:       Rules for processing documentation
# Description:
# Description:
#     Each package's doc directory's makefile should define the
#     Each package's doc directory's makefile should define the
#     following variables:
#     following variables:
#       TOPLEVEL   - of the component repository
#       TOPLEVEL   - of the component repository
#       MAIN_SGML  - documentation entry point
#       MAIN_SGML  - documentation entry point
#       OTHER_SGML - any other .sgml files accessed from main
#       OTHER_SGML - any other .sgml files accessed from main
#       PICTURES   - referenced by the SGML files
#       PICTURES   - referenced by the SGML files
#####DESCRIPTIONEND####
#####DESCRIPTIONEND####
#=============================================================================
#=============================================================================
.PHONY: default check html pdf clean copyfiles
.PHONY: default check html pdf clean copyfiles
# Locations of the stylesheets and other SGML support files. These
# Locations of the stylesheets and other SGML support files. These
# have moved around in various releases of the tools.
# have moved around in various releases of the tools.
ifneq (,$(wildcard /usr/share/sgml/docbook))
ifneq (,$(wildcard /usr/share/sgml/docbook))
  CATALOG       := /etc/sgml/catalog
  CATALOG       := /etc/sgml/catalog
  ifneq (,$(wildcard /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/catalog))
  ifneq (,$(wildcard /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/catalog))
    DSSSL_CATALOG  := /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/catalog
    DSSSL_CATALOG  := /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/catalog
  else
  else
    DSSSL_CATALOG := $(firstword $(wildcard /usr/share/sgml/docbook/dsssl-stylesheets-*/catalog))
    DSSSL_CATALOG := $(firstword $(wildcard /usr/share/sgml/docbook/dsssl-stylesheets-*/catalog))
  endif
  endif
else
else
  ifneq (,$(wildcard /usr/lib/sgml/stylesheets/nwalsh-modular/catalog))
  ifneq (,$(wildcard /usr/lib/sgml/stylesheets/nwalsh-modular/catalog))
    CATALOG          := /usr/lib/sgml/CATALOG
    CATALOG          := /usr/lib/sgml/CATALOG
    DSSSL_CATALOG    := /usr/lib/sgml/stylesheets/nwalsh-modular/catalog
    DSSSL_CATALOG    := /usr/lib/sgml/stylesheets/nwalsh-modular/catalog
  else
  else
    ifneq (,$(wildcard /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/sgml.catalog))
    ifneq (,$(wildcard /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/sgml.catalog))
      CATALOG        := /usr/lib/sgml/catalog
      CATALOG        := /usr/lib/sgml/catalog
      DSSSL_CATALOG  := /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/sgml.catalog
      DSSSL_CATALOG  := /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/sgml.catalog
    else
    else
      Error: unable to locate DocBook tools.
      Error: unable to locate DocBook tools.
    endif
    endif
  endif
  endif
endif
endif
A4_STYLESHEET  := $(TOPLEVEL)/pkgconf/ssa4.dsl
A4_STYLESHEET  := $(TOPLEVEL)/pkgconf/ssa4.dsl
LETTER_STYLESHEET  := $(TOPLEVEL)/pkgconf/ssletter.dsl
LETTER_STYLESHEET  := $(TOPLEVEL)/pkgconf/ssletter.dsl
HTML_STYLESHEET  := $(TOPLEVEL)/pkgconf/stylesheet.dsl
HTML_STYLESHEET  := $(TOPLEVEL)/pkgconf/stylesheet.dsl
FIXHTML          := $(TOPLEVEL)/pkgconf/fixhtml.tcl
FIXHTML          := $(TOPLEVEL)/pkgconf/fixhtml.tcl
# The files that will be generated:
# The files that will be generated:
ifeq (,$(MAIN_HTML))
ifeq (,$(MAIN_HTML))
 MAIN_HTML        := $(subst .sgml,.html,$(MAIN_SGML))
 MAIN_HTML        := $(subst .sgml,.html,$(MAIN_SGML))
endif
endif
ifeq (,$(MAIN_PDF))
ifeq (,$(MAIN_PDF))
 MAIN_PDF         := $(subst .sgml,.pdf,$(MAIN_SGML))
 MAIN_PDF         := $(subst .sgml,.pdf,$(MAIN_SGML))
endif
endif
MAIN_PDFA4        := $(subst .pdf,-a4.pdf,$(MAIN_PDF))
MAIN_PDFA4        := $(subst .pdf,-a4.pdf,$(MAIN_PDF))
MAIN_PDFLETTER    := $(subst .pdf,-letter.pdf,$(MAIN_PDF))
MAIN_PDFLETTER    := $(subst .pdf,-letter.pdf,$(MAIN_PDF))
# Rules for generating pictures
# Rules for generating pictures
GIFS := $(foreach x,$(PICTURES),$(x).gif)
GIFS := $(foreach x,$(PICTURES),$(x).gif)
EPS  := $(foreach x,$(PICTURES),$(x).eps)
EPS  := $(foreach x,$(PICTURES),$(x).eps)
PNGS :=$(foreach x,$(PICTURES),$(x).png)
PNGS :=$(foreach x,$(PICTURES),$(x).png)
%.gif: %.fig
%.gif: %.fig
        convert -crop 0x0 $< $@
        convert -crop 0x0 $< $@
%.png: %.fig
%.png: %.fig
        fig2dev -L png $< $@
        fig2dev -L png $< $@
%.eps: %.fig
%.eps: %.fig
        convert -crop 0x0 $< $@
        convert -crop 0x0 $< $@
# This is a little grotty. In some cases we want to just copy files from
# This is a little grotty. In some cases we want to just copy files from
# their source location to the destination's current dir and nothing
# their source location to the destination's current dir and nothing
# more.
# more.
copyfiles:
copyfiles:
ifneq (,$(COPYFILES))
ifneq (,$(COPYFILES))
        cp $(COPYFILES) .
        cp $(COPYFILES) .
endif
endif
default: check
default: check
# Validating an sgml document can be achieved with
# Validating an sgml document can be achieved with
check: $(MAIN_SGML) $(OTHER_SGML) $(GIFS) $(EPS)
check: $(MAIN_SGML) $(OTHER_SGML) $(GIFS) $(EPS)
        nsgmls -vs -c $(CATALOG) $<
        nsgmls -vs -c $(CATALOG) $<
# Generating HTML from the SGML. In practice multiple .html files may
# Generating HTML from the SGML. In practice multiple .html files may
# be generated, but for the purposes of dependency analysis the others
# be generated, but for the purposes of dependency analysis the others
# can be ignored.
# can be ignored.
html: copyfiles $(MAIN_HTML)
html: copyfiles $(MAIN_HTML)
$(MAIN_HTML): $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(HTML_STYLESHEET) $(FIXHTML)
$(MAIN_HTML): $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(HTML_STYLESHEET) $(FIXHTML)
        jade -t sgml -i html -c $(DSSSL_CATALOG) -d $(HTML_STYLESHEET)#html $<
        jade -t sgml -i html -c $(DSSSL_CATALOG) -d $(HTML_STYLESHEET)#html $<
        tclsh $(FIXHTML)
        tclsh $(FIXHTML)
# PDF files can be generated in a similar fashion.
# PDF files can be generated in a similar fashion.
pdfa4: copyfiles $(MAIN_PDFA4)
pdfa4: copyfiles $(MAIN_PDFA4)
$(MAIN_PDFA4):  $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(A4_STYLESHEET)
$(MAIN_PDFA4):  $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(A4_STYLESHEET)
        jade -o $(subst .pdf,.tex,$(MAIN_PDFA4)) -t tex -V tex-backend -c $(DSSSL_CATALOG) -d $(A4_STYLESHEET)#print $<
        jade -o $(subst .pdf,.tex,$(MAIN_PDFA4)) -t tex -V tex-backend -c $(DSSSL_CATALOG) -d $(A4_STYLESHEET)#print $<
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
pdfletter: copyfiles $(MAIN_PDFLETTER)
pdfletter: copyfiles $(MAIN_PDFLETTER)
$(MAIN_PDFLETTER):  $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(LETTER_STYLESHEET)
$(MAIN_PDFLETTER):  $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(LETTER_STYLESHEET)
        jade -o $(subst .pdf,.tex,$(MAIN_PDFLETTER)) -t tex -V tex-backend -c $(DSSSL_CATALOG) -d $(LETTER_STYLESHEET)#print $<
        jade -o $(subst .pdf,.tex,$(MAIN_PDFLETTER)) -t tex -V tex-backend -c $(DSSSL_CATALOG) -d $(LETTER_STYLESHEET)#print $<
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
#$(MAIN_PDF):  $(MAIN_SGML) $(OTHER_SGML) $(EPS) $(ECOS_STYLESHEET)
#$(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 $<
#       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))
#       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))
#       dvips -o $(subst .sgml,.ps,$(MAIN_SGML)) $(subst .sgml,.dvi,$(MAIN_SGML))
#       ps2pdf $(subst .sgml,.ps,$(MAIN_SGML)) $(subst .sgml,.pdf,$(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. For now assume that all .html, .gif etc files are generated
clean:
clean:
        rm -rf *.html *.tex *.dvi *.aux *.log *.out *.ps *.pdf *.gif *.eps *.png
        rm -rf *.html *.tex *.dvi *.aux *.log *.out *.ps *.pdf *.gif *.eps *.png
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.