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.
18 DOXYGEN_MANS = $(wildcard man3/*.3)
34 submitting-patches.html \
35 translation-help.html \
44 asciidoc-override.css \
52 PKGBUILD-example.txt \
58 submitting-patches.txt \
59 translation-help.txt \
64 # Files that should be removed, but which Automake does not know.
65 MOSTLYCLEANFILES = *.xml $(ASCIIDOC_MANS) $(HTML_DOCS) repo-remove.8 website.tar.gz
67 # Ensure manpages are fresh when building a dist tarball
69 $(MAKE) $(AM_MAKEFLAGS) clean
70 $(MAKE) $(AM_MAKEFLAGS) all
73 GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
74 REAL_PACKAGE_VERSION = $(GIT_VERSION)
76 REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
80 dist_man_MANS = $(ASCIIDOC_MANS)
83 man_MANS += $(DOXYGEN_MANS)
88 $(DOXYGEN) $(srcdir)/Doxyfile
93 website: website.tar.gz
96 $(AM_V_GEN)bsdtar czf $@ $(HTML_DOCS) \
97 asciidoc-override.css \
98 -C /etc/asciidoc/stylesheets/ \
100 -C /etc/asciidoc/javascripts/ \
105 pkgdatadir = ${datadir}/${PACKAGE}
108 -f $(srcdir)/asciidoc.conf \
109 -a pacman_version="$(REAL_PACKAGE_VERSION)" \
110 -a pacman_date="`date +%Y-%m-%d`" \
111 -a pkgdatadir=$(pkgdatadir) \
112 -a localstatedir=$(localstatedir) \
113 -a sysconfdir=$(sysconfdir)
119 --xsltproc-opts='-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0' \
120 --destination-dir='./'
122 # These rules are due to the includes and files of the asciidoc text
123 $(ASCIIDOC_MANS): asciidoc.conf footer.txt Makefile
124 $(AM_V_GEN)a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS) --out-file=./$@.xml" $(srcdir)/$@.txt
127 $(AM_V_GEN)asciidoc $(ASCIIDOC_OPTS) -o - $*.txt | \
128 sed -e 's/\r$$//' > $@
130 HACKING.html: ../HACKING
131 $(AM_V_GEN)asciidoc $(ASCIIDOC_OPTS) -o - ../HACKING | \
132 sed -e 's/\r$$//' > $@
134 # Customizations for certain HTML docs
135 $(HTML_MANPAGES): asciidoc.conf footer.txt Makefile
136 $(HTML_OTHER): asciidoc.conf Makefile
137 %.html: ASCIIDOC_OPTS += -a linkcss -a toc -a icons -a max-width=960px -a stylesheet=asciidoc-override.css
138 %.8.html: ASCIIDOC_OPTS += -d manpage
139 %.5.html: ASCIIDOC_OPTS += -d manpage
140 %.3.html: ASCIIDOC_OPTS += -d manpage
143 pacman.8 pacman.8.html: pacman.8.txt
144 makepkg.8 makepkg.8.html: makepkg.8.txt
145 repo-add.8 repo-add.8.html: repo-add.8.txt
146 vercmp.8 vercmp.8.html: vercmp.8.txt
147 pkgdelta.8 pkgdelta.8.html: pkgdelta.8.txt
148 pacman-key.8 pacman-key.8.html: pacman-key.8.txt
149 PKGBUILD.5 PKGBUILD.5.html: PKGBUILD.5.txt PKGBUILD-example.txt
150 makepkg.conf.5 makepkg.conf.5.html: makepkg.conf.5.txt
151 pacman.conf.5 pacman.conf.5.html: pacman.conf.5.txt
152 libalpm.3 libalpm.3.html: libalpm.3.txt
153 # this one is just a symlink
154 repo-remove.8: repo-add.8
156 $(LN_S) repo-add.8 repo-remove.8
159 cd $(DESTDIR)$(mandir)/man8 && \
160 $(RM) repo-remove.8 && \
161 ( $(LN_S) repo-add.8 repo-remove.8 || \
162 ln repo-add.8 repo-remove.8 || \
163 cp repo-add.8 repo-remove.8 )
166 $(RM) $(DESTDIR)$(mandir)/man8/repo-remove.8
168 # vim:set ts=2 sw=2 noet: