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 \
|
2013-04-30 18:18:17 -04:00
|
|
|
makepkg-template.1 \
|
2007-07-09 14:22:01 -04:00
|
|
|
repo-add.8 \
|
2011-01-07 21:59:51 -05:00
|
|
|
vercmp.8 \
|
2011-03-25 20:26:08 -04:00
|
|
|
pkgdelta.8 \
|
2010-11-20 08:15:05 -05:00
|
|
|
pacman-key.8 \
|
2012-06-27 01:02:18 -04:00
|
|
|
pactree.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 \
|
2013-04-30 18:18:17 -04:00
|
|
|
makepkg-template.1.html \
|
2009-04-11 13:34:15 -04:00
|
|
|
repo-add.8.html \
|
2011-01-07 21:59:51 -05:00
|
|
|
vercmp.8.html \
|
2011-03-25 20:26:08 -04:00
|
|
|
pkgdelta.8.html \
|
2010-11-20 08:15:05 -05:00
|
|
|
pacman-key.8.html \
|
2012-06-27 01:02:18 -04:00
|
|
|
pactree.8.html \
|
2009-04-11 13:34:15 -04:00
|
|
|
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 \
|
2011-10-13 15:49:48 -04:00
|
|
|
asciidoc-override.css \
|
2007-07-01 17:55:44 -04:00
|
|
|
pacman.8.txt \
|
|
|
|
makepkg.8.txt \
|
2013-04-30 18:18:17 -04:00
|
|
|
makepkg-template.1.txt \
|
2007-07-09 14:22:01 -04:00
|
|
|
repo-add.8.txt \
|
2011-01-07 21:59:51 -05:00
|
|
|
vercmp.8.txt \
|
2011-03-25 20:26:08 -04:00
|
|
|
pkgdelta.8.txt \
|
2010-11-20 08:15:05 -05:00
|
|
|
pacman-key.8.txt \
|
2012-06-27 01:02:18 -04:00
|
|
|
pactree.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.
|
2010-12-29 21:06:40 -05:00
|
|
|
MOSTLYCLEANFILES = *.xml $(ASCIIDOC_MANS) $(HTML_DOCS) repo-remove.8 website.tar.gz
|
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
|
2011-01-22 09:15:16 -05:00
|
|
|
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
|
2008-06-08 18:26:02 -04:00
|
|
|
REAL_PACKAGE_VERSION = $(GIT_VERSION)
|
|
|
|
else
|
|
|
|
REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
|
|
|
|
endif
|
|
|
|
|
2007-12-22 00:47:18 -05:00
|
|
|
man_MANS =
|
2011-08-12 18:45:20 -04:00
|
|
|
dist_man_MANS = $(ASCIIDOC_MANS)
|
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)
|
|
|
|
|
2011-12-07 13:33:41 -05:00
|
|
|
website: website.tar.gz
|
|
|
|
|
2012-04-24 21:44:29 -04:00
|
|
|
.PHONY: html website
|
|
|
|
|
2011-12-07 13:33:41 -05:00
|
|
|
website.tar.gz: html
|
|
|
|
$(AM_V_GEN)bsdtar czf $@ $(HTML_DOCS) \
|
2011-10-13 15:49:48 -04:00
|
|
|
asciidoc-override.css \
|
2010-07-02 19:20:36 -04:00
|
|
|
-C /etc/asciidoc/stylesheets/ \
|
2011-10-13 15:49:48 -04:00
|
|
|
asciidoc.css \
|
2010-07-02 19:20:36 -04:00
|
|
|
-C /etc/asciidoc/javascripts/ \
|
2011-06-01 13:10:32 -04:00
|
|
|
asciidoc.js \
|
2010-07-02 19:20:36 -04:00
|
|
|
-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 = \
|
2011-06-13 07:53:23 -04:00
|
|
|
-f $(srcdir)/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) \
|
2010-10-11 19:23:16 -04:00
|
|
|
-a localstatedir=$(localstatedir) \
|
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 \
|
2014-08-07 19:22:21 -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
|
2011-12-24 05:21:51 -05:00
|
|
|
$(ASCIIDOC_MANS): asciidoc.conf footer.txt Makefile.am
|
2011-12-07 13:33:41 -05:00
|
|
|
$(AM_V_GEN)a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS) --out-file=./$@.xml" $(srcdir)/$@.txt
|
2008-08-05 22:03:59 -04:00
|
|
|
|
2009-04-11 13:34:15 -04:00
|
|
|
%.html: %.txt
|
2011-12-07 13:33:41 -05:00
|
|
|
$(AM_V_GEN)asciidoc $(ASCIIDOC_OPTS) -o - $*.txt | \
|
|
|
|
sed -e 's/\r$$//' > $@
|
2009-04-11 13:34:15 -04:00
|
|
|
|
2009-10-04 17:56:25 -04:00
|
|
|
HACKING.html: ../HACKING
|
2011-12-07 13:33:41 -05:00
|
|
|
$(AM_V_GEN)asciidoc $(ASCIIDOC_OPTS) -o - ../HACKING | \
|
|
|
|
sed -e 's/\r$$//' > $@
|
2009-10-04 17:56:25 -04:00
|
|
|
|
2009-04-11 13:34:15 -04:00
|
|
|
# Customizations for certain HTML docs
|
2011-12-24 05:21:51 -05:00
|
|
|
$(HTML_MANPAGES): asciidoc.conf footer.txt Makefile.am
|
|
|
|
$(HTML_OTHER): asciidoc.conf Makefile.am
|
2011-10-13 15:49:48 -04:00
|
|
|
%.html: ASCIIDOC_OPTS += -a linkcss -a toc -a icons -a max-width=960px -a stylesheet=asciidoc-override.css
|
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
|
2013-04-30 18:18:17 -04:00
|
|
|
makepkg-template.1 makepkg-template.1.html: makepkg-template.1.txt
|
2009-04-11 13:34:15 -04:00
|
|
|
repo-add.8 repo-add.8.html: repo-add.8.txt
|
2011-01-07 21:59:51 -05:00
|
|
|
vercmp.8 vercmp.8.html: vercmp.8.txt
|
2011-03-25 20:26:08 -04:00
|
|
|
pkgdelta.8 pkgdelta.8.html: pkgdelta.8.txt
|
2010-11-20 08:15:05 -05:00
|
|
|
pacman-key.8 pacman-key.8.html: pacman-key.8.txt
|
2012-06-27 01:02:18 -04:00
|
|
|
pactree.8 pactree.8.html: pactree.8.txt
|
2009-04-11 13:34:15 -04:00
|
|
|
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
|
2011-08-15 13:31:34 -04:00
|
|
|
$(RM) repo-remove.8
|
2008-08-05 22:03:59 -04:00
|
|
|
$(LN_S) repo-add.8 repo-remove.8
|
2007-07-06 11:30:53 -04:00
|
|
|
|
2011-08-12 18:45:20 -04:00
|
|
|
install-data-hook:
|
|
|
|
cd $(DESTDIR)$(mandir)/man8 && \
|
2011-09-13 07:47:11 -04:00
|
|
|
$(RM) repo-remove.8 && \
|
2011-08-12 18:45:20 -04:00
|
|
|
( $(LN_S) repo-add.8 repo-remove.8 || \
|
|
|
|
ln repo-add.8 repo-remove.8 || \
|
|
|
|
cp repo-add.8 repo-remove.8 )
|
|
|
|
|
|
|
|
uninstall-hook:
|
|
|
|
$(RM) $(DESTDIR)$(mandir)/man8/repo-remove.8
|
|
|
|
|
2014-01-22 18:06:11 -05:00
|
|
|
# vim:set noet:
|