root/trunk/doc/Makefile.am

Revision 3609, 2.4 KB (checked in by alonbl, 7 days ago)

Fix doc build issues
1. VPATH issue.
2. Parallel build issue, suggested by Ludovic Rousseau.

Line 
1MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
2
3wikidir=$(htmldir)/wiki
4
5if ENABLE_DOC
6SUBDIRS = nonpersistent
7endif
8DIST_SUBDIRS = nonpersistent
9
10dist_noinst_DATA = $(srcdir)/tools/*.xml \
11        $(srcdir)/api/*.xml \
12        $(srcdir)/api/apps/*.xml \
13        $(srcdir)/api/asn1/*.xml \
14        $(srcdir)/api/card/*.xml \
15        $(srcdir)/api/file/*.xml \
16        $(srcdir)/api/init/*.xml \
17        $(srcdir)/api/misc/*.xml \
18        $(srcdir)/api/types/*.xml \
19        $(srcdir)/api/util/*.xml \
20        $(srcdir)/api/api.css \
21        $(srcdir)/api/*.xsl
22
23if ENABLE_DOC
24dist_html_DATA = html.out/*
25else
26dist_noinst_DATA += html.out/*
27endif
28dist_doc_DATA = README
29if WIN32
30dist_noinst_DATA += man.out/*.1 man.out/*.3 man.out/*.5
31else
32dist_man1_MANS = man.out/*.1
33dist_man3_MANS = man.out/*.3
34dist_man5_MANS = man.out/*.5
35endif
36
37if SVN_CHECKOUT
38if ENABLE_MAN
39
40html.out/*: html.out
41html.out: api.work
42        test -n "$(XSLTPROC)"
43        -rm -fr html.tmp html.out
44        $(MKDIR_P) html.tmp
45        $(XSLTPROC) --nonet --path "$(srcdir)/api" --xinclude -o "html.tmp/api.html" "api.work/html.xsl" "$(srcdir)/api/api.xml"
46        $(XSLTPROC) --nonet --path "$(srcdir)/api" --xinclude -o "html.tmp/tools.html" "api.work/html.xsl" "$(srcdir)/tools/tools.xml"
47        mv html.tmp html.out
48
49man.out/*.1: man.out
50man.out: api.work
51        test -n "$(XSLTPROC)"
52        -rm -fr man.tmp man.out
53        $(MKDIR_P) man.tmp
54        $(XSLTPROC) --nonet --path "$(srcdir)/api" --xinclude -o "man.tmp/" "api.work/man.xsl" "$(srcdir)/api/api.xml"
55        $(XSLTPROC) --nonet --path "$(srcdir)/api" --xinclude -o "man.tmp/" "api.work/man.xsl" "$(srcdir)/tools/tools.xml"
56        mv man.tmp man.out
57
58man.out/*.3 man.out/*.5:        man.out/*.1
59
60#
61# This part is needed as found no
62# way to make xsltproc find xsl-stylesheets
63# in builddir while xsl on srcdir
64#
65api.work:       \
66                $(abs_srcdir)/api/html.xsl \
67                $(abs_srcdir)/api/man.xsl
68        -rm -fr api.work
69        $(MKDIR_P) api.work
70        $(LN_S) "$(abs_srcdir)/api/html.xsl" api.work/html.xsl
71        $(LN_S) "$(abs_srcdir)/api/man.xsl" api.work/man.xsl
72        $(LN_S) "$(xslstylesheetsdir)" api.work/xsl-stylesheets
73
74else
75
76html.out/*:
77man.out/*.1:
78man.out/*.3 man.out/*.5:        man.out/*.1
79
80endif
81else
82
83html.out/*:     $(abs_builddir)/html.out
84$(abs_builddir)/html.out:
85        $(LN_S) "$(srcdir)/html.out" html.out
86
87man.out/*.3 man.out/*.5 man.out/*.1:    $(abs_builddir)/man.out
88$(abs_builddir)/man.out:
89        $(LN_S) "$(srcdir)/man.out" man.out
90
91endif
92
93maintainer-clean-local:
94        -rm -rf "$(srcdir)/html.out" "$(srcdir)/man.out"
95
96distclean-local:
97        -rm -fr html.tmp man.tmp api.work
98        if test -L html.out; then \
99                rm -rf html.out; \
100        fi
101        if test -L man.out; then \
102                rm -rf man.out; \
103        fi
104
Note: See TracBrowser for help on using the browser.