summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorDaniel Elstner <danielk@openismus.com>2009-08-10 15:35:55 +0200
committerDaniel Elstner <danielk@openismus.com>2009-08-10 16:02:43 +0200
commite968667bbeb4f04825e7ba4898a536d7306b1387 (patch)
tree5c67a7af7939b0c0a5c92eb9f91e254213cbfb8f /util
parente0376dfa81b6f9fc13112e0a948664c86e459b71 (diff)
downloadmm-common-e968667bbeb4f04825e7ba4898a536d7306b1387.tar.gz
Make mm-common-prepare copy doc tools on request
* Makefile.am (dist_doctool_DATA): Install documentation utilities to the $(pkgdatadir)/doctool directory. * macros/mm-doc.m4 (MM_CONFIG_DOCTOOL_DIR): New Autoconf macro for locating the documentation utilities. Either a local directory in the source tree can be used, or alternatively pkg-config will be invoked and request the install location from the glibmm-2.4 module. * util/mm-common-prepare.in: Scan configure.ac for calls to the new MM_CONFIG_DOCTOOL_DIR() macro. If a local directory name was given, copy the documentation utilities into the source tree.
Diffstat (limited to 'util')
-rw-r--r--util/mm-common-prepare.in33
1 files changed, 29 insertions, 4 deletions
diff --git a/util/mm-common-prepare.in b/util/mm-common-prepare.in
index 1d86071..51882a9 100644
--- a/util/mm-common-prepare.in
+++ b/util/mm-common-prepare.in
@@ -76,11 +76,19 @@ test -f "$acfile" || {
echo "$progname: error: $acfile not found" >&2
exit 1
}
-# Extract the AC_CONFIG_AUX_DIR argument from configure.ac
-auxdir=`${AUTOCONF:-autoconf} --trace='AC_CONFIG_AUX_DIR:$1' "$acfile"`
-auxdir="$srcdir${auxdir:+/}$auxdir"
+# Extract the macro arguments from configure.ac
+auxdir=
+doctooldir=
+trace=`${AUTOCONF:-autoconf} --trace='MM_CONFIG_DOCTOOL_DIR:doctooldir="$1"' \
+ --trace='AC_CONFIG_AUX_DIR:auxdir="$1"' "$acfile"`
+case $trace in
+ auxdir=*|doctooldir=*)
+ eval "$trace"
+ ;;
+esac
-echo "$progname: putting auxiliary files into '$auxdir'"
+auxdir="$srcdir${auxdir:+/}$auxdir"
+echo "$progname: putting auxiliary files in '$auxdir'."
for file in compile-binding.am dist-changelog.am doc-reference.am generate-binding.am
do
@@ -90,4 +98,21 @@ do
fi
done
+if test -n "$doctooldir"
+then
+ doctooldir="$srcdir/$doctooldir"
+ echo "$progname: putting documentation utilities in '$doctooldir'."
+
+ # Create the destination directory automatically if necessary
+ test -d "$doctooldir" || mkdir "$doctooldir"
+
+ for file in doc-install.pl doc-postprocess.pl tagfile-to-devhelp2.xsl
+ do
+ if test -n "$forceflag" || test ! -f "$doctooldir/$file"; then
+ echo "$progname: $instaction file '$file'"
+ $installcmd$forceflag "$pkgdatadir/doctool/$file" "$doctooldir/$file"
+ fi
+ done
+fi
+
exit 0