grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.23-7-g9e28083


From: Jim Meyering
Subject: grep branch, master, updated. v2.23-7-g9e28083
Date: Fri, 04 Mar 2016 01:22:22 +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 "grep".

The branch, master has been updated
       via  9e2808386e6860657e5eadfd1a6aa6630e0d4422 (commit)
      from  b45641c374a4e34a351ecee61334be0c5c9c4341 (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 -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=9e2808386e6860657e5eadfd1a6aa6630e0d4422


commit 9e2808386e6860657e5eadfd1a6aa6630e0d4422
Author: Jim Meyering <address@hidden>
Date:   Sun Feb 28 21:52:38 2016 -0800

    maint: add dist-check.mk
    
    This file augments "make distcheck" rules.
    * dist-check.mk: New file, from coreutils via gzip.
    * Makefile.am (EXTRA_DIST): Add it.
    * cfg.mk: Include it.

diff --git a/Makefile.am b/Makefile.am
index 696510a..d04cd79 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,7 @@ SUBDIRS = po lib doc src tests gnulib-tests
 EXTRA_DIST =           \
   .mailmap             \
   ChangeLog-2009       \
+  dist-check.mk                \
   README               \
   README-alpha         \
   THANKS.in            \
diff --git a/cfg.mk b/cfg.mk
index 3f4ef32..7a2bead 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -135,6 +135,8 @@ update-copyright-env = \
   UPDATE_COPYRIGHT_USE_INTERVALS=1 \
   UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
 
+include $(abs_top_srcdir)/dist-check.mk
+
 exclude_file_name_regexp--sc_bindtextdomain = \
   ^tests/(get-mb-cur-max|dfa-match-aux)\.c$$
 exclude_file_name_regexp--sc_prohibit_atoi_atof = \
diff --git a/dist-check.mk b/dist-check.mk
new file mode 100644
index 0000000..f23339e
--- /dev/null
+++ b/dist-check.mk
@@ -0,0 +1,198 @@
+# Most of this is probably too coreutils-centric to be useful to other 
packages.
+
+bin=bin-$$$$
+
+write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)'
+
+tmpdir = $(abs_top_builddir)/tests/torture
+
+t=$(tmpdir)/$(PACKAGE)/test
+pfx=$(t)/i
+
+built_programs =                                               \
+  $$(echo 'spy:;@echo $$(bin_PROGRAMS)'                                \
+    | MAKEFLAGS= $(MAKE) -s -f Makefile -f - spy               \
+    | fmt -1 | sed 's,$(EXEEXT)$$,,' | sort -u)
+
+# More than once, tainted build and source directory names would
+# have caused at least one "make check" test to apply "chmod 700"
+# to all directories under $HOME.  Make sure it doesn't happen again.
+tp = $(tmpdir)/taint
+t_prefix = $(tp)/a
+t_taint = '$(t_prefix) b'
+fake_home = $(tp)/home
+
+# When extracting from a distribution tarball, extract using the fastest
+# method possible.  With dist-xz, that means using the *.xz file.
+ifneq ('', $(filter *.xz, $(DIST_ARCHIVES)))
+  tar_decompress_opt_ = J
+  suffix_ = xz
+else
+  ifneq ('', $(filter *.gz, $(DIST_ARCHIVES)))
+    tar_decompress_opt_ = z
+    suffix_ = gz
+  else
+    tar_decompress_opt_ = j
+    suffix_ = bz2
+  endif
+endif
+amtar_extract_ = $(AMTAR) -$(tar_decompress_opt_)xf
+preferred_tarball_ = $(distdir).tar.$(suffix_)
+
+# Ensure that tests run from tainted build and src dir names work,
+# and don't affect anything in $HOME.  Create witness files in $HOME,
+# record their attributes, and build/test.  Then ensure that the
+# witnesses were not affected.
+# Skip this test when using libtool, since libtool-generated scripts
+# cannot deal with a space-tainted srcdir.
+ALL_RECURSIVE_TARGETS += taint-distcheck
+taint-distcheck: $(DIST_ARCHIVES)
+       grep '^[         ]*LT_INIT' configure.ac >/dev/null && exit 0 || :
+       test -d $(t_taint) && chmod -R 700 $(t_taint) || :
+       -rm -rf $(t_taint) $(fake_home)
+       mkdir -p $(t_prefix) $(t_taint) $(fake_home)
+       $(amtar_extract_) $(preferred_tarball_) -C $(t_taint)
+       mkfifo $(fake_home)/fifo
+       touch $(fake_home)/f
+       mkdir -p $(fake_home)/d/e
+       ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-before
+       HOME=$(fake_home); export HOME;                 \
+       cd $(t_taint)/$(distdir)                        \
+         && ./configure                                \
+         && $(MAKE)                                    \
+         && $(MAKE) check                              \
+         && ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-after \
+         && diff $(tp)/.ls-before $(tp)/.ls-after      \
+         && test -d $(t_prefix)
+       rm -rf $(tp)
+
+# Verify that a twisted use of --program-transform-name=PROGRAM works.
+define install-transform-check
+  echo running install-transform-check                 \
+    && rm -rf $(pfx)                                   \
+    && $(MAKE) program_transform_name='s/.*/zyx/'      \
+      prefix=$(pfx) install                            \
+    && test "$$(echo $(pfx)/bin/*)" = "$(pfx)/bin/zyx" \
+    && test "$$(find $(pfx)/share/man -type f|sed 's,.*/,,;s,\..*,,')" = "zyx"
+endef
+
+# Install, then verify that all binaries and man pages are in place.
+# Note that neither the binary, ginstall, nor the [.1 man page is installed.
+define my-instcheck
+  echo running my-instcheck;                           \
+  $(MAKE) prefix=$(pfx) install                                \
+    && test ! -f $(pfx)/bin/ginstall                   \
+    && { fail=0;                                       \
+      for i in $(built_programs); do                   \
+        test "$$i" = ginstall && i=install;            \
+        for j in "$(pfx)/bin/$$i"                      \
+                 "$(pfx)/share/man/man1/$$i.1"; do     \
+          case $$j in *'[.1') continue;; esac;         \
+          test -f "$$j" && :                           \
+            || { echo "$$j not installed"; fail=1; };  \
+        done;                                          \
+      done;                                            \
+      test $$fail = 1 && exit 1 || :;                  \
+    }
+endef
+
+# The hard-linking for-loop below ensures that there is a bin/ directory
+# full of all of the programs under test (except the ones that are required
+# for basic Makefile rules), all symlinked to the just-built "false" program.
+# This is to ensure that if ever a test neglects to make PATH include
+# the build srcdir, these always-failing programs will run.
+# Otherwise, it is too easy to test the wrong programs.
+# Note that "false" itself is a symlink to true, so it too will malfunction.
+define coreutils-path-check
+  {                                                    \
+    echo running coreutils-path-check;                 \
+    if test -f $(srcdir)/src/true.c; then              \
+      fail=1;                                          \
+      mkdir $(bin)                                     \
+       && ($(write_loser)) > $(bin)/loser              \
+       && chmod a+x $(bin)/loser                       \
+       && for i in $(built_programs); do               \
+              case $$i in                              \
+                rm|expr|basename|echo|sort|ls|tr);;    \
+                cat|dirname|mv|wc);;                   \
+                *) ln $(bin)/loser $(bin)/$$i;;        \
+              esac;                                    \
+            done                                       \
+         && ln -sf ../src/true $(bin)/false            \
+         && PATH=`pwd`/$(bin)$(PATH_SEPARATOR)$$PATH   \
+               $(MAKE) -C tests check                  \
+         && { test -d gnulib-tests                     \
+                && $(MAKE) -C gnulib-tests check       \
+                || :; }                                \
+         && rm -rf $(bin)                              \
+         && fail=0;                                    \
+    else                                               \
+      fail=0;                                          \
+    fi;                                                        \
+    test $$fail = 1 && exit 1 || :;                    \
+  }
+endef
+
+# More generic version of the rule above.
+define generic-path-check
+  {                                                    \
+    echo running generic-path-check;                   \
+    if test -f /bin/false; then                                \
+      fail=1;                                          \
+      mkdir $(bin)                                     \
+       && ($(write_loser)) > $(bin)/loser              \
+       && chmod a+x $(bin)/loser                       \
+       && for i in $(built_programs); do               \
+            ln $(bin)/loser $(bin)/$$i;                \
+          done                                         \
+       && PATH=`pwd`/$(bin)$(PATH_SEPARATOR)$$PATH     \
+            $(MAKE) check                              \
+       && { test -d gnulib-tests                       \
+              && $(MAKE) -C gnulib-tests check         \
+              || :; }                                  \
+       && rm -rf $(bin)                                \
+       && fail=0;                                      \
+    else                                               \
+      fail=0;                                          \
+    fi;                                                        \
+    test $$fail = 1 && exit 1 || :;                    \
+  }
+endef
+
+# Use this to make sure we don't run these programs when building
+# from a virgin compressed tarball file, below.
+null_AM_MAKEFLAGS ?= \
+  ACLOCAL=false \
+  AUTOCONF=false \
+  AUTOMAKE=false \
+  AUTOHEADER=false \
+  GPERF=false \
+  MAKEINFO=false
+
+ALL_RECURSIVE_TARGETS += my-distcheck
+my-distcheck: $(DIST_ARCHIVES) $(local-check)
+       $(MAKE) syntax-check
+       $(MAKE) check
+       -rm -rf $(t)
+       mkdir -p $(t)
+       $(amtar_extract_) $(preferred_tarball_) -C $(t)
+       (set -e; cd $(t)/$(distdir);                    \
+         ./configure --quiet --enable-gcc-warnings --disable-nls; \
+         $(MAKE) AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)';  \
+         $(MAKE) dvi;                                  \
+         $(install-transform-check);                   \
+         $(my-instcheck);                              \
+         $(coreutils-path-check);                      \
+         $(generic-path-check);                        \
+         $(MAKE) distclean                             \
+       )
+       (cd $(t) && mv $(distdir) $(distdir).old        \
+         && $(amtar_extract_) - ) < $(preferred_tarball_)
+       find $(t)/$(distdir).old $(t)/$(distdir) -name .deps | xargs rmdir
+       diff -ur $(t)/$(distdir).old $(t)/$(distdir)
+       -rm -rf $(t)
+       rmdir $(tmpdir)/$(PACKAGE) $(tmpdir)
+       @echo "========================"; \
+       echo "ready for distribution:"; \
+       for i in $(DIST_ARCHIVES); do echo "  $$i"; done; \
+       echo "========================"

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am   |    1 +
 cfg.mk        |    2 +
 dist-check.mk |  198 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 201 insertions(+), 0 deletions(-)
 create mode 100644 dist-check.mk


hooks/post-receive
-- 
grep



reply via email to

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