This is a follow-up to previous commit '
v1.12.2-758-g19e2814'.
Instead of placing the verbatim makefile fragments in the directory
'$(top_srcdir)/.mk', we place them in '$(build-aux)/am-ng', where
'$(build-aux)' is the directory specified by AC_CONFIG_AUX_DIR, or,
if that is not explicitly specified, the directory automatically
determined by automake to help the auxiliary scripts and files (that
typically being '$(top_srcdir)').
* automake.in (verbatim): Implement the renaming.
* lib/am/distdir.am (am.dist.mk-files): Adjust to it.
* Makefile.am (amhello_configury): Likewise.
* .gitignore: Likewise.
* t/all2.sh: Likewise.
* t/conflnk2.sh: Likewise.
* t/serial-tests.sh: Likewise.
* t/spell.sh: Likewise.
* t/spell2.sh: Likewise.
* t/ax/depcomp.sh: Remove no-more-needed tweaks.
* t/ax/tap-setup.sh: Likewise.
* t/distdir.sh: Likewise.
* t/add-missing.tap: Adjust to avoid spurious failures.
Suggested-by: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Suggested-by: Akim Demaille <akim@lrde.epita.fr>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
-/.mk/
+/lib/am-ng
/ChangeLog
/aclocal.m4
/configure
install-sh \
missing \
src/Makefile.in \
- .mk
+ am-ng
dist_noinst_DATA += $(amhello_sources)
dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
sub verbatim ($)
{
my $name = shift;
- my $dir = '.mk';
+ my $dir = "$config_aux_dir/am-ng";
my $file = "$dir/$name.mk";
my $text = slurp_makefile_fragment ("$libdir/am/$name.mk");
mkdir ($dir, 0755) if ! -d $dir;
am.dist.common-files += %DIST-COMMON%
## Makefile fragments used internally by automake-generated Makefiles.
-am.dist.mk-files = $(wildcard $(top_srcdir)/.mk/*)
+am.dist.mk-files = $(wildcard $(am.conf.aux-dir)/am-ng/*)
## Use 'sort', not 'am.util.uniq', for performance reasons. Luckily, we
## don't care in which order the distributed files are.
done
# No files should be automatically installed by automake if it
# is not told to.
- if ls "$build_aux" | grep .; then r='not ok'; else r=ok; fi
- result_ "$r" "$pfx no extra files installed"
+ command_ok_ "$pfx no extra files installed" \
+ eval '! ls "$build_aux" | grep -v "^am-ng$" | grep .'
AUTOMAKE_run -d "$pfx automake run successfully" -- $opts
ls -l . $build_aux
# The expected files should get installed correctly (e.g., no
# require 'missing' and 'install-sh', so account for them.
all_files="install-sh missing $files"
for f in $all_files; do echo $f; done | sort | uniq > files.exp
- (cd $build_aux && ls) | sort > files.got
+ (cd $build_aux && ls) | grep -v '^am-ng$' | sort > files.got
cat files.exp
cat files.got
command_ok_ \
$AUTOMAKE
grep "${target}-local ${target}-local" Makefile.in && exit 1
grep "${target}-am:.*${target}-local" Makefile.in \
- || grep "${target}-am:.*${target}-local" .mk/*.mk
+ || grep "${target}-am:.*${target}-local" am-ng/*.mk
done
:
srcdir=$1 # This is intended to be global.
mkdir -p "$srcdir" \
|| fatal_ "couldn't create source directory '$srcdir'"
- cp -pR "$ocwd/$srctree"/* "$ocwd/$srctree"/.??* "$srcdir"/ \
+ cp -pR "$ocwd/$srctree"/* "$srcdir"/ \
|| fatal_ "couldn't populate source directory '$srcdir'"
}
test ! -f Makefile.am || mv Makefile.am Makefile.am~ \
|| fatal_ "failed to save Makefile.am"
-test -d ../tap-common-setup.dir \
- && cp -fpR ../tap-common-setup.dir/* ../tap-common-setup.dir/.??* . \
+test -d ../tap-common-setup.dir && cp -fpR ../tap-common-setup.dir/* . \
|| fatal_ "couldn't get precomputed data files"
fetch_tap_driver
find $distdir # For debugging.
-rm -rf $distdir/.mk
+rm -rf $distdir/am-ng
test -f $distdir/src
test -f $distdir/src2
# Make sure no './' appear in the directory names. srcdir is '..', so
# this also checks that no directory is created in the source tree.
-sed 's|/.mk/|@mk@|' stdout > stdout2
-grep 'MKDIR_P.*\.' stdout2 && exit 1
+grep 'MKDIR_P.*\.' stdout && exit 1
cd ..
./configure --prefix "$(pwd)"
$ACLOCAL
$AUTOMAKE
-grep '^include .*.top_srcdir./\.mk/serial-tests\.mk$' Makefile.in
+grep '^include .*/am-ng/serial-tests\.mk$' Makefile.in
$FGREP 'parallel-tests.mk' Makefile.in && exit 1
-test -f .mk/serial-tests.mk
-test ! -e .mk/parallel-tests.mk
+test -f am-ng/serial-tests.mk
+test ! -e am-ng/parallel-tests.mk
test ! -e test-driver
:
cat stderr >&2
LC_ALL=C sed -e 's|^Makefile:[0-9][0-9]*: ||' \
- -e 's|^\.mk/.*\.mk:[0-9][0-9]*: ||' \
+ -e 's|.*\.mk:[0-9][0-9]*: ||' \
-e '/^\*\*\*.*Automake-NG/d' stderr > got
cat > exp << 'END'
cat stderr >&2
LC_ALL=C sed -e 's|^Makefile:[0-9][0-9]*: ||' \
- -e 's|^\.mk/.*\.mk:[0-9][0-9]*: ||' \
+ -e 's|.*\.mk:[0-9][0-9]*: ||' \
-e '/^\*\*\*.*Automake-NG/d' stderr > got
cat > exp << 'END'