summaryrefslogtreecommitdiff
path: root/doc/Makefile.am
blob: 9bacca8b0930598a94d7c4543296ec553f840a3d (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
## Process this file with automake to produce Makefile.in
EXTRA_DIST = 			\
	libxslt-api.xml		\
	libxslt-decl.txt	\
	xsltproc.xml		\
	apibuild.py

# The name of the module.
DOC_MODULE=libxslt-$(VERSION)

# The top-level SGML file.
DOC_MAIN_SGML_FILE=libxslt.sgml

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

HTML_DIR=$(datadir)/doc

TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)/html
PAGES= API.html bugs.html contribs.html docs.html downloads.html \
       help.html index.html intro.html news.html xsltproc2.html FAQ.html
APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
    APIsymbols.html APIchunk0.html

man_MANS = xsltproc.1

all : $(PAGES)

web: $(PAGES) $(APIPAGES)

$(PAGES): $(srcdir)/xslt.html $(srcdir)/site.xsl
	-@(if [ -x $(bindir)/xsltproc ] ; then \
	  $(bindir)/xsltproc --html $(srcdir)/site.xsl $(srcdir)/xslt.html > index.html ; fi )

$(APIPAGES): libxslt-refs.xml site.xsl api.xsl
	-@(if [ -x $(bindir)/xsltproc ] ; then \
	  $(bindir)/xsltproc --html $(srcdir)/api.xsl $(srcdir)/xslt.html ; fi );

scan:
	-gtkdoc-scan --module=libxslt --source-dir=$(DOC_SOURCE_DIR)/libxslt --ignore-headers="acconfig.h config.h win32config.h"
#	gtkdoc-scan --module=libexslt --source-dir=$(DOC_SOURCE_DIR)/libexslt --ignore-headers="acconfig.h config.h win32config.h"

templates: scan
	-gtkdoc-mktmpl --module=libxslt
#	gtkdoc-mktmpl --module=libexslt

sgml:
	-gtkdoc-mkdb --module=libxslt --source-dir=$(DOC_SOURCE_DIR)/libxslt
#	gtkdoc-mkdb --module=libxslt --source-dir=$(DOC_SOURCE_DIR)/libexslt

html:
	if ! test -d html ; then mkdir html ; fi
	-cd html && gtkdoc-mkhtml libxslt ../$(DOC_MAIN_SGML_FILE)

xml: sgml 
	if test -d xml ; then rm xml/* ; else mkdir xml ; fi
	-@(for s in sgml/*.sgml ; do name=`basename $$s .sgml` ; \
	   xmllint --sgml $$s > xml/"$$name".xml ; done)
	   
libxslt-api.xml: apibuild.py ../libxslt/*.h ../libxslt/*.c
	-(./apibuild.py)

api: libxslt-api.xml libxslt-refs.xml

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

maintainer-clean-local: clean
	rm -rf sgml html libxslt-decl-list.txt libxslt-decl.txt 

libxslt-decl-list.txt : templates

libxslt-sections.txt : scan
	cp libxslt-decl-list.txt libxslt-sections.txt

rebuild: libxslt-sections.txt templates sgml html

install-data-local: 
	$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
	-@INSTALL@ -m 0644 $(srcdir)/*.html $(DESTDIR)$(TARGET_DIR)
	-@INSTALL@ -m 0644 $(srcdir)/*.gif $(DESTDIR)$(TARGET_DIR)
	-@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(TARGET_DIR)
	-@INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR)
	$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/tutorial
	-@INSTALL@ -m 0644 $(srcdir)/tutorial/* $(DESTDIR)$(TARGET_DIR)/tutorial
	-(cd $(DESTDIR); gtkdoc-fixxref --module=libxslt --html-dir=$(HTML_DIR))

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

.PHONY : html sgml templates scan