Add new alpm_list_remove_item() function
[pacman-ng.git] / doc / Makefile.am
blob00a0e88dfe8a221e8cdd72f7ff588e45105154ea
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         PKGBUILD.5 \
12         makepkg.conf.5 \
13         pacman.conf.5 \
14         libalpm.3
16 DOXYGEN_MANS = $(wildcard man3/*.3)
18 HTML_MANPAGES = \
19         pacman.8.html \
20         makepkg.8.html \
21         repo-add.8.html \
22         vercmp.8.html \
23         PKGBUILD.5.html \
24         makepkg.conf.5.html \
25         pacman.conf.5.html \
26         libalpm.3.html
28 HTML_OTHER = \
29         index.html \
30         submitting-patches.html \
31         translation-help.html \
32         HACKING.html
34 HTML_DOCS = \
35         $(HTML_MANPAGES) \
36         $(HTML_OTHER)
38 EXTRA_DIST = \
39         asciidoc.conf \
40         pacman.8.txt \
41         makepkg.8.txt \
42         repo-add.8.txt \
43         vercmp.8.txt \
44         PKGBUILD.5.txt \
45         PKGBUILD-example.txt \
46         makepkg.conf.5.txt \
47         pacman.conf.5.txt \
48         libalpm.3.txt \
49         footer.txt \
50         index.txt \
51         submitting-patches.txt \
52         translation-help.txt \
53         Doxyfile \
54         $(ASCIIDOC_MANS) \
55         $(DOXYGEN_MANS)
57 # Files that should be removed, but which Automake does not know.
58 MOSTLYCLEANFILES = *.xml $(ASCIIDOC_MANS) $(HTML_DOCS) repo-remove.8 website.tar.gz
60 # Ensure manpages are fresh when building a dist tarball
61 dist-hook:
62         $(MAKE) $(AM_MAKEFLAGS) clean
63         $(MAKE) $(AM_MAKEFLAGS) all
65 if USE_GIT_VERSION
66 GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
67 REAL_PACKAGE_VERSION = $(GIT_VERSION)
68 else
69 REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
70 endif
72 man_MANS =
73 dist_man_MANS = $(ASCIIDOC_MANS) repo-remove.8
75 if USE_DOXYGEN
76 man_MANS += $(DOXYGEN_MANS)
78 all-local: doxygen.in
80 doxygen.in:
81         $(DOXYGEN) $(srcdir)/Doxyfile
82 endif
84 html: $(HTML_DOCS)
86 website: html
87         bsdtar czf website.tar.gz $(HTML_DOCS) \
88                 -C /etc/asciidoc/stylesheets/ \
89                 xhtml11.css xhtml11-manpage.css xhtml11-quirks.css \
90                 -C /etc/asciidoc/javascripts/ \
91                 asciidoc-xhtml11.js \
92                 -C /etc/asciidoc/ \
93                 images
95 pkgdatadir = ${datadir}/${PACKAGE}
97 ASCIIDOC_OPTS = \
98         -f asciidoc.conf \
99         -a pacman_version="$(REAL_PACKAGE_VERSION)" \
100         -a pacman_date="`date +%Y-%m-%d`" \
101         -a pkgdatadir=$(pkgdatadir) \
102         -a localstatedir=$(localstatedir) \
103         -a sysconfdir=$(sysconfdir)
105 A2X_OPTS = \
106         --no-xmllint \
107         -d manpage \
108         -f manpage \
109         --xsltproc-opts='-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0'
111 # These rules are due to the includes and files of the asciidoc text
112 $(ASCIIDOC_MANS): asciidoc.conf footer.txt
113         a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt
115 %.html: %.txt
116         asciidoc $(ASCIIDOC_OPTS) $*.txt
117         dos2unix $@
119 HACKING.html: ../HACKING
120         asciidoc $(ASCIIDOC_OPTS) -o $@ ../HACKING
121         dos2unix $@
123 # Customizations for certain HTML docs
124 $(HTML_MANPAGES): asciidoc.conf footer.txt
125 $(HTML_OTHER): asciidoc.conf
126 %.html: ASCIIDOC_OPTS += -a linkcss -a toc -a icons
127 %.8.html: ASCIIDOC_OPTS += -d manpage
128 %.5.html: ASCIIDOC_OPTS += -d manpage
129 %.3.html: ASCIIDOC_OPTS += -d manpage
131 # Dependency rules
132 pacman.8 pacman.8.html: pacman.8.txt
133 makepkg.8 makepkg.8.html: makepkg.8.txt
134 repo-add.8 repo-add.8.html: repo-add.8.txt
135 vercmp.8 vercmp.8.html: vercmp.8.txt
136 PKGBUILD.5 PKGBUILD.5.html: PKGBUILD.5.txt PKGBUILD-example.txt
137 makepkg.conf.5 makepkg.conf.5.html: makepkg.conf.5.txt
138 pacman.conf.5 pacman.conf.5.html: pacman.conf.5.txt
139 libalpm.3 libalpm.3.html: libalpm.3.txt
140 # this one is just a symlink
141 repo-remove.8: repo-add.8
142         rm -f repo-remove.8
143         $(LN_S) repo-add.8 repo-remove.8
145 # vim:set ts=2 sw=2 noet: