From 168b795f9eb12c08d70d05f2ee313165004564e3 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 1 Jul 2007 17:55:44 -0400 Subject: Start addition of asciidoc stuff Add some asciidoc generation stuff to the doc/ Makefile.am so we can get some manpages up and working. Add necessary stuff to gitignore, and check in the asciidoc.conf file along with the footer for all of the manpages. Signed-off-by: Dan McGee --- doc/Makefile.am | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'doc/Makefile.am') diff --git a/doc/Makefile.am b/doc/Makefile.am index 14caa0da..fd6fff45 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -10,7 +10,18 @@ if HAS_DOXYGEN man_MANS += $(wildcard man3/*.3) endif -EXTRA_DIST = $(man_MANS) Doxyfile +EXTRA_DIST = \ + pacman.8.txt \ + makepkg.8.txt \ + PKGBUILD.5.txt \ + makepkg.conf.5.txt \ + pacman.conf.5.txt \ + libalpm.3.txt \ + footer.txt \ + Doxyfile + +# Files that should be removed, but which Automake does not know. +MOSTLYCLEANFILES = $(man_MANS) man3/*.3 *.xml if HAS_DOXYGEN all: doxygen.in @@ -19,7 +30,7 @@ doxygen.in: doxygen $(srcdir)/Doxyfile endif -clean-local: - $(RM) man3/*.3 +$(man_MANS): + a2x -d manpage -f manpage --asciidoc-opts="-f asciidoc.conf" $@.txt # vim:set ts=2 sw=2 noet: -- cgit v1.2.3-70-g09d2 From fe9a0de32edaf1db58e46a3fd3f1c05ad0b0e6c2 Mon Sep 17 00:00:00 2001 From: Andrew Fyfe Date: Fri, 6 Jul 2007 06:56:11 +0100 Subject: doc/Makefile.am: Set pacman version and date when man pages are generated. Signed-off-by: Andrew Fyfe --- doc/Makefile.am | 7 ++++++- doc/asciidoc.conf | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'doc/Makefile.am') diff --git a/doc/Makefile.am b/doc/Makefile.am index fd6fff45..8c51a95a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -23,6 +23,11 @@ EXTRA_DIST = \ # Files that should be removed, but which Automake does not know. MOSTLYCLEANFILES = $(man_MANS) man3/*.3 *.xml +ASCIIDOC_OPTS = \ + -f asciidoc.conf \ + -apacman_version="$(PACKAGE_VERSION)" \ + -apacman_date="`date +%Y-%m-%d`" + if HAS_DOXYGEN all: doxygen.in @@ -31,6 +36,6 @@ doxygen.in: endif $(man_MANS): - a2x -d manpage -f manpage --asciidoc-opts="-f asciidoc.conf" $@.txt + a2x -d manpage -f manpage --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt # vim:set ts=2 sw=2 noet: diff --git a/doc/asciidoc.conf b/doc/asciidoc.conf index cb75ad75..6b0747d6 100644 --- a/doc/asciidoc.conf +++ b/doc/asciidoc.conf @@ -41,6 +41,9 @@ ifdef::backend-docbook[] [header] template::[header-declarations] + +{pacman_date} + {mantitle} {manvolnum} -- cgit v1.2.3-70-g09d2 From 499b750c2fbbedde27ad25d241f0c95566e5a0b7 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 6 Jul 2007 09:59:46 -0400 Subject: Make manpage generation depend on footer.txt If footer.txt is updated, we need to regenerate the manpages, this little fix should do this. Signed-off-by: Dan McGee --- doc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/Makefile.am') diff --git a/doc/Makefile.am b/doc/Makefile.am index 8c51a95a..ab73b8d7 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -35,7 +35,7 @@ doxygen.in: doxygen $(srcdir)/Doxyfile endif -$(man_MANS): +$(man_MANS): footer.txt a2x -d manpage -f manpage --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt # vim:set ts=2 sw=2 noet: -- cgit v1.2.3-70-g09d2 From ab87657b937f3de392b1796e7f93c4008cc21f01 Mon Sep 17 00:00:00 2001 From: Andrew Fyfe Date: Fri, 6 Jul 2007 16:07:53 +0100 Subject: Add Synopsis section to man 5 pages. Signed-off-by: Andrew Fyfe --- doc/Makefile.am | 5 +++-- doc/PKGBUILD.5.txt | 5 +++++ doc/makepkg.conf.5.txt | 5 +++++ doc/pacman.conf.5.txt | 5 +++++ 4 files changed, 18 insertions(+), 2 deletions(-) (limited to 'doc/Makefile.am') diff --git a/doc/Makefile.am b/doc/Makefile.am index ab73b8d7..a65f1cf7 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -25,8 +25,9 @@ MOSTLYCLEANFILES = $(man_MANS) man3/*.3 *.xml ASCIIDOC_OPTS = \ -f asciidoc.conf \ - -apacman_version="$(PACKAGE_VERSION)" \ - -apacman_date="`date +%Y-%m-%d`" + -a pacman_version="$(PACKAGE_VERSION)" \ + -a pacman_date="`date +%Y-%m-%d`" \ + -a sysconfdir=$(sysconfdir) if HAS_DOXYGEN all: doxygen.in diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index 642f8884..3fa2f66b 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -6,6 +6,11 @@ Name PKGBUILD - Arch Linux package build description file +Synopsis +-------- +PKGBUILD + + Description ----------- This manual page is meant to describe general rules about PKGBUILDs. Once a diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt index fd867f6b..d8a02726 100644 --- a/doc/makepkg.conf.5.txt +++ b/doc/makepkg.conf.5.txt @@ -6,6 +6,11 @@ Name makepkg.conf - makepkg configuration file +Synopsis +-------- +{sysconfdir}/makepkg.conf, ~/.makepkg.conf + + Description ----------- Configuration options for makekpg are stored in makepkg.conf. This file is diff --git a/doc/pacman.conf.5.txt b/doc/pacman.conf.5.txt index 295c9b28..180b19c7 100644 --- a/doc/pacman.conf.5.txt +++ b/doc/pacman.conf.5.txt @@ -6,6 +6,11 @@ Name pacman.conf - pacman package manager configuration file +Synopsis +-------- +{sysconfdir}/pacman.conf + + Description ----------- Pacman, using manlink:libalpm[3], will attempt to read `pacman.conf` each -- cgit v1.2.3-70-g09d2 From f1fac6abfb676b081ee2d474ab3e15f6d07d0416 Mon Sep 17 00:00:00 2001 From: Andrew Fyfe Date: Fri, 6 Jul 2007 16:30:53 +0100 Subject: Update PKGBUILD example. Signed-off-by: Andrew Fyfe --- doc/Makefile.am | 3 +++ doc/PKGBUILD-example.txt | 32 ++++++++++++++++++++++++++++++++ doc/PKGBUILD.5.txt | 32 +++----------------------------- 3 files changed, 38 insertions(+), 29 deletions(-) create mode 100644 doc/PKGBUILD-example.txt (limited to 'doc/Makefile.am') diff --git a/doc/Makefile.am b/doc/Makefile.am index a65f1cf7..308f338b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -14,6 +14,7 @@ EXTRA_DIST = \ pacman.8.txt \ makepkg.8.txt \ PKGBUILD.5.txt \ + PKGBUILD-example.txt \ makepkg.conf.5.txt \ pacman.conf.5.txt \ libalpm.3.txt \ @@ -39,4 +40,6 @@ endif $(man_MANS): footer.txt a2x -d manpage -f manpage --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt +PKGBUILD.5: PKGBUILD-example.txt + # vim:set ts=2 sw=2 noet: diff --git a/doc/PKGBUILD-example.txt b/doc/PKGBUILD-example.txt new file mode 100644 index 00000000..50b652bd --- /dev/null +++ b/doc/PKGBUILD-example.txt @@ -0,0 +1,32 @@ +# $Id: PKGBUILD,v 1.16 2006/06/20 07:03:04 tpowa Exp $ +# Maintainer: judd +pkgname=module-init-tools +pkgver=3.2.2 +pkgrel=3 +pkgdesc="Utilities for inserting and removing modules from the Linux kernel" +arch=(i686 x86_64) +url="http://www.kernel.org" +license=('GPL') +depends=('glibc') +conflicts=('modutils') +replaces=('modutils') +backup=('etc/modprobe.conf' 'etc/modules.conf' 'etc/modprobe.devfs') +source=(http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-$pkgver.tar.bz2 \ + makefile.patch modprobe.conf) +md5sums=('a1ad0a09d3231673f70d631f3f5040e9' '47e14fda7a46668290d11d0444d81826'\ + '6db59d41e04941a790f80c1a4432faef') + +build() { + cd "$srcdir"/$pkgname-$pkgver + + patch -Np1 -i ../makefile.patch || return 1 + sed -i 's|/usr/bin/install|/bin/install|g' install-with-care + + ./configure --prefix=/usr --exec-prefix=/ + make || return 1 + + INSTALL=/bin/install make DESTDIR="$pkgdir" install + install -D -m644 ../modprobe.conf "$pkgdir"/etc/modprobe.conf +} + +# vim:set ts=2 sw=2 et: diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index 3fa2f66b..fbb7886c 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -54,7 +54,7 @@ Options and Directives found in /usr/share/licenses/common, then you should include the license in the package itself and set license=("custom") or license=("custom:LicenseName"). The license should be placed in - $startdir/pkg/usr/share/licenses/$pkgname when building the package. If + $pkgdir/usr/share/licenses/$pkgname when building the package. If multiple licenses are applicable for a package, list all of them: licenses=('GPL' 'FDL'). @@ -220,37 +220,11 @@ install file is available in the ABS tree (/var/abs/install.proto). Example ------- -The following is an example PKGBUILD for the 'modutils' package. For more +The following is an example PKGBUILD for the 'module-init-tools' package. For more examples, look through the ABS tree. ----- -# Maintainer: John Doe -# Contributor: Bill Smith -pkgname=modutils -pkgver=2.4.25 -pkgrel=1 -pkgdesc="Utilities for inserting modules in the linux kernel" -url="http://www.kernel.org" -makedepends=('bash' 'mawk') -depends=('glibc' 'zlib') -backup=(etc/modules.conf) -source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/v2.4/$pkgname-$pkgver.tar.bz2 - modules.conf) -arch=('i686') -license=('GPL' 'custom') # dual licensed -md5sums=('2c0cca3ef6330a187c6ef4fe41ecaa4d' - '35175bee593a7cc7d6205584a94d8625') -options=(!libtool) - -build() { - cd $startdir/src/$pkgname-$pkgver - ./configure --prefix=/usr --enable-insmod-static - make || return 1 - make prefix=$startdir/pkg/usr install - mv $startdir/pkg/usr/sbin $startdir/pkg - mkdir -p $startdir/pkg/etc - cp ../modules.conf $startdir/pkg/etc -} +include::PKGBUILD-example.txt[] ----- -- cgit v1.2.3-70-g09d2 From e412ac19f549afa26b58dbd2a2090ed95ca9cb95 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 6 Jul 2007 16:54:18 -0400 Subject: Asciidoc updates- make it pretty, fix build, etc. * Fix up the target so we rebuild the manpages when we edit the corresponding text file. * Add vim modelines to all of the asciidoc files ensureing the right syntax highlighting is used and we have expandtabs turned off. * Start making a few small changes to PKGBUILD.5 to make it pretty in both HTML and manpage format output. * Fix the manlink macro to include the manpage section in the link. Signed-off-by: Dan McGee --- doc/Makefile.am | 15 ++++++++++++--- doc/PKGBUILD.5.txt | 25 ++++++++++++++----------- doc/asciidoc.conf | 2 +- doc/footer.txt | 3 +++ doc/libalpm.3.txt | 3 +++ doc/makepkg.8.txt | 3 +++ doc/makepkg.conf.5.txt | 3 +++ doc/pacman.8.txt | 3 +++ doc/pacman.conf.5.txt | 3 +++ 9 files changed, 45 insertions(+), 15 deletions(-) (limited to 'doc/Makefile.am') diff --git a/doc/Makefile.am b/doc/Makefile.am index 308f338b..89f2a639 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,4 @@ -man_MANS = \ +ASCIIDOC_MANS = \ pacman.8 \ makepkg.8 \ PKGBUILD.5 \ @@ -6,6 +6,8 @@ man_MANS = \ pacman.conf.5 \ libalpm.3 +man_MANS = $(ASCIIDOC_MANS) + if HAS_DOXYGEN man_MANS += $(wildcard man3/*.3) endif @@ -37,9 +39,16 @@ doxygen.in: doxygen $(srcdir)/Doxyfile endif -$(man_MANS): footer.txt +$(ASCIIDOC_MANS): a2x -d manpage -f manpage --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt -PKGBUILD.5: PKGBUILD-example.txt +# These rules are due to the includes and files of the asciidoc text +$(ASCIIDOC_MANS): footer.txt +pacman.8: pacman.8.txt +makepkg.8: makepkg.8.txt +PKGBUILD.5: PKGBUILD.5.txt PKGBUILD-example.txt +makepkg.conf.5: makepkg.conf.5.txt +pacman.conf.5: pacman.conf.5.txt +libalpm.3: libalpm.3.txt # vim:set ts=2 sw=2 noet: diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index fbb7886c..f9f50d17 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -1,3 +1,6 @@ +///// +vim:set ts=4 sw=4 syntax=asciidoc noet: +///// PKGBUILD(5) =========== @@ -30,7 +33,7 @@ Options and Directives used in the package filename. *pkgver*:: - The version of the software as released from the author (e.g. 2.7.1). + The version of the software as released from the author (e.g. `2.7.1`). *pkgrel*:: This is the release number specific to the Arch Linuxs release. This @@ -48,21 +51,21 @@ Options and Directives *license (array)*:: This field specifies the license(s) that apply to the package. - Commonly-used licenses are found in /usr/share/licenses/common. If you + Commonly-used licenses are found in `/usr/share/licenses/common`. If you see the package's license there, simply reference it in the license - field (e.g. license=("GPL")). If the package provides a license not - found in /usr/share/licenses/common, then you should include the license - in the package itself and set license=("custom") or - license=("custom:LicenseName"). The license should be placed in - $pkgdir/usr/share/licenses/$pkgname when building the package. If + field (e.g. `$$license=('GPL')$$`). If the package provides a license not + found in `/usr/share/licenses/common`, then you should include the license + in the package itself and set `$$license=('custom')$$` or + `$$license=('custom:LicenseName')$$`. The license should be placed in + `$pkgdir/usr/share/licenses/$pkgname` when building the package. If multiple licenses are applicable for a package, list all of them: - licenses=('GPL' 'FDL'). + `$$license=('GPL' 'FDL')$$`. *install*:: Specifies a special install script that is to be included in the package. This file should reside in the same directory as the PKGBUILD, and will be copied into the package by makepkg. It does not need to be included - in the source array (e.g. install=pkgname.install). + in the source array (e.g. `$$install=pkgname.install$$`). *source (array)*:: An array of source files required to build the package. Source files @@ -94,11 +97,11 @@ Options and Directives *groups (array)*:: An array of symbolic names that represent groups of packages, allowing you to install multiple packages by requesting a single target. For - example, one could install all KDE packages by installing the 'kde' group. + example, one could install all KDE packages by installing the `kde` group. *arch (array)*:: Defines on which architectures the given package is available (e.g. - arch=('i686' 'x86_64')). + `$$arch=('i686' 'x86_64')). *backup (array)*:: A space-delimited array of filenames, without preceding slashes, that diff --git a/doc/asciidoc.conf b/doc/asciidoc.conf index 6b0747d6..92e01179 100644 --- a/doc/asciidoc.conf +++ b/doc/asciidoc.conf @@ -60,5 +60,5 @@ endif::doctype-manpage[] ifdef::backend-xhtml11[] [manlink-inlinemacro] -{target}{0?({0})} +{target}{0?({0})} endif::backend-xhtml11[] diff --git a/doc/footer.txt b/doc/footer.txt index 5f62a647..d1ee9d1e 100644 --- a/doc/footer.txt +++ b/doc/footer.txt @@ -1,3 +1,6 @@ +///// +vim:set ts=4 sw=4 syntax=asciidoc noet: +///// See the Arch Linux website at for more current information on the distribution and the pacman family of tools, and for diff --git a/doc/libalpm.3.txt b/doc/libalpm.3.txt index c9951311..27281fad 100644 --- a/doc/libalpm.3.txt +++ b/doc/libalpm.3.txt @@ -1,3 +1,6 @@ +///// +vim:set ts=4 sw=4 syntax=asciidoc noet: +///// libalpm(3) ========== diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt index 636d409f..622423c9 100644 --- a/doc/makepkg.8.txt +++ b/doc/makepkg.8.txt @@ -1,3 +1,6 @@ +///// +vim:set ts=4 sw=4 syntax=asciidoc noet: +///// makepkg(8) ========== diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt index d8a02726..72b57c3e 100644 --- a/doc/makepkg.conf.5.txt +++ b/doc/makepkg.conf.5.txt @@ -1,3 +1,6 @@ +///// +vim:set ts=4 sw=4 syntax=asciidoc noet: +///// makepkg.conf(5) =============== diff --git a/doc/pacman.8.txt b/doc/pacman.8.txt index 891be7dd..c0a16971 100644 --- a/doc/pacman.8.txt +++ b/doc/pacman.8.txt @@ -1,3 +1,6 @@ +///// +vim:set ts=4 sw=4 syntax=asciidoc noet: +///// pacman(8) ========= diff --git a/doc/pacman.conf.5.txt b/doc/pacman.conf.5.txt index 180b19c7..ec04fcb2 100644 --- a/doc/pacman.conf.5.txt +++ b/doc/pacman.conf.5.txt @@ -1,3 +1,6 @@ +///// +vim:set ts=4 sw=4 syntax=asciidoc noet: +///// pacman.conf(5) ============== -- cgit v1.2.3-70-g09d2 From cd5b38a4b0e8cfe634b31fc730bddbc373eb17ce Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 9 Jul 2007 14:22:01 -0400 Subject: Add a manpage for repo-add We still need some work here- we should have a repo-remove manpage link to this one, and we should not have to struggle with asciidoc formatting to get it to work like any other multiple-command manpage works. Signed-off-by: Dan McGee --- doc/.gitignore | 1 + doc/Makefile.am | 3 +++ doc/repo-add.8.txt | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 doc/repo-add.8.txt (limited to 'doc/Makefile.am') diff --git a/doc/.gitignore b/doc/.gitignore index c7de9a64..6fee5088 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -6,5 +6,6 @@ makepkg.8 makepkg.conf.5 pacman.8 pacman.conf.5 +repo-add.8 *.xml man3 diff --git a/doc/Makefile.am b/doc/Makefile.am index 89f2a639..f790f585 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,7 @@ ASCIIDOC_MANS = \ pacman.8 \ makepkg.8 \ + repo-add.8 \ PKGBUILD.5 \ makepkg.conf.5 \ pacman.conf.5 \ @@ -15,6 +16,7 @@ endif EXTRA_DIST = \ pacman.8.txt \ makepkg.8.txt \ + repo-add.8.txt \ PKGBUILD.5.txt \ PKGBUILD-example.txt \ makepkg.conf.5.txt \ @@ -46,6 +48,7 @@ $(ASCIIDOC_MANS): $(ASCIIDOC_MANS): footer.txt pacman.8: pacman.8.txt makepkg.8: makepkg.8.txt +repo-add.8: repo-add.8.txt PKGBUILD.5: PKGBUILD.5.txt PKGBUILD-example.txt makepkg.conf.5: makepkg.conf.5.txt pacman.conf.5: pacman.conf.5.txt diff --git a/doc/repo-add.8.txt b/doc/repo-add.8.txt new file mode 100644 index 00000000..27e0e93f --- /dev/null +++ b/doc/repo-add.8.txt @@ -0,0 +1,51 @@ +///// +vim:set ts=4 sw=4 syntax=asciidoc noet: +///// +repo-add(8) +========== + +Name +---- +//// +* If we use this below line, the manpage name comes out all weird. We also +* can't use two separate lines, which is quite annoying. * +repo-add, repo-remove - package database maintenance utilities +//// +repo-add - package database maintenance utility + + +Synopsis +-------- +repo-add [--force] ... + +repo-remove ... + + +Description +----------- +repo-add and repo-remove are two scripts to help build a package database for +packages built with manlink:makepkg[8] and installed with manlink:pacman[8]. + +repo-add will update a package database by reading a built package file. +Multiple packages to add can be specified on the command line. + +repo-remove will update a package database by removing the package name +specified on the command line. Multiple packages to remove can be specified +on the command line. + + +Options +------- +*--force* (repo-add only):: + Add a force entry to the sync database, which tells pacman to skip version + number comparison and update the package regardless. This flag can be + specified in the middle of the command line, with any packages listed + before the flag being added as normal entries, and any specified after + being marked as force upgrades. + + +See Also +-------- +manlink:makepkg[8], manlink:pacman[8] + +include::footer.txt[] -- cgit v1.2.3-70-g09d2 From d2613b97fa8173920ef7440cf291ca24a05b5b7c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 9 Jul 2007 14:38:02 -0400 Subject: Add asciidoc checking to configure.ac, make manpage generation optional Include manpages when we ship a package tarball, and allow them to be generated by the end user if they want by using the --enable-asciidoc option to ./configure. This will allow us to maintain manpages in an easier to modify format while still keeping the make dependencies to a minimum. Signed-off-by: Dan McGee --- configure.ac | 27 +++++++++++++++++++++++++-- doc/Makefile.am | 29 ++++++++++++++++------------- 2 files changed, 41 insertions(+), 15 deletions(-) (limited to 'doc/Makefile.am') diff --git a/configure.ac b/configure.ac index 9a439346..17c85ad6 100644 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,11 @@ AC_ARG_ENABLE(doxygen, AC_HELP_STRING([--disable-doxygen], [do not build API docs via Doxygen]), [wantdoxygen=$enableval], [wantdoxygen=yes]) +# Help line for asciidoc +AC_ARG_ENABLE(asciidoc, + AC_HELP_STRING([--enable-asciidoc], [build your own manpages with Asciidoc]), + [wantasciidoc=$enableval], [wantasciidoc=no]) + # Help line for debug AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable debugging support]), @@ -177,7 +182,7 @@ AC_SUBST(CARCHFLAGS) AC_SUBST(ARCHSWITCH) AC_SUBST(CHOST) -# Check for doxygen support +# Check for doxygen support and status AC_MSG_CHECKING([for doxygen]) if test "x$wantdoxygen" = "xyes" ; then AC_CHECK_PROGS([DOXYGEN], [doxygen]) @@ -192,7 +197,24 @@ else AC_MSG_RESULT([no, disabled by configure]) usedoxygen=no fi -AM_CONDITIONAL(HAS_DOXYGEN, test "x$usedoxygen" = "xyes") +AM_CONDITIONAL(USE_DOXYGEN, test "x$usedoxygen" = "xyes") + +# Check for asciidoc support and status +AC_MSG_CHECKING([for asciidoc]) +if test "x$wantasciidoc" = "xyes" ; then + AC_CHECK_PROGS([ASCIIDOC], [asciidoc]) + 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) @@ -276,6 +298,7 @@ $PACKAGE_STRING: Compilation options: Doxygen support : ${usedoxygen} + Asciidoc support : ${useasciidoc} debug support : ${debug} include abs : ${includeabs} " diff --git a/doc/Makefile.am b/doc/Makefile.am index f790f585..ad251287 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -7,12 +7,12 @@ ASCIIDOC_MANS = \ pacman.conf.5 \ libalpm.3 -man_MANS = $(ASCIIDOC_MANS) - -if HAS_DOXYGEN -man_MANS += $(wildcard man3/*.3) +if USE_DOXYGEN +DOXYGEN_MANS = $(wildcard man3/*.3) endif +man_MANS = $(ASCIIDOC_MANS) $(DOXYGEN_MANS) + EXTRA_DIST = \ pacman.8.txt \ makepkg.8.txt \ @@ -23,24 +23,26 @@ EXTRA_DIST = \ pacman.conf.5.txt \ libalpm.3.txt \ footer.txt \ - Doxyfile + Doxyfile \ + $(ASCIIDOC_MANS) # Files that should be removed, but which Automake does not know. -MOSTLYCLEANFILES = $(man_MANS) man3/*.3 *.xml - -ASCIIDOC_OPTS = \ - -f asciidoc.conf \ - -a pacman_version="$(PACKAGE_VERSION)" \ - -a pacman_date="`date +%Y-%m-%d`" \ - -a sysconfdir=$(sysconfdir) +MOSTLYCLEANFILES = $(DOXYGEN_MANS) *.xml -if HAS_DOXYGEN +if USE_DOXYGEN all: doxygen.in doxygen.in: doxygen $(srcdir)/Doxyfile endif +if USE_ASCIIDOC +ASCIIDOC_OPTS = \ + -f asciidoc.conf \ + -a pacman_version="$(PACKAGE_VERSION)" \ + -a pacman_date="`date +%Y-%m-%d`" \ + -a sysconfdir=$(sysconfdir) + $(ASCIIDOC_MANS): a2x -d manpage -f manpage --asciidoc-opts="$(ASCIIDOC_OPTS)" $@.txt @@ -53,5 +55,6 @@ PKGBUILD.5: PKGBUILD.5.txt PKGBUILD-example.txt makepkg.conf.5: makepkg.conf.5.txt pacman.conf.5: pacman.conf.5.txt libalpm.3: libalpm.3.txt +endif # vim:set ts=2 sw=2 noet: -- cgit v1.2.3-70-g09d2