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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [pkgconf/] [rules.doc] - Blame information for rev 810

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#=============================================================================
2
#
3
#    rules.doc
4
#
5
#    Additional rules for processing documentation written in DocBook/SGML
6
#
7
#=============================================================================
8
## ####ECOSGPLCOPYRIGHTBEGIN####
9
## -------------------------------------------
10
## This file is part of eCos, the Embedded Configurable Operating System.
11
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
12
##
13
## eCos is free software; you can redistribute it and/or modify it under
14
## the terms of the GNU General Public License as published by the Free
15
## Software Foundation; either version 2 or (at your option) any later
16
## version.
17
##
18
## eCos is distributed in the hope that it will be useful, but WITHOUT
19
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21
## for more details.
22
##
23
## You should have received a copy of the GNU General Public License
24
## along with eCos; if not, write to the Free Software Foundation, Inc.,
25
## 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
26
##
27
## As a special exception, if other files instantiate templates or use
28
## macros or inline functions from this file, or you compile this file
29
## and link it with other works to produce a work based on this file,
30
## this file does not by itself cause the resulting work to be covered by
31
## the GNU General Public License. However the source code for this file
32
## must still be made available in accordance with section (3) of the GNU
33
## General Public License v2.
34
##
35
## This exception does not invalidate any other reasons why a work based
36
## on this file might be covered by the GNU General Public License.
37
## -------------------------------------------
38
## ####ECOSGPLCOPYRIGHTEND####
39
#=============================================================================
40
#####DESCRIPTIONBEGIN####
41
#
42
# Author(s):     bartv
43
# Date:          2001-01-11
44
# Purpose:       Rules for processing documentation
45
# Description:
46
#     Each package's doc directory's makefile should define the
47
#     following variables:
48
#       TOPLEVEL   - of the component repository
49
#       MAIN_SGML  - documentation entry point
50
#       OTHER_SGML - any other .sgml files accessed from main
51
#       PICTURES   - referenced by the SGML files
52
#####DESCRIPTIONEND####
53
#=============================================================================
54
 
55
.PHONY: default check html pdf clean copyfiles
56
 
57
# Locations of the stylesheets and other SGML support files. These
58
# have moved around in various releases of the tools.
59
ifneq (,$(wildcard /usr/share/sgml/docbook))
60
  CATALOG       := /etc/sgml/catalog
61
  ifneq (,$(wildcard /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/catalog))
62
    DSSSL_CATALOG  := /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/catalog
63
  else
64
    DSSSL_CATALOG := $(firstword $(wildcard /usr/share/sgml/docbook/dsssl-stylesheets-*/catalog))
65
  endif
66
else
67
  ifneq (,$(wildcard /usr/lib/sgml/stylesheets/nwalsh-modular/catalog))
68
    CATALOG          := /usr/lib/sgml/CATALOG
69
    DSSSL_CATALOG    := /usr/lib/sgml/stylesheets/nwalsh-modular/catalog
70
  else
71
    ifneq (,$(wildcard /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/sgml.catalog))
72
      CATALOG        := /usr/lib/sgml/catalog
73
      DSSSL_CATALOG  := /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/sgml.catalog
74
    endif
75
  endif
76
endif
77
 
78
A4_STYLESHEET  := $(TOPLEVEL)/pkgconf/ssa4.dsl
79
LETTER_STYLESHEET  := $(TOPLEVEL)/pkgconf/ssletter.dsl
80
HTML_STYLESHEET  := $(TOPLEVEL)/pkgconf/stylesheet.dsl
81
FIXHTML          := $(TOPLEVEL)/pkgconf/fixhtml.tcl
82
 
83
ifneq (,$(CATALOG))
84
 CATALOG_OPT := -c $(CATALOG)
85
endif
86
 
87
ifneq (,$(DSSL_CATALOG))
88
 DSSL_CATALOG_OPT := -c $(DSSL_CATALOG)
89
endif
90
 
91
# The files that will be generated:
92
ifeq (,$(MAIN_HTML))
93
 MAIN_HTML        := $(subst .sgml,.html,$(MAIN_SGML))
94
endif
95
ifeq (,$(MAIN_PDF))
96
 MAIN_PDF         := $(subst .sgml,.pdf,$(MAIN_SGML))
97
endif
98
 
99
MAIN_PDFA4        := $(subst .pdf,-a4.pdf,$(MAIN_PDF))
100
MAIN_PDFLETTER    := $(subst .pdf,-letter.pdf,$(MAIN_PDF))
101
 
102
# Rules for generating pictures
103
GIFS := $(foreach x,$(PICTURES),$(x).gif)
104
EPS  := $(foreach x,$(PICTURES),$(x).eps)
105
PNGS :=$(foreach x,$(PICTURES),$(x).png)
106
 
107
%.gif: %.fig
108
        convert -crop 0x0 $< $@
109
 
110
%.png: %.fig
111
        fig2dev -L png $< $@
112
 
113
%.eps: %.fig
114
        convert -crop 0x0 $< $@
115
 
116
# This is a little grotty. In some cases we want to just copy files from
117
# their source location to the destination's current dir and nothing
118
# more.
119
copyfiles:
120
ifneq (,$(COPYFILES))
121
        cp $(COPYFILES) .
122
endif
123
 
124
default: check
125
 
126
# Validating an sgml document can be achieved with
127
check: $(MAIN_SGML) $(OTHER_SGML) $(GIFS) $(EPS)
128
        nsgmls -vs $(CATALOG_OPT) $<
129
 
130
# Generating HTML from the SGML. In practice multiple .html files may
131
# be generated, but for the purposes of dependency analysis the others
132
# can be ignored.
133
html: copyfiles $(MAIN_HTML)
134
 
135
$(MAIN_HTML): $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(HTML_STYLESHEET) $(FIXHTML)
136
        jade -t sgml -i html $(DSSSL_CATALOG_OPT) -d $(HTML_STYLESHEET)#html $<
137
        tclsh $(FIXHTML)
138
 
139
# PDF files can be generated in a similar fashion.
140
pdfa4: copyfiles $(MAIN_PDFA4)
141
 
142
$(MAIN_PDFA4):  $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(A4_STYLESHEET)
143
        jade -o $(subst .pdf,.tex,$(MAIN_PDFA4)) -t tex -V tex-backend $(DSSSL_CATALOG_OPT) -d $(A4_STYLESHEET)#print $<
144
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
145
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
146
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
147
 
148
pdfletter: copyfiles $(MAIN_PDFLETTER)
149
 
150
$(MAIN_PDFLETTER):  $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(LETTER_STYLESHEET)
151
        jade -o $(subst .pdf,.tex,$(MAIN_PDFLETTER)) -t tex -V tex-backend $(DSSSL_CATALOG_OPT) -d $(LETTER_STYLESHEET)#print $<
152
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
153
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
154
        pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
155
 
156
#$(MAIN_PDF):  $(MAIN_SGML) $(OTHER_SGML) $(EPS) $(ECOS_STYLESHEET)
157
#       jade -o $(subst .sgml,.tex,$(MAIN_SGML)) -t tex -V tex-backend -d $(ECOS_STYLESHEET)#print $<
158
#       jadetex $(subst .sgml,.tex,$(MAIN_SGML))
159
#       jadetex $(subst .sgml,.tex,$(MAIN_SGML))
160
#       jadetex $(subst .sgml,.tex,$(MAIN_SGML))
161
#       dvips -o $(subst .sgml,.ps,$(MAIN_SGML)) $(subst .sgml,.dvi,$(MAIN_SGML))
162
#       ps2pdf $(subst .sgml,.ps,$(MAIN_SGML)) $(subst .sgml,.pdf,$(MAIN_SGML))
163
 
164
# Clean. For now assume that all .html, .gif etc files are generated
165
clean:
166
        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.