diff options
author | Daniel Elstner <danielk@openismus.com> | 2009-09-08 11:13:32 +0200 |
---|---|---|
committer | Daniel Elstner <danielk@openismus.com> | 2009-09-08 11:13:32 +0200 |
commit | f7553805eec5394945b95fdd598fb147e342425e (patch) | |
tree | 0e8bdfc85d740a92611b02cc03ad91e0ef2761f7 | |
parent | a7abe11346216a09a50959e34fa9c9b32ea8425f (diff) | |
download | mm-common-f7553805eec5394945b95fdd598fb147e342425e.tar.gz |
Substitute variables in the manpage at build time
* util/mm-common-prepare.1.in: Rename file from mm-common-prepare.1
and insert placeholders for the location of the documentation files.
* Makefile.am (man1_MANS): Remove "dist_" prefix from variable name.
(dist_noinst_DATA): Distribute util/mm-common-prepare.1.in file.
(CLEANFILES): Clean generated util/mm-common-prepare.1 file.
(util/mm-common-prepare.1): New rule to generate the manual page
at build time.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 9 | ||||
-rw-r--r-- | util/mm-common-prepare.1.in (renamed from util/mm-common-prepare.1) | 8 |
3 files changed, 16 insertions, 2 deletions
@@ -14,3 +14,4 @@ /doctags/mm-common-*.pc /macros/mm-common.m4 /util/mm-common-prepare +/util/mm-common-prepare.1 diff --git a/Makefile.am b/Makefile.am index 348d529..8ddffdb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} bin_SCRIPTS = util/mm-common-prepare -dist_man1_MANS = util/mm-common-prepare.1 +man1_MANS = util/mm-common-prepare.1 build_supportdir = $(pkgdatadir)/build dist_build_support_DATA = \ @@ -89,8 +89,10 @@ nobase_dist_doc_DATA = \ skeletonmm/skeleton/src/skeleton_extra.defs \ skeletonmm/skeleton/src/skeleton_method.defs +dist_noinst_DATA = util/mm-common-prepare.1.in dist_noinst_SCRIPTS = autogen.sh +CLEANFILES = $(man1_MANS) MAINTAINERCLEANFILES = $(dist_doctags_DATA) # Remote location of the GNU libstdc++ Doxygen tag file. @@ -102,6 +104,8 @@ download_curl = $(CURL) --compressed --connect-timeout 300 -g -L -m 3600 -R --re $(if $(wildcard $@),-z '$@') -o '$@' download_wget = $(WGET) -N -nd -T 300 -t 5 -P '$(dir $@)' +subst_manpage = sed 's|[@]PACKAGE_STRING[@]|$(PACKAGE_STRING)|g;s|[@]docdir[@]|$(docdir)|g' + # If maintainer mode is enabled, always check the remote locations # of the tag files for updates when building the default target. if MAINTAINER_MODE @@ -120,4 +124,7 @@ doctags/libstdc++.tag: $(if $(CURL),$(download_curl) '$(libstdcxx_tag_url)',$(if\ $(WGET),$(download_wget) '$(libstdcxx_tag_url)',test -f '$@')) +util/mm-common-prepare.1: $(srcdir)/util/mm-common-prepare.1.in Makefile + $(subst_manpage) $(srcdir)/util/mm-common-prepare.1.in >$@ + include $(top_srcdir)/build/dist-changelog.am diff --git a/util/mm-common-prepare.1 b/util/mm-common-prepare.1.in index 605b92f..766c44c 100644 --- a/util/mm-common-prepare.1 +++ b/util/mm-common-prepare.1.in @@ -1,4 +1,4 @@ -.TH MM-COMMON-PREPARE 1 2009-09-08 GNOME mm-common +.TH MM-COMMON-PREPARE 1 2009-09-08 GNOME "@PACKAGE_STRING@" .SH NAME mm-common-prepare \- Prepare a C++ binding module to use mm-common .SH SYNOPSIS @@ -85,3 +85,9 @@ are listed below. .PD .SH "SEE ALSO" .BR autoreconf (1) +.PD 0 +.PP +.I @docdir@/README +.PP +.I @docdir@/skeletonmm/ +.PD |