Convert lib/Makefile.am into lib/local.mk.

The real problem is rather gnulib.mk, which itself is extracted from a
Makefile.am that gnulib expects to the "recursive".  The tool
prefix-gnulib-mk converts such a gnulib.mk to be non-recursive.  Also,
some AC_SUBST variables need to be adjusted.

	* etc/prefix-gnulib-mk: New.
	* bootstrap (slurp): Use it to convert further gnulib.mk.
	* lib/Makefile.am: Rename as...
	* lib/local.mk: this.
	Adjust to be prefixed.
	* Makefile.am, configure.ac: Adjust.
	* src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
This commit is contained in:
Akim Demaille
2008-11-19 08:24:47 +01:00
parent 56ddee7f8d
commit feda5527b3
8 changed files with 249 additions and 60 deletions

View File

@@ -505,11 +505,10 @@ slurp() {
if test $file = Makefile.am; then
copied=$copied${sep}$gnulib_mk; sep=$nl
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || {
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
rm -f $dir/$gnulib_mk &&
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
}
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..."
rm -f $dir/$gnulib_mk
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
etc/prefix-gnulib-mk $dir/$gnulib_mk
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
version_controlled_file $dir $file; then
echo "$0: $dir/$file overrides $1/$dir/$file"