summaryrefslogtreecommitdiff
path: root/man/Makefile.am
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2011-11-27 13:55:43 +0000
committerRoger Leigh <rleigh@debian.org>2011-11-27 13:55:43 +0000
commitafa9c9fa03f2499290ef2b871dddadde64b84a8d (patch)
treec668132fe02f7eef20e29be9563861228cfbf18e /man/Makefile.am
parent241b823cdefd61d124168030a7556aff0e4ece6b (diff)
downloadschroot-afa9c9fa03f2499290ef2b871dddadde64b84a8d.tar.gz
build: Move all path specification to global.mk
It's not possible to evaluate directory variables at configure time, even with eval. Move all preprocessor definitions to DEFS in global.mk. Note that this also required changing the substitution mechanism in the manual pages, which have been changed to source a generated config.man fragment, which is sourced using the .so directive, and the manual page generated using soelim(1). The boilerplate for the authors and copyright sections has also been split out at the same time.
Diffstat (limited to 'man/Makefile.am')
-rw-r--r--man/Makefile.am57
1 files changed, 57 insertions, 0 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
index e8f68272..93bdea55 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -33,6 +33,21 @@ if BUILD_CSBUILD
csbuild_mans = csbuild.1
endif
+MAN_FILES = \
+ csbuild.1.man \
+ dchroot.1.man \
+ dchroot-dsa.1.man \
+ schroot.1.man \
+ schroot.conf.5.man \
+ schroot-faq.7.man \
+ schroot-script-config.5.man \
+ schroot-setup.5.man
+
+EXPAND = \
+ config.man \
+ authors.man \
+ copyright.man
+
man_MANS = \
schroot.1 \
schroot-setup.5 \
@@ -42,3 +57,45 @@ man_MANS = \
$(dchroot_mans) \
$(dchroot_dsa_mans) \
$(csbuild_mans)
+
+EXTRA_DIST = \
+ $(MAN_FILES) \
+ authors.man \
+ copyright.man
+
+CLEANFILES = \
+ config.man \
+ $(basename $(MAN_FILES))
+
+%.1: %.1.man $(EXPAND)
+ $(SOELIM) $< >$@
+
+%.5: %.5.man $(EXPAND)
+ $(SOELIM) $< >$@
+
+%.7: %.7.man $(EXPAND)
+ $(SOELIM) $< >$@
+
+CONFIG =\
+.ds RELEASE_DATE $(RELEASE_DATE_S)\n\
+.ds VERSION $(VERSION)\n\
+.ds SCHROOT_LIBEXEC_DIR $(pkglibexecdir)\n\
+.ds SCHROOT_MOUNT_DIR $(schroot_mountdir)\n\
+.ds SCHROOT_SESSION_DIR $(schroot_sessiondir)\n\
+.ds SCHROOT_FILE_UNPACK_DIR $(schroot_file_unpackdir)\n\
+.ds SCHROOT_OVERLAY_DIR $(schroot_overlaydir)\n\
+.ds SCHROOT_UNDERLAY_DIR $(schroot_underlaydir)\n\
+.ds SCHROOT_SYSCONF_DIR $(schroot_sysconfdir)\n\
+.ds SCHROOT_CONF $(SCHROOT_CONF)\n\
+.ds SCHROOT_CONF_CHROOT_D $(schroot_sysconf_chrootdir)\n\
+.ds SCHROOT_CONF_SETUP_D $(schroot_sysconf_setupdir)\n\
+.ds SCHROOT_DATA_DIR $(pkgdatadir)\n\
+.ds SCHROOT_SETUP_DATA_DIR $(schroot_setupdatadir)\n\
+.ds PACKAGE_LOCALE_DIR $(prefix)/share/locale\n\
+.ds DCHROOT_CONF $(DCHROOT_CONF)\n\
+.ds CSBUILD_CONF $(CSBUILD_CONF)\n\
+.ds PROGRAM schroot
+
+config.man: Makefile
+ echo -e "$(CONFIG)" | sed -e 's/^[ ]//' > $@
+