2007-09-23 22:19:06 -04:00
|
|
|
# We have to do some funny stuff here with the manpages. In order to ensure
|
|
|
|
# a dist tarball doesn't get put out there without manpages, we keep those
|
|
|
|
# files listed in EXTRA_DIST no matter what. However, we only add them to
|
2007-11-13 00:36:20 -05:00
|
|
|
# man_MANS if --enable-asciidoc and/or --enable-doxygen are used.
|
2007-09-23 22:19:06 -04:00
|
|
|
|
2007-07-06 16:54:18 -04:00
|
|
|
ASCIIDOC_MANS = \
|
2007-02-21 23:36:02 -05:00
|
|
|
pacman.8 \
|
|
|
|
makepkg.8 \
|
2007-07-09 14:22:01 -04:00
|
|
|
repo-add.8 \
|
2007-02-21 23:36:02 -05:00
|
|
|
PKGBUILD.5 \
|
|
|
|
makepkg.conf.5 \
|
|
|
|
pacman.conf.5 \
|
|
|
|
libalpm.3
|
2006-02-17 15:48:45 -05:00
|
|
|
|
2007-07-09 14:38:02 -04:00
|
|
|
DOXYGEN_MANS = $(wildcard man3/*.3)
|
2007-11-13 00:36:20 -05:00
|
|
|
|
2009-04-11 13:34:15 -04:00
|
|
|
HTML_MANPAGES = \
|
|
|
|
pacman.8.html \
|
|
|
|
makepkg.8.html \
|
|
|
|
repo-add.8.html \
|
|
|
|
PKGBUILD.5.html \
|
|
|
|
makepkg.conf.5.html \
|
|
|
|
pacman.conf.5.html \
|
|
|
|
libalpm.3.html
|
|
|
|
|
|
|
|
HTML_OTHER = \
|
2009-04-11 13:38:20 -04:00
|
|
|
index.html \
|
|
|
|
submitting-patches.html \
|
2009-10-04 17:56:25 -04:00
|
|
|
translation-help.html \
|
|
|
|
HACKING.html
|
2009-04-11 13:34:15 -04:00
|
|
|
|
|
|
|
HTML_DOCS = \
|
|
|
|
$(HTML_MANPAGES) \
|
|
|
|
$(HTML_OTHER)
|
|
|
|
|
2007-07-01 17:55:44 -04:00
|
|
|
EXTRA_DIST = \
|
2008-08-05 22:03:59 -04:00
|
|
|
asciidoc.conf \
|
2007-07-01 17:55:44 -04:00
|
|
|
pacman.8.txt \
|
|
|
|
makepkg.8.txt \
|
2007-07-09 14:22:01 -04:00
|
|
|
repo-add.8.txt \
|
2007-07-01 17:55:44 -04:00
|
|
|
PKGBUILD.5.txt \
|
2007-07-06 11:30:53 -04:00
|
|
|
PKGBUILD-example.txt \
|
2007-07-01 17:55:44 -04:00
|
|
|
makepkg.conf.5.txt \
|
|
|
|
pacman.conf.5.txt \
|
|
|
|
libalpm.3.txt \
|
|
|
|
footer.txt \
|
2009-04-11 13:34:15 -04:00
|
|
|
index.txt \
|
2009-04-11 13:38:20 -04:00
|
|
|
submitting-patches.txt \
|
|
|
|
translation-help.txt \
|
2007-07-09 14:38:02 -04:00
|
|
|
Doxyfile \
|
2007-11-13 00:36:20 -05:00
|
|
|
$(ASCIIDOC_MANS) \
|
|
|
|
$(DOXYGEN_MANS)
|
2007-07-01 17:55:44 -04:00
|
|
|
|
|
|
|
# Files that should be removed, but which Automake does not know.
|
2009-05-12 12:04:11 -04:00
|
|
|
MOSTLYCLEANFILES = *.xml $(ASCIIDOC_MANS) $(HTML_DOCS) repo-remove.8
|
2008-08-05 22:03:59 -04:00
|
|
|
|
|
|
|
# Ensure manpages are fresh when building a dist tarball
|
|
|
|
dist-hook:
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) clean
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) all
|
2007-12-22 00:47:18 -05:00
|
|
|
|
2008-06-08 18:26:02 -04:00
|
|
|
if USE_GIT_VERSION
|
|
|
|
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty
|
|
|
|
REAL_PACKAGE_VERSION = $(GIT_VERSION)
|
|
|
|
else
|
|
|
|
REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
|
|
|
|
endif
|
|
|
|
|
2007-12-22 00:47:18 -05:00
|
|
|
man_MANS =
|
2008-01-02 21:44:09 -05:00
|
|
|
dist_man_MANS = $(ASCIIDOC_MANS) repo-remove.8
|
2007-07-06 01:56:11 -04:00
|
|
|
|
2007-07-09 14:38:02 -04:00
|
|
|
if USE_DOXYGEN
|
2007-12-22 00:47:18 -05:00
|
|
|
man_MANS += $(DOXYGEN_MANS)
|
|
|
|
|
2008-08-05 22:03:59 -04:00
|
|
|
all-local: doxygen.in
|
2007-07-01 18:40:43 -04:00
|
|
|
|
|
|
|
doxygen.in:
|
2007-10-14 18:29:32 -04:00
|
|
|
$(DOXYGEN) $(srcdir)/Doxyfile
|
2007-07-01 18:40:43 -04:00
|
|
|
endif
|
2007-02-22 22:23:06 -05:00
|
|
|
|
2009-04-11 13:34:15 -04:00
|
|
|
html: $(HTML_DOCS)
|
|
|
|
|
2010-07-02 19:20:36 -04:00
|
|
|
website: html
|
|
|
|
bsdtar czf website.tar.gz $(HTML_DOCS) \
|
|
|
|
-C /etc/asciidoc/stylesheets/ \
|
|
|
|
xhtml11.css xhtml11-manpage.css xhtml11-quirks.css \
|
|
|
|
-C /etc/asciidoc/javascripts/ \
|
|
|
|
asciidoc-xhtml11.js \
|
|
|
|
-C /etc/asciidoc/ \
|
|
|
|
images
|
|
|
|
|
2010-05-13 19:11:50 -04:00
|
|
|
pkgdatadir = ${datadir}/${PACKAGE}
|
|
|
|
|
2007-07-09 14:38:02 -04:00
|
|
|
ASCIIDOC_OPTS = \
|
|
|
|
-f asciidoc.conf \
|
2008-06-08 18:26:02 -04:00
|
|
|
-a pacman_version="$(REAL_PACKAGE_VERSION)" \
|
2007-07-09 14:38:02 -04:00
|
|
|
-a pacman_date="`date +%Y-%m-%d`" \
|
2010-05-13 19:11:50 -04:00
|
|
|
-a pkgdatadir=$(pkgdatadir) \
|
2007-07-09 14:38:02 -04:00
|
|
|
-a sysconfdir=$(sysconfdir)
|
2009-08-08 12:22:52 -04:00
|
|
|
|
2007-11-08 22:56:53 -05:00
|
|
|
A2X_OPTS = \
|
2008-12-25 02:40:52 -05:00
|
|
|
--no-xmllint \
|
2007-11-08 22:56:53 -05:00
|
|
|
-d manpage \
|
|
|
|
-f manpage \
|
2009-08-08 12:22:52 -04:00
|
|
|
--xsltproc-opts='-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0'
|
2007-07-09 14:38:02 -04:00
|
|
|
|
2007-07-06 16:54:18 -04:00
|
|
|
# These rules are due to the includes and files of the asciidoc text
|
2010-06-16 22:01:09 -04:00
|
|
|
$(ASCIIDOC_MANS): asciidoc.conf footer.txt
|
|
|
|
a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt
|
2008-08-05 22:03:59 -04:00
|
|
|
|
2009-04-11 13:34:15 -04:00
|
|
|
%.html: %.txt
|
2010-07-02 19:20:36 -04:00
|
|
|
asciidoc $(ASCIIDOC_OPTS) $*.txt
|
2009-04-11 13:34:15 -04:00
|
|
|
dos2unix $@
|
|
|
|
|
2009-10-04 17:56:25 -04:00
|
|
|
HACKING.html: ../HACKING
|
2010-07-02 19:20:36 -04:00
|
|
|
asciidoc $(ASCIIDOC_OPTS) -o $@ ../HACKING
|
2009-10-04 17:56:25 -04:00
|
|
|
dos2unix $@
|
|
|
|
|
2009-04-11 13:34:15 -04:00
|
|
|
# Customizations for certain HTML docs
|
|
|
|
$(HTML_MANPAGES): asciidoc.conf footer.txt
|
|
|
|
$(HTML_OTHER): asciidoc.conf
|
2010-07-02 19:20:36 -04:00
|
|
|
%.html: ASCIIDOC_OPTS += -a linkcss -a toc -a icons
|
2009-04-11 13:34:15 -04:00
|
|
|
%.8.html: ASCIIDOC_OPTS += -d manpage
|
|
|
|
%.5.html: ASCIIDOC_OPTS += -d manpage
|
|
|
|
%.3.html: ASCIIDOC_OPTS += -d manpage
|
|
|
|
|
|
|
|
# Dependency rules
|
|
|
|
pacman.8 pacman.8.html: pacman.8.txt
|
|
|
|
makepkg.8 makepkg.8.html: makepkg.8.txt
|
|
|
|
repo-add.8 repo-add.8.html: repo-add.8.txt
|
|
|
|
PKGBUILD.5 PKGBUILD.5.html: PKGBUILD.5.txt PKGBUILD-example.txt
|
|
|
|
makepkg.conf.5 makepkg.conf.5.html: makepkg.conf.5.txt
|
|
|
|
pacman.conf.5 pacman.conf.5.html: pacman.conf.5.txt
|
|
|
|
libalpm.3 libalpm.3.html: libalpm.3.txt
|
2008-01-02 21:44:09 -05:00
|
|
|
# this one is just a symlink
|
|
|
|
repo-remove.8: repo-add.8
|
2008-08-05 22:03:59 -04:00
|
|
|
rm -f repo-remove.8
|
|
|
|
$(LN_S) repo-add.8 repo-remove.8
|
2007-07-06 11:30:53 -04:00
|
|
|
|
2007-06-04 17:49:09 -04:00
|
|
|
# vim:set ts=2 sw=2 noet:
|