Avoid double slashes in URLs given to libdownload.
[pacman-ng.git] / doc / Makefile.am
blob476a21c387c69bd31e197c5aa64eebf7bb3e945f
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         PKGBUILD.5 \
11         makepkg.conf.5 \
12         pacman.conf.5 \
13         libalpm.3
15 DOXYGEN_MANS = $(wildcard man3/*.3)
17 EXTRA_DIST = \
18         pacman.8.txt \
19         makepkg.8.txt \
20         repo-add.8.txt \
21         PKGBUILD.5.txt \
22         PKGBUILD-example.txt \
23         makepkg.conf.5.txt \
24         pacman.conf.5.txt \
25         libalpm.3.txt \
26         footer.txt \
27         Doxyfile \
28         $(ASCIIDOC_MANS) \
29         $(DOXYGEN_MANS)
31 # Files that should be removed, but which Automake does not know.
32 MOSTLYCLEANFILES = *.xml
33 MAINTAINERCLEANFILES = $(ASCIIDOC_MANS)
35 if USE_GIT_VERSION
36 GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty
37 REAL_PACKAGE_VERSION = $(GIT_VERSION)
38 else
39 REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
40 endif
43 man_MANS =
44 dist_man_MANS = $(ASCIIDOC_MANS) repo-remove.8
46 if USE_DOXYGEN
47 man_MANS += $(DOXYGEN_MANS)
49 all: doxygen.in
51 doxygen.in:
52         $(DOXYGEN) $(srcdir)/Doxyfile
53 endif
55 if USE_ASCIIDOC
56 ASCIIDOC_OPTS = \
57         -f asciidoc.conf \
58         -a pacman_version="$(REAL_PACKAGE_VERSION)" \
59         -a pacman_date="`date +%Y-%m-%d`" \
60         -a sysconfdir=$(sysconfdir)
61 A2X_OPTS = \
62         -d manpage \
63         -f manpage \
64         --xsltproc-opts='-param man.endnotes.list.enabled 0' \
65         --xsltproc-opts='-param man.endnotes.are.numbered 0'
67 $(ASCIIDOC_MANS):
68         a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt
70 # These rules are due to the includes and files of the asciidoc text
71 $(ASCIIDOC_MANS): asciidoc.conf footer.txt
72 pacman.8: pacman.8.txt
73 makepkg.8: makepkg.8.txt
74 repo-add.8: repo-add.8.txt
75 PKGBUILD.5: PKGBUILD.5.txt PKGBUILD-example.txt
76 makepkg.conf.5: makepkg.conf.5.txt
77 pacman.conf.5: pacman.conf.5.txt
78 libalpm.3: libalpm.3.txt
79 # this one is just a symlink
80 repo-remove.8: repo-add.8
81         ln -s repo-add.8 repo-remove.8
82 endif
84 # vim:set ts=2 sw=2 noet: