diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-07-22 20:58:10 +0000 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-07-22 20:58:10 +0000 |
commit | 17b66bbba284c6ae8ddec6ef658d0e0d5b3e9d34 (patch) | |
tree | ef09ce6cbc4d9fad4b9e6ab4e829778bce626345 /gnome-doc-prepare.in | |
parent | 8dd5972bdd58889a9230d13e17f19b6af9b2eca4 (diff) | |
download | gnome-doc-utils-17b66bbba284c6ae8ddec6ef658d0e0d5b3e9d34.tar.gz |
Copy gnome-doc-utils.m4 to the AC_CONFIG_MACRO_DIR if present. Should fix
2005-07-22 Christian Persch <chpe@cvs.gnome.org>
* gnome-doc-prepare.in:
Copy gnome-doc-utils.m4 to the AC_CONFIG_MACRO_DIR if
present. Should fix "make configure" after changing
configure.
Diffstat (limited to 'gnome-doc-prepare.in')
-rw-r--r-- | gnome-doc-prepare.in | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gnome-doc-prepare.in b/gnome-doc-prepare.in index 41696ff..c1286b3 100644 --- a/gnome-doc-prepare.in +++ b/gnome-doc-prepare.in @@ -270,6 +270,45 @@ exit $status # make sure this subshell exits with the exit value if it failed ) || exit $? +# Adapted from gtkdocize: +# If the AC_CONFIG_MACRO_DIR() macro is used, copy gnome-doc-utils.m4 +# from our prefix to that directory. This makes sure that the M4 macro +# used matches the automake fragment. +# If AC_CONFIG_MACRO_DIR is not used, the macro won't be copied, and +# the correct flags must be passed to aclocal for it to find the macro. +m4dir=`cat "$configure" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` + +if test -n "$m4dir"; then +( +cur=`pwd` +if test "$m4dir" != .; then + test -z "$automake" && echo "Putting files in AC_CONFIG_MACRO_DIR, '$m4dir'." + cd $m4dir || exit 1 +fi + +files='gnome-doc-utils.m4' + +for file in $files; do + if test -f "$file" && test -z "$force"; then + test -z "$automake" && echo "$progname: '$file' exists: use '--force' to overwrite" 1>&2 + continue + fi + + $rm $file + if test -n "$ln_s" && $ln_s $datadir/aclocal/$file $file; then : + elif $cp $datadir/aclocal/$file $file; then : + else + echo "$progname: cannot copy '$datadir/aclocal/$file' to '$file'" 1>&2 + status=1 + fi +done + +exit $status +# make sure this subshell exits with the exit value if it failed +) || exit $? +fi + + # FIXME: This probably does not work w/ builddir != srcdir because it # gets at source files relative to the current directory. |