Prefix alpm_transevt_t members with ALPM
[pacman-ng.git] / doc / Makefile.am
blob4fb578037c65cd6666141dfb241e6e35d18d3788
1 # We have to do some funny stuff here with the manpages. In order to ensure
2 # a dist tarball doesn't get put out there without manpages, we keep those
3 # files listed in EXTRA_DIST no matter what. However, we only add them to
4 # man_MANS if --enable-asciidoc and/or --enable-doxygen are used.
6 ASCIIDOC_MANS = \
7         pacman.8 \
8         makepkg.8 \
9         repo-add.8 \
10         vercmp.8 \
11         pkgdelta.8 \
12         pacman-key.8 \
13         PKGBUILD.5 \
14         makepkg.conf.5 \
15         pacman.conf.5 \
16         libalpm.3
18 DOXYGEN_MANS = $(wildcard man3/*.3)
20 HTML_MANPAGES = \
21         pacman.8.html \
22         makepkg.8.html \
23         repo-add.8.html \
24         vercmp.8.html \
25         pkgdelta.8.html \
26         pacman-key.8.html \
27         PKGBUILD.5.html \
28         makepkg.conf.5.html \
29         pacman.conf.5.html \
30         libalpm.3.html
32 HTML_OTHER = \
33         index.html \
34         submitting-patches.html \
35         translation-help.html \
36         HACKING.html
38 HTML_DOCS = \
39         $(HTML_MANPAGES) \
40         $(HTML_OTHER)
42 EXTRA_DIST = \
43         asciidoc.conf \
44         pacman.8.txt \
45         makepkg.8.txt \
46         repo-add.8.txt \
47         vercmp.8.txt \
48         pkgdelta.8.txt \
49         pacman-key.8.txt \
50         PKGBUILD.5.txt \
51         PKGBUILD-example.txt \
52         makepkg.conf.5.txt \
53         pacman.conf.5.txt \
54         libalpm.3.txt \
55         footer.txt \
56         index.txt \
57         submitting-patches.txt \
58         translation-help.txt \
59         Doxyfile \
60         $(ASCIIDOC_MANS) \
61         $(DOXYGEN_MANS)
63 # Files that should be removed, but which Automake does not know.
64 MOSTLYCLEANFILES = *.xml $(ASCIIDOC_MANS) $(HTML_DOCS) repo-remove.8 website.tar.gz
66 # Ensure manpages are fresh when building a dist tarball
67 dist-hook:
68         $(MAKE) $(AM_MAKEFLAGS) clean
69         $(MAKE) $(AM_MAKEFLAGS) all
71 if USE_GIT_VERSION
72 GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
73 REAL_PACKAGE_VERSION = $(GIT_VERSION)
74 else
75 REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
76 endif
78 man_MANS =
79 dist_man_MANS = $(ASCIIDOC_MANS) repo-remove.8
81 if USE_DOXYGEN
82 man_MANS += $(DOXYGEN_MANS)
84 all-local: doxygen.in
86 doxygen.in:
87         $(DOXYGEN) $(srcdir)/Doxyfile
88 endif
90 html: $(HTML_DOCS)
92 website: html
93         bsdtar czf website.tar.gz $(HTML_DOCS) \
94                 -C /etc/asciidoc/stylesheets/ \
95                 asciidoc.css asciidoc-manpage.css \
96                 -C /etc/asciidoc/javascripts/ \
97                 asciidoc.js \
98                 -C /etc/asciidoc/ \
99                 images
101 pkgdatadir = ${datadir}/${PACKAGE}
103 ASCIIDOC_OPTS = \
104         -f $(srcdir)/asciidoc.conf \
105         -a pacman_version="$(REAL_PACKAGE_VERSION)" \
106         -a pacman_date="`date +%Y-%m-%d`" \
107         -a pkgdatadir=$(pkgdatadir) \
108         -a localstatedir=$(localstatedir) \
109         -a sysconfdir=$(sysconfdir)
111 A2X_OPTS = \
112         --no-xmllint \
113         -d manpage \
114         -f manpage \
115         --xsltproc-opts='-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0' \
116         --destination-dir='./'
118 # These rules are due to the includes and files of the asciidoc text
119 $(ASCIIDOC_MANS): asciidoc.conf footer.txt
120         a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS) --out-file=./$@.xml" $(srcdir)/$@.txt
122 %.html: %.txt
123         asciidoc $(ASCIIDOC_OPTS) $*.txt
124         dos2unix $@
126 HACKING.html: ../HACKING
127         asciidoc $(ASCIIDOC_OPTS) -o $@ ../HACKING
128         dos2unix $@
130 # Customizations for certain HTML docs
131 $(HTML_MANPAGES): asciidoc.conf footer.txt
132 $(HTML_OTHER): asciidoc.conf
133 %.html: ASCIIDOC_OPTS += -a linkcss -a toc -a icons
134 %.8.html: ASCIIDOC_OPTS += -d manpage
135 %.5.html: ASCIIDOC_OPTS += -d manpage
136 %.3.html: ASCIIDOC_OPTS += -d manpage
138 # Dependency rules
139 pacman.8 pacman.8.html: pacman.8.txt
140 makepkg.8 makepkg.8.html: makepkg.8.txt
141 repo-add.8 repo-add.8.html: repo-add.8.txt
142 vercmp.8 vercmp.8.html: vercmp.8.txt
143 pkgdelta.8 pkgdelta.8.html: pkgdelta.8.txt
144 pacman-key.8 pacman-key.8.html: pacman-key.8.txt
145 PKGBUILD.5 PKGBUILD.5.html: PKGBUILD.5.txt PKGBUILD-example.txt
146 makepkg.conf.5 makepkg.conf.5.html: makepkg.conf.5.txt
147 pacman.conf.5 pacman.conf.5.html: pacman.conf.5.txt
148 libalpm.3 libalpm.3.html: libalpm.3.txt
149 # this one is just a symlink
150 repo-remove.8: repo-add.8
151         rm -f repo-remove.8
152         $(LN_S) repo-add.8 repo-remove.8
154 # vim:set ts=2 sw=2 noet: