]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
fragments: put them in a subdir of build-aux
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 2 Aug 2012 16:37:12 +0000 (18:37 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 2 Aug 2012 17:33:03 +0000 (19:33 +0200)
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>
13 files changed:
.gitignore
Makefile.am
automake.in
lib/am/distdir.am
t/add-missing.tap
t/all2.sh
t/ax/depcomp.sh
t/ax/tap-setup.sh
t/conflnk2.sh
t/distdir.sh
t/serial-tests.sh
t/spell.sh
t/spell2.sh

index 6a6d5c2a20fa033f5813f739be1f1e9f34f3c8da..6aab89648b6eb2abc739d5f96100841e8397aee3 100644 (file)
@@ -1,4 +1,4 @@
-/.mk/
+/lib/am-ng
 /ChangeLog
 /aclocal.m4
 /configure
index 1392f68d2b17d6223567aa1927e05b3166ddb27c..a6603099d9308a13e936c565f0b08824d366338f 100644 (file)
@@ -569,7 +569,7 @@ amhello_configury = \
   install-sh \
   missing \
   src/Makefile.in \
-  .mk
+  am-ng
 
 dist_noinst_DATA += $(amhello_sources)
 dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
index 40b2c4d8a3856365faf79db06624437b1273e987..d8e51d4948281a9bff4edc818db040b6dde52afa 100644 (file)
@@ -5776,7 +5776,7 @@ sub preprocess_file ($%)
 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;
index ce5ff1b7ef72cd8f3146aaf5901f2525a050a506..efe576c4718f47cb57535c0f93d125fb3303a55a 100644 (file)
@@ -17,7 +17,7 @@
 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.
index c47382b5f77de7f24a71f49aaf79f788b412a51a..26cce13f8cad4419192a4cf651a564bf2186b059 100755 (executable)
@@ -175,8 +175,8 @@ check_ ()
     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
@@ -196,7 +196,7 @@ check_ ()
     # 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_ \
index e586b6e6878b74d682b4ef4bf60ef34a2c74718a..2397d1d059f2a426a4dd84aaf190f1c06bb04bc4 100755 (executable)
--- a/t/all2.sh
+++ b/t/all2.sh
@@ -27,7 +27,7 @@ for target in $targets; do
   $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
 
 :
index 2a60dd95113db4f2b93d758f1418bd40a6eab8c0..5886691b779fe84f1887da387e19db9a554fc5e7 100644 (file)
@@ -106,7 +106,7 @@ setup_srcdir ()
   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'"
 }
 
index 3ea2a83500697800f137fdbc9edae5e478d5accb..952a49dfa3047fff98fd9d11fe32793e28fd5b73 100644 (file)
@@ -28,8 +28,7 @@ test -f ../../automake && test -f ../../defs && test -d ../../t \
 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
index 8c0bf9bca6a6fd23d77d33331a67ffcec94ad690..e9d00e0af415a3324031f09c074abba9b42166e2 100755 (executable)
@@ -45,7 +45,7 @@ $MAKE distdir
 
 find $distdir # For debugging.
 
-rm -rf $distdir/.mk
+rm -rf $distdir/am-ng
 
 test -f $distdir/src
 test -f $distdir/src2
index d73e445cf3b88c166c3aa93ca1d25dd0c1ed800b..8edf6f074303c708925740105050b08f8ce7860b 100755 (executable)
@@ -71,8 +71,7 @@ cat stdout
 
 # 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)"
index 2c6f9bc9195eeb10efe15cd111b496f48495a70a..8bf43aa3d4e66fbe4adfcff83d0067fa6c231dac 100755 (executable)
@@ -25,10 +25,10 @@ END
 
 $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
 
 :
index 3fd31d926ab10c68692f87298a47a8b6ee2247f1..58202af4ba4bc314817f632413f640ebb23a7a71 100755 (executable)
@@ -42,7 +42,7 @@ $MAKE 2>stderr && { cat stderr >&2; exit 1; }
 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'
index 3a5a8ebd0f6c8df1a42d561ebd19ee6b17d75c8f..839e363d56c8acb21e1536dba16ce0a3cb9e5baa 100755 (executable)
@@ -42,7 +42,7 @@ $MAKE 2>stderr && { cat stderr >&2; exit 1; }
 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'