diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-07-18 15:14:54 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2016-08-30 20:08:34 +1000 |
commit | 6c15cc4d22e049486a5f773f5d81777b6087510b (patch) | |
tree | 2de201dc581ed1a9b6ea284d3d49f3ecbd0090db /contrib | |
parent | 6d8e3d2a9171df8cbe479d0a582c468970802aed (diff) | |
download | pacman-6c15cc4d22e049486a5f773f5d81777b6087510b.tar.xz |
contrib: Add documentation Makefile
Makefile.am is mostly copied from ./doc/Makefile.am
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/Makefile.am | 6 | ||||
-rw-r--r-- | contrib/doc/Makefile.am | 54 | ||||
l--------- | contrib/doc/asciidoc.conf | 1 | ||||
l--------- | contrib/doc/footer.txt | 1 |
4 files changed, 62 insertions, 0 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am index e34b43e2..897cd856 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -1,5 +1,11 @@ # enforce that all scripts have a --help and --version option AUTOMAKE_OPTIONS = std-options +SUBDIRS= +if WANT_DOC +SUBDIRS += doc +endif + +DIST_SUBDIRS = $(SUBDIRS) bin_SCRIPTS = \ $(OURSCRIPTS) diff --git a/contrib/doc/Makefile.am b/contrib/doc/Makefile.am new file mode 100644 index 00000000..6417ac5a --- /dev/null +++ b/contrib/doc/Makefile.am @@ -0,0 +1,54 @@ +# 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 +# man_MANS if --enable-asciidoc and/or --enable-doxygen are used. + +ASCIIDOC_MANS = + +EXTRA_DIST = \ + asciidoc.conf \ + footer.txt \ + $(ASCIIDOC_MANS) + +# Files that should be removed, but which Automake does not know. +MOSTLYCLEANFILES = *.xml $(ASCIIDOC_MANS) + +# Ensure manpages are fresh when building a dist tarball +dist-hook: + $(MAKE) $(AM_MAKEFLAGS) clean + $(MAKE) $(AM_MAKEFLAGS) all + +if USE_GIT_VERSION +GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//') +REAL_PACKAGE_VERSION = $(GIT_VERSION) +else +REAL_PACKAGE_VERSION = $(PACKAGE_VERSION) +endif + +man_MANS = +dist_man_MANS = $(ASCIIDOC_MANS) + +pkgdatadir = ${datadir}/${PACKAGE} + +ASCIIDOC_OPTS = \ + -f $(srcdir)/asciidoc.conf \ + -a pacman_version="$(REAL_PACKAGE_VERSION)" \ + -a pacman_date="`date +%Y-%m-%d`" \ + -a pkgdatadir=$(pkgdatadir) \ + -a localstatedir=$(localstatedir) \ + -a sysconfdir=$(sysconfdir) \ + -a datarootdir=$(datarootdir) + +A2X_OPTS = \ + --no-xmllint \ + -d manpage \ + -f manpage \ + --xsltproc-opts='-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0' + +# These rules are due to the includes and files of the asciidoc text +$(ASCIIDOC_MANS): asciidoc.conf footer.txt Makefile.am + $(AM_V_GEN)a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS) --out-file=./$@" $(srcdir)/$@.txt + +# Dependency rules + +# vim:set noet: diff --git a/contrib/doc/asciidoc.conf b/contrib/doc/asciidoc.conf new file mode 120000 index 00000000..ff9653d3 --- /dev/null +++ b/contrib/doc/asciidoc.conf @@ -0,0 +1 @@ +../../doc/asciidoc.conf
\ No newline at end of file diff --git a/contrib/doc/footer.txt b/contrib/doc/footer.txt new file mode 120000 index 00000000..9dd4bae1 --- /dev/null +++ b/contrib/doc/footer.txt @@ -0,0 +1 @@ +../../doc/footer.txt
\ No newline at end of file |