diff options
author | Dan McGee <dan@archlinux.org> | 2008-08-05 21:03:59 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-10-12 21:29:33 -0500 |
commit | d7e502a467c054cf3bf7c50362ff7f8087b0c382 (patch) | |
tree | 16d720a682f47932609a55201a22d09aeb9e1253 | |
parent | 927ce2b7a52360507da3d81804520dbba4a9700d (diff) | |
download | pacman-d7e502a467c054cf3bf7c50362ff7f8087b0c382.tar.xz |
Attempt to idiot-proof making and refreshing docs
I mess this up more often than not, and maybe this will do the trick. Remove
the --enable-asciidoc option as it has been superseded by the --disable-doc
option in usefulness. If you want to skip building docs, you skip building
all docs which is much easier when it comes to ensuring the make 'dist' and
'distcheck' targets will always build the manpages and always build the most
up to date manpages.
Developers shouldn't be affected in their normal builds, nor should end
users of the source tarball.
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | configure.ac | 23 | ||||
-rw-r--r-- | doc/Makefile.am | 22 |
3 files changed, 15 insertions, 33 deletions
diff --git a/Makefile.am b/Makefile.am index ea3b0e07..ed9a34d3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,6 +3,9 @@ if WANT_DOC SUBDIRS += doc endif +# Make sure we test and build manpages when doing distcheck +DISTCHECK_CONFIGURE_FLAGS = --enable-doc --disable-git-version + # Some files automatically included, so they aren't specified below: # AUTHORS, COPYING, NEWS, README EXTRA_DIST = HACKING diff --git a/configure.ac b/configure.ac index 3a032d1a..c3b3722c 100644 --- a/configure.ac +++ b/configure.ac @@ -103,11 +103,6 @@ AC_ARG_ENABLE(doxygen, AS_HELP_STRING([--enable-doxygen], [build your own API docs via Doxygen]), [wantdoxygen=$enableval], [wantdoxygen=no]) -# Help line for asciidoc -AC_ARG_ENABLE(asciidoc, - AS_HELP_STRING([--enable-asciidoc], [build your own manpages with Asciidoc]), - [wantasciidoc=$enableval], [wantasciidoc=no]) - # Help line for debug AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [enable debugging support]), @@ -273,23 +268,6 @@ else fi AM_CONDITIONAL(USE_DOXYGEN, test "x$usedoxygen" = "xyes") -# Check for asciidoc support and status -AC_CHECK_PROGS([ASCIIDOC], [asciidoc]) -AC_MSG_CHECKING([for asciidoc]) -if test "x$wantasciidoc" = "xyes" ; then - if test $ASCIIDOC ; then - AC_MSG_RESULT([yes]) - useasciidoc=yes - else - AC_MSG_RESULT([no, asciidoc missing]) - useasciidoc=no - fi -else - AC_MSG_RESULT([no, disabled by configure]) - useasciidoc=no -fi -AM_CONDITIONAL(USE_ASCIIDOC, test "x$useasciidoc" = "xyes") - # Enable or disable debug code AC_MSG_CHECKING(for debug mode request) if test "x$debug" = "xyes" ; then @@ -388,7 +366,6 @@ ${PACKAGE_NAME}: Run make in doc/ dir : ${wantdoc} Use download library : ${internaldownload} Doxygen support : ${usedoxygen} - Asciidoc support : ${useasciidoc} debug support : ${debug} " diff --git a/doc/Makefile.am b/doc/Makefile.am index 476a21c3..cce0a711 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -15,6 +15,7 @@ ASCIIDOC_MANS = \ DOXYGEN_MANS = $(wildcard man3/*.3) EXTRA_DIST = \ + asciidoc.conf \ pacman.8.txt \ makepkg.8.txt \ repo-add.8.txt \ @@ -29,8 +30,12 @@ EXTRA_DIST = \ $(DOXYGEN_MANS) # Files that should be removed, but which Automake does not know. -MOSTLYCLEANFILES = *.xml -MAINTAINERCLEANFILES = $(ASCIIDOC_MANS) +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 | sed s/^v//')-dirty @@ -39,20 +44,18 @@ else REAL_PACKAGE_VERSION = $(PACKAGE_VERSION) endif - man_MANS = dist_man_MANS = $(ASCIIDOC_MANS) repo-remove.8 if USE_DOXYGEN man_MANS += $(DOXYGEN_MANS) -all: doxygen.in +all-local: doxygen.in doxygen.in: $(DOXYGEN) $(srcdir)/Doxyfile endif -if USE_ASCIIDOC ASCIIDOC_OPTS = \ -f asciidoc.conf \ -a pacman_version="$(REAL_PACKAGE_VERSION)" \ @@ -64,11 +67,10 @@ A2X_OPTS = \ --xsltproc-opts='-param man.endnotes.list.enabled 0' \ --xsltproc-opts='-param man.endnotes.are.numbered 0' -$(ASCIIDOC_MANS): - a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt - # These rules are due to the includes and files of the asciidoc text $(ASCIIDOC_MANS): asciidoc.conf footer.txt + a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt + pacman.8: pacman.8.txt makepkg.8: makepkg.8.txt repo-add.8: repo-add.8.txt @@ -78,7 +80,7 @@ pacman.conf.5: pacman.conf.5.txt libalpm.3: libalpm.3.txt # this one is just a symlink repo-remove.8: repo-add.8 - ln -s repo-add.8 repo-remove.8 -endif + rm -f repo-remove.8 + $(LN_S) repo-add.8 repo-remove.8 # vim:set ts=2 sw=2 noet: |