automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, branch-1.13.2, updated. v1.


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, branch-1.13.2, updated. v1.13.1b-61-gf5f75ee
Date: Sat, 04 May 2013 10:09:37 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=f5f75eef28a32493258047eb3060478395a42120

The branch, branch-1.13.2 has been updated
       via  f5f75eef28a32493258047eb3060478395a42120 (commit)
       via  b993a265e6af722c2d4cea69d1782ffde33d6d80 (commit)
       via  eddba1ccc124aaed5a613260b259f73e2aedf825 (commit)
       via  dc3cdb1d53c51c95981dbf77b05f70e4040075b9 (commit)
       via  57925b6707d9d6ae0afe92539b019bdd3c062305 (commit)
       via  1adb0570cb5badd8bb569d2d243fcedd103f0b94 (commit)
       via  6d643e93182d50d236ccfeacffad55576cf51d99 (commit)
       via  5c4aaae2b0978ebdc1e1bf950917b82e6f7ad8d5 (commit)
       via  b62616b3bc7dfcd1b260b0369ecf0d67eef3d00e (commit)
       via  c93bc3d4e6d12068f0d9b32b67ec63b3ca3313bd (commit)
       via  7aa99186d1c5fb31d3fd39beb129fc4cb44f2c7c (commit)
       via  d017b54baba7d6eadab6394da6ee62f0a83b1238 (commit)
       via  e242b44eedb39afa0dbd72a74f56b2863c2aaf55 (commit)
      from  425fe1e87a78985c0d51ebb185793e57cdd433da (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 Makefile.am           |   33 +++++++++------
 lib/am/header-vars.am |  106 +++++++++++++++++++++++++++----------------------
 maint.mk              |   97 +++++++++++++++++++++++++++++++++++++++++++-
 t/make-dryrun.tap     |   33 ++++++++-------
 t/make-keepgoing.tap  |   27 +++++++------
 5 files changed, 206 insertions(+), 90 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ab1dfed..0b337f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -73,6 +73,11 @@ EXTRA_DIST += \
   syntax-checks.mk \
   HACKING
 
+# For some tests or targets, we need to have the just-build automake and
+# aclocal scripts avaiable on PATH.
+extend_PATH = \
+  { PATH='$(abs_builddir)/t/wrap'$(PATH_SEPARATOR)$$PATH && export PATH; }
+
 # Make versioned links.  We only run the transform on the root name;
 # then we make a versioned link with the transformed base name.  This
 # seemed like the most reasonable approach.
@@ -574,8 +579,7 @@ EXTRA_DIST += doc/help2man
 update_mans = \
   $(AM_V_GEN): \
     && $(MKDIR_P) doc \
-    && PATH="$(abs_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
-    && export PATH \
+    && $(extend_PATH) \
     && $(PERL) $(srcdir)/doc/help2man --output=$@
 
 doc/aclocal.1 doc/automake.1:
@@ -615,22 +619,25 @@ amhello_configury = \
 dist_noinst_DATA += $(amhello_sources)
 dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
 
+setup_autotools_paths = { \
+  $(extend_PATH) \
+    && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
+    && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
+    && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
+    && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
+    && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
+    && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
+    && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
+    && true; \
+}
+
 # We depend on configure.ac so that we regenerate the tarball
 # whenever the Automake version changes.
-# aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
-# configure in 't/wrap'.
 $(srcdir)/doc/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
        $(AM_V_GEN)tmp=amhello-output.tmp \
-         && PATH="$(abs_top_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
-         && export PATH \
          && $(am__cd) $(srcdir)/doc/amhello \
-         && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
-         && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
-         && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
-         && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
-         && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
-         && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
-         && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
+         && : Make our aclocal and automake avaiable before system ones. \
+         && $(setup_autotools_paths) \
          && ( \
            { $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \
              && $(am_AUTORECONF) -vfi \
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 4ad1783..4b9cc04 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -36,71 +36,83 @@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n 
'$(MAKELEVEL)'
 ## no argument.  Actually, the only supported option at the moment
 ## is '-n' (support for '-k' will be added soon).
 am__make_running_with_option = \
-  { \
-    case $${am__target_option-} in \
-        ?) ;; \
-        *) echo "am__make_running_with_option: internal error: invalid" \
-                "target option '$${am__target_option-}' specified" >&2; \
-           exit 1;; \
-    esac; \
-    am__has_opt=no; \
-    if $(am__is_gnu_make); then \
-## GNU make: $(MAKEFLAGS) is quite tricky there, while the older variable
-## $(MFLAGS) behaves much better.  So use the latter.
-      for am__flg in $$MFLAGS; do \
-        case $$am__flg in \
-          *=*|--*) ;; \
-          -*$$am__target_option*) am__has_opt=yes; break;; \
-        esac; \
-      done; \
-    else \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+## The format of $(MAKEFLAGS) is quite tricky with GNU make; the
+## variable $(MFLAGS) behaves much better in that regard.  So use it.
+    sane_makeflags=$$MFLAGS; \
+  else \
 ## Non-GNU make: we must rely on $(MAKEFLAGS).  This is tricker and more
 ## brittle, but is the best we can do.
-      case $$MAKEFLAGS in \
+    case $$MAKEFLAGS in \
 ## If we run "make TESTS='snooze nap'", FreeBSD make will export MAKEFLAGS
 ## to " TESTS=foo\ nap", so that the simpler loop below (on word-splitted
 ## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly
 ## misinterpret that as and indication that make is running in dry mode.
 ## This has already happened in practice.  So we need this hack.
-         *\\[\ \       ]*) \
-## Extra indirection with ${am__bs} required by FreeBSD 8.x make.
+      *\\[\ \  ]*) \
+## Extra indirection with ${bs} required by FreeBSD 8.x make.
 ## Not sure why (so sorry for the cargo-cult programming here).
-           am__bs=\\; \
-           am__flags=`printf '%s\n' "$$MAKEFLAGS" \
-            | sed "s/$$am__bs$$am__bs[$$am__bs $$am__bs        ]*//g"`;; \
-         *) \
-           am__flags=$$MAKEFLAGS;; \
-      esac; \
-      am__skip_next=no; \
-      for am__flg in $$am__flags; do \
-        if test $$am__skip_next = yes; then \
-          am__skip_next=no; \
-          continue; \
-        fi; \
-        case $$am__flg in \
-          *=*|--*) ;; \
-## Quite ugly special-casing.  We might need other similar ones actually,
-## but let's wait until the need arises.
-          -I) am__skip_next=yes;; \
-          *$$am__target_option*) am__has_opt=yes; break;; \
-        esac; \
-      done;\
-    fi; \
-    unset am__skip_next am__flg am__flags am__target_option; \
-    test $$am__has_opt = yes; \
-  }
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+##
+## GNU make 3.83 has changed the format of $MFLAGS, and removed the space
+## between an option and its argument (e.g., from "-I dir" to "-Idir").
+## So we need to handle both formats, at least for options valid in GNU
+## make.  OTOH, BSD make formats $(MAKEFLAGS) by separating all options,
+## and separating any option from its argument, so things are easier
+## there.
+##
+## For GNU make and BSD make.
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+## For GNU make >= 3.83.
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+## For GNU make (possibly overkill, this one).
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+## For BSD make.
+      -[dEDm]) skip_next=yes;; \
+## For NetBSD make.
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
 
 ## Shell code that determines whether make is running in "dry mode"
 ## ("make -n") or not.  Useful in rules that invoke make recursively,
 ## and are thus executed also with "make -n" -- either because they
 ## are declared as dependencies to '.MAKE' (NetBSD make), or because
 ## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
-am__make_dryrun = { am__target_option=n; $(am__make_running_with_option); }
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
 
 ## Shell code that determines whether make is running in "keep-going mode"
 ## ("make -k") or not.  Useful in rules that must recursively descend into
 ## subdirectories, and decide whther to stop at the first error or not.
-am__make_keepgoing = { am__target_option=k; $(am__make_running_with_option); }
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 
 ## Some derived variables that have been found to be useful.
 pkgdatadir = $(datadir)/@PACKAGE@
diff --git a/maint.mk b/maint.mk
index 69b1630..77b072f 100644
--- a/maint.mk
+++ b/maint.mk
@@ -302,11 +302,14 @@ CLEANFILES += announcement
 # Program to use to fetch files.
 WGET = wget
 
+# Git repositories on Savannah.
+git-sv-host = git.savannah.gnu.org
+
 # Some repositories we sync files from.
 SV_CVS    = 'http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/'
-SV_GIT_CF = 
'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
-SV_GIT_AC = 
'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;hb=HEAD;f='
-SV_GIT_GL = 
'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
+SV_GIT_CF = 
'http://$(git-sv-host)/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
+SV_GIT_AC = 
'http://$(git-sv-host)/gitweb/?p=autoconf.git;a=blob_plain;hb=HEAD;f='
+SV_GIT_GL = 
'http://$(git-sv-host)/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
 
 # Files that we fetch and which we compare against.
 # Note that the 'lib/COPYING' file must still be synced by hand.
@@ -465,3 +468,91 @@ update-copyright:
          | grep -Ev '(^|/)README$$' \
          | grep -Ev "^($$excluded_re)$$" \
          | $(update_copyright_env) xargs $(srcdir)/lib/$@
+
+# --------------------------------------------------------------- #
+#  Testing on real-world packages can help us avoid regressions.  #
+# --------------------------------------------------------------- #
+
+#
+# NOTE (from Stefano Lattarini):
+# 
+# This section is mostly hacky and ad-hoc, but works for me and
+# on my system.  And while far from clean, it should help catching
+# real regressions on real world packages, which is important.
+# Ideas about how to improve this and make it more generic, portable,
+# clean, etc., are welcome.
+#
+
+# Tiny sample package.
+FEW_PACKAGES += hello
+# Smallish package using recursive make setup.
+FEW_PACKAGES += make
+# Medium-size package using non-recursive make setup.
+FEW_PACKAGES += coreutils
+
+ALL_PACKAGES = \
+  $(FEW_PACKAGES) \
+  autoconf \
+  bison \
+  grep \
+  tar \
+  diffutils \
+  smalltalk
+
+pkg-targets = check dist
+
+# Note: "ttp" stays for "Third Party Package".
+
+ttp-check ttp-check-all: do-clone = $(GIT) clone --verbose
+ttp-check: ttp-packages = $(FEW_PACKAGES)
+ttp-check-all: ttp-packages = $(ALL_PACKAGES)
+
+# Note: some packages depend on pkg-config, and its provided macros.
+ttp-check ttp-check-all: t/pkg-config-macros.log
+       @set -e; \
+       $(setup_autotools_paths); \
+       skip_all_ () \
+       { \
+         echo "***" >&2; \
+         echo "*** $@: WARNING: $$@" >&2; \
+         echo "*** $@: WARNING: some packages might fail to bootstrap" >&2; \
+         echo "***" >&2;  \
+       }; \
+       . t/pkg-config-macros.dir/get.sh || exit 1; \
+       mkdir address@hidden && cd address@hidden || exit 1; \
+       for p in $(ttp-packages); do \
+           echo; \
+           echo ========  BEGIN TTP $$p  =========; \
+           echo; \
+           set -x; \
+           $(do-clone) git://$(git-sv-host)/$$p.git || exit 1; \
+           ( \
+             cd $$p \
+               && ls -l \
+               && if test -f bootstrap; then \
+                    ./bootstrap --no-git; \
+                  else \
+                    $$AUTORECONF -fvi; \
+                  fi \
+               && ./configure \
+               && if test $$p = make; then \
+                    $(MAKE) update; \
+                  else :; fi \
+               && for t in $(pkg-targets); do \
+                    $(MAKE) $$t WERROR_CFLAGS= || exit 1; \
+                  done \
+           ) || exit 1; \
+           set +x; \
+           echo; \
+           echo ========  END TTP $$p  =========; \
+           echo; \
+        done
+ifndef keep-ttp-dir
+       rm -rf address@hidden
+endif
+
+# Alias for lazy typists.
+ttp: ttp-check
+ttp-all: ttp-check-all
+
+.PHONY: ttp ttp-check ttp-all ttp-check-all
diff --git a/t/make-dryrun.tap b/t/make-dryrun.tap
index 2fd37a2..0dbe3bb 100755
--- a/t/make-dryrun.tap
+++ b/t/make-dryrun.tap
@@ -18,7 +18,7 @@
 
 . test-init.sh
 
-plan_ 20
+plan_ 60
 
 if echo "all: ; address@hidden %sbb%s aa cc" | $MAKE -n -f - | grep aabbcc; 
then
   make_plus_silence () { return 0; }
@@ -39,16 +39,16 @@ cat > Makefile.am <<'END'
 all:
        : Dummy, nothing to do.
 run:
-       @echo ":: $$MAKEFLAGS ::"; : For debugging.
+       @echo ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
        $(am__make_dryrun) && exit 1; echo ok > from-run
 dry:
-       address@hidden ":: $$MAKEFLAGS ::"; : For debugging.
+       address@hidden ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
        +$(am__make_dryrun) || exit 1; echo ok > from-dry
 END
 
 check_make ()
 {
-  r=ok msg= mode= condition=: directive= reason= skip_reason=
+  msg= mode= condition=: directive= reason= skip_reason=
   case $1 in
     --dry) mode=dry;;
     --run) mode=run;;
@@ -64,17 +64,20 @@ check_make ()
     esac
     shift
   done
-  msg=${mode}${msg:+" [$msg]"}
-  if $condition; then
-    $MAKE "$mode" ${1+"$@"} || r='not ok'
-    test -f from-$mode      || r='not ok'
-    test ! -e bad           || r='not ok'
-    rm -f bad from-*        || fatal_ "cleaning up"
-  else
-    directive=SKIP reason=$skip_reason
-  fi
-  result_ "$r" -D "$directive" -r "$reason" "$msg"
-  unset r msg mode condition directive reason skip_reason
+  for opts in '' '-s'  '-s -r'; do
+    r=ok
+    pmsg=${mode}${msg:+" [$msg]"}${opts:+" ($opts)"}
+    if $condition; then
+      $MAKE $opts "$mode" ${1+"$@"} || r='not ok'
+      test -f from-$mode            || r='not ok'
+      test ! -e bad                 || r='not ok'
+      rm -f bad from-*              || fatal_ "cleaning up"
+    else
+      directive=SKIP reason=$skip_reason
+    fi
+    result_ "$r" -D "$directive" -r "$reason" "$pmsg"
+  done
+  unset r msg pmsg opts mode condition directive reason skip_reason
 }
 
 # ----------------------------------------------------------------------
diff --git a/t/make-keepgoing.tap b/t/make-keepgoing.tap
index a71d2d0..f9db028 100755
--- a/t/make-keepgoing.tap
+++ b/t/make-keepgoing.tap
@@ -18,7 +18,7 @@
 
 . test-init.sh
 
-plan_ 20
+plan_ 60
 
 mkdir kool # Also used later.
 if echo nil: | $MAKE -I kool -f -; then
@@ -33,16 +33,16 @@ cat > Makefile.am <<'END'
 all:
        @echo 'Default target $@ should not be called'>&2; exit 1;
 k-y:
-       @echo ":: $$MAKEFLAGS ::" ;: For debugging.
+       @echo ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
        $(am__make_keepgoing)
 k-n:
-       @echo ":: $$MAKEFLAGS ::" ;: For debugging.
+       @echo ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
        $(am__make_keepgoing) && exit 1; exit 0
 END
 
 check_make ()
 {
-  r=ok msg= mode= condition=: directive= reason= skip_reason=
+  msg= mode= condition=: directive= reason= skip_reason=
   case $1 in
     k-[yn]) mode=$1;;
     *) fatal_ "check_run: invalid usage";;
@@ -58,14 +58,17 @@ check_make ()
     esac
     shift
   done
-  msg=${mode}${msg:+" [$msg]"}
-  if $condition; then
-    $MAKE "$mode" ${1+"$@"} || r='not ok'
-  else
-    directive=SKIP reason=$skip_reason
-  fi
-  result_ "$r" -D "$directive" -r "$reason" "$msg"
-  unset r msg mode condition directive reason skip_reason
+  for opts in '' '-s'  '-s -r'; do
+    r=ok
+    pmsg=${mode}${msg:+" [$msg]"}${opts:+" ($opts)"}
+    if $condition; then
+      $MAKE $opts "$mode" ${1+"$@"} || r='not ok'
+    else
+      directive=SKIP reason=$skip_reason
+    fi
+    result_ "$r" -D "$directive" -r "$reason" "$pmsg"
+  done
+  unset r msg pmsg opts mode condition directive reason skip_reason
 }
 
 # ----------------------------------------------------------------------


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]