summaryrefslogtreecommitdiff
path: root/doc/Makefile.am
blob: ff6416560cf66080bec31fb6adbf8162aad45185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
## Process this file with automake to produce Makefile.in

# The top-level SGML file.
DOC_MAIN_XML_FILE=libxslt.xml

# The directory containing the source code (if it contains documentation).
DOC_SOURCE_DIR=..

# A file in win32 depends upon two of the doc files
WIN32_DIR=$(top_srcdir)/win32

PAGES=   API.html bugs.html contribs.html FAQ.html docs.html \
         downloads.html help.html index.html intro.html news.html \
	 xsltproc2.html

EPAGES=	 EXSLT/bugs.html EXSLT/docs.html EXSLT/downloads.html \
	 EXSLT/help.html EXSLT/index.html EXSLT/intro.html

APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
	 APIsymbols.html APIchunk0.html search.templ

EAPIPAGES=EXSLT/APIconstructors.html EXSLT/APIfiles.html \
	 EXSLT/APIfunctions.html EXSLT/APIsymbols.html EXSLT/APIchunk0.html

EXTRA_DIST =			\
	api.xsl			\
	apibuild.py		\
	EXSLT/*.html		\
	EXSLT/html/*.html	\
	EXSLT/html/*.png	\
	EXSLT/libexslt-api.xml	\
	EXSLT/libexslt-refs.xml	\
	libxslt-api.xml		\
	libxslt-refs.xml	\
	symbols.xml		\
	checkapisym.xsl		\
	syms.xsl		\
	libxslt.xsa		\
	newapi.xsl		\
	news.xsl		\
	search.xml		\
	site.xsl		\
	xslt.html		\
	xsltproc.xml

man_MANS = xsltproc.1

all:	web ../NEWS libxslt.xsa $(man_MANS)

api:	libxslt-api.xml libxslt-refs.xml $(APIPAGES) search.php \
        html/index.html $(WIN32_DIR)/libxslt.def.src

eapi:	EXSLT/libexslt-api.xml EXSLT/libexslt-refs.xml $(EAPIPAGES) \
	EXSLT/html/index.html $(WIN32_DIR)/libexslt.def.src

web: $(PAGES) $(EPAGES)

$(PAGES): xslt.html $(srcdir)/site.xsl
	-@(if [ -x $(bindir)/xsltproc ] ; then \
	  echo "Rebuilding the HTML Web pages from xslt.html" ; \
	  $(bindir)/xsltproc --nonet --html $(srcdir)/site.xsl \
	    xslt.html > index.html ; fi )
	-@(if [ -x $(bindir)/xmllint ] ; then \
	  echo "Validating the HTML Web pages" ; \
	  $(bindir)/xmllint --nonet --valid --noout $(PAGES) ; fi );

$(EPAGES): EXSLT/exslt.html $(srcdir)/site.xsl
	 -@(if [ ! -d EXSLT/html ] ; then \
	   mkdir -p EXSLT/html ; fi )
	 -@(if [ -x $(bindir)/xsltproc ] ; then \
	   echo "Rebuilding the HTML Web pages from exslt.html" ; \
	   $(bindir)/xsltproc --nonet --html \
		--stringparam dirname EXSLT/ \
		--stringparam libname libexslt \
		--stringparam logo_base ../ \
		$(srcdir)/site.xsl \
		EXSLT/exslt.html > EXSLT/index.html ; fi )
	 -@(if [ -x $(bindir)/xmllint ] ; then \
	   echo "Validating the HTML Web pages" ; \
	   $(bindir)/xmllint --nonet --valid --noout $(EPAGES) ; fi );

../NEWS: $(srcdir)/news.xsl news.html
	-@(if [ -x $(bindir)/xsltproc ] ; then \
	  $(bindir)/xsltproc --nonet $(srcdir)/news.xsl \
	    news.html > ../NEWS ; fi );

libxslt.xsa: $(srcdir)/xsa.xsl news.html
	-@(if [ -x $(bindir)/xsltproc ] ; then \
	  $(bindir)/xsltproc --nonet $(srcdir)/xsa.xsl \
	    news.html > libxslt.xsa ; fi );

$(APIPAGES): libxslt-refs.xml site.xsl api.xsl $(srcdir)/site.xsl \
	     $(srcdir)/api.xsl
	-@(if [ -x $(bindir)/xsltproc ] ; then \
	  echo "Rebuilding the HTML API pages from libxslt-refs.xml" ; \
	  $(bindir)/xsltproc --nonet --html \
			     $(srcdir)/api.xsl \
			     xslt.html ; fi );
	-@(if [ -x $(bindir)/xmllint ] ; then \
	  echo "Validating the HTML API pages" ; \
	  $(bindir)/xmllint --nonet --valid --noout API*.html; fi );

$(EAPIPAGES): EXSLT/libexslt-refs.xml site.xsl api.xsl
	-@(if [ -x $(bindir)/xsltproc ] ; then \
	  echo "Rebuilding the HTML API pages from libexslt-refs.xml" ; \
	  $(bindir)/xsltproc --nonet --html --output EXSLT/ \
			     --stringparam libname libexslt \
			     --stringparam dirname EXSLT/ \
			     --stringparam logo_base ../ \
			     $(srcdir)/api.xsl \
			     EXSLT/exslt.html ; fi );

html/index.html: libxslt-api.xml $(srcdir)/newapi.xsl
	-@(if [ -x $(bindir)/xsltproc ] ; then \
	  echo "Rebuilding the HTML pages from the XSLT API" ; \
	  $(bindir)/xsltproc --nonet \
			     $(srcdir)/newapi.xsl libxslt-api.xml ; fi );
	-@(if [ -x $(bindir)/xmllint ] ; then \
	  echo "Validating the resulting XHTML pages" ; \
	  $(bindir)/xmllint --nonet --valid --noout html/*.html ; fi );

wiki: libxslt-api.xml $(srcdir)/wiki.xsl
	-@(if [ -x $(bindir)/xsltproc ] ; then \
		echo "Rebuilding the wiki HTML pages from the XSLT API" ; \
		$(bindir)/xsltproc --nonet $(srcdir)/wiki.xsl libxslt-api.xml; fi )

EXSLT/html/index.html: EXSLT/libexslt-api.xml \
	$(srcdir)/newapi.xsl
	-@(if [ -x $(bindir)/xsltproc ] ; then \
	  echo "Rebuilding the HTML pages from the EXSLT API" ; \
	  $(bindir)/xsltproc --nonet --output EXSLT/ \
			     --stringparam libname libexslt \
			     --stringparam dirname EXSLT/ \
			     --stringparam logo_base ../../ \
			     $(srcdir)/newapi.xsl \
			     EXSLT/libexslt-api.xml ; fi );
	-@(if [ -x $(bindir)/xmllint ] ; then \
	  echo "Validating the resulting XHTML pages" ; \
	  $(bindir)/xmllint --nonet --valid --noout EXSLT/html/*.html ; fi );


libxslt-api.xml libxslt-refs.xml EXSLT/libexslt-api.xml \
  EXSLT/libexslt-refs.xml ../libxslt/libxslt.syms : $(srcdir)/apibuild.py $(top_srcdir)/libxslt/*.h \
		$(top_srcdir)/libxslt/*.c $(top_srcdir)/libexslt/*.h \
		$(top_srcdir)/libexslt/*.c
	-($(srcdir)/apibuild.py)
	($(XSLTPROC) checkapisym.xsl libxslt-api.xml)
	($(XSLTPROC) -o ../libxslt/libxslt.syms syms.xsl symbols.xml)

xsltproc.1: xsltproc.xml
	-@(xsltproc --nonet xsltproc.xml)

# Note that in the following, xmllint output is piped to xsltproc
search.php: $(srcdir)/api.xsl $(srcdir)/site.xsl $(srcdir)/search.templ \
            $(srcdir)/search.xml $(srcdir)/search.php.inc
	-@(if test -x $(bindir)/xmllint -a -x $(bindir)/xsltproc; then \
	   echo "Rebuilding search.php" ; \
	   $(bindir)/xmllint --xinclude --nonet \
	                      $(srcdir)/search.xml | \
	   $(bindir)/xsltproc --nonet - search.templ \
			      > search.php ; else \
	   echo "Unable to find xmllint or xsltproc in $(bindir)" ; fi)

$(WIN32_DIR)/libxslt.def.src: libxslt-api.xml
	-@(if [ -x $(bindir)/xsltproc ] ; then \
	  $(bindir)/xsltproc -o $(WIN32_DIR)/libxslt.def.src \
	  --nonet $(WIN32_DIR)/defgen.xsl libxslt-api.xml ; fi )

$(WIN32_DIR)/libexslt.def.src: EXSLT/libexslt-api.xml
	-@(if [ -x $(bindir)/xsltproc ] ; then \
	  $(bindir)/xsltproc -o $(WIN32_DIR)/libexslt.def.src \
	  --nonet $(WIN32_DIR)/defgen.xsl EXSLT/libexslt-api.xml ; fi )

clean-local:
	rm -f *~ *.bak *.hierarchy *.signals *-unused.txt

maintainer-clean-local: clean

rebuild: api eapi all

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
	-@INSTALL@ -m 0644 $(srcdir)/*.html $(DESTDIR)$(HTML_DIR)
	-@INSTALL@ -m 0644 $(srcdir)/*.gif $(DESTDIR)$(HTML_DIR)
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
	-@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
	-@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
	-@INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(HTML_DIR)/html
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/EXSLT
	-@INSTALL@ -m 0644 $(srcdir)/EXSLT/*.html $(DESTDIR)$(HTML_DIR)/EXSLT
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial
	-@INSTALL@ -m 0644 $(srcdir)/tutorial/* $(DESTDIR)$(HTML_DIR)/tutorial
	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial2
	-@INSTALL@ -m 0644 $(srcdir)/tutorial2/* $(DESTDIR)$(HTML_DIR)/tutorial2

dist-hook:
	(cd $(srcdir) ; tar cvf - *.1 *.html site.xsl news.xsl xsa.xsl \
	  *.gif *.png images html/*.html html/*.png tutorial*/libxslt*) | \
	  (cd $(distdir); tar xf -)

.PHONY : html EXSLT EXSLT/html