summaryrefslogtreecommitdiff
path: root/t/yacc-cxx-grepping.sh
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-06-21 13:56:43 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-06-21 13:56:43 +0200
commit2ff310174c08e9f3a178cbd3b47ca3e9898ecda5 (patch)
tree8a301ffb04a2b718f261ff4aef44a3dd93f1061b /t/yacc-cxx-grepping.sh
parent6f301b5cf58b1bc2ff1ee118086c8f0b3146b5d7 (diff)
parent177d0392e690eacfbe29bac4d82d30ba6303b304 (diff)
downloadautomake-2ff310174c08e9f3a178cbd3b47ca3e9898ecda5.tar.gz
Merge branch 'maint' into micro
* maint: release: stable minor release 1.14 NEWS: one more minor fixlet maint: port check-minimal-autoconf to VPATH builds tests: avoid spurious failures in Linux -> MinGW cross-compilation mode tests: simplify checks for some expected variables values in Makefiles NEWS: improve and update wording tests: fix/improve few heading comments coverage: new test on Texinfo @include support tests: tighten a grepping check tests: more significant names for some tests rename-tests: rework some code for clarity and safety tests: cosmetic changes in t/extra-sources.sh rename-tests: inform the user about the pre-filled commit msg typofix: in comments in 'maintainer/rename-tests' rename-tests: also "git add" list-of-tests.mk tests: rename t/exsource.sh -> t/extra-sources.sh tests: some improvements to Gettext tests maint: version bump after beta release 1.13b release: beta release 1.13b (will become 1.14) automake: assume we can always pass '-o' to the C compiler NEWS: fix typo NEWS: on assuming "rm -f" without arguments work docs: AM_PROG_CC_C_O: correct imprecise statements about it NEWS: document deprecation of 'shar' and 'compress' dist formats m4: rename minuso.m4 -> prog-cc-c-o.m4 tests: some tests make no sense if "$CC -c -o" doesn't work AM_PROG_CC_C_O: don't rely on AC_PROG_CC_C_O, re-implement similar logic compile: rewrite AC_PROG_CC with AM_PROG_CC_C_O contents tests: avoid few lingering $MAKE redirections tests: fix a spurious failure on NetBSD 5.1 texi: build version.texi and stamp-vti in srcdir tests: fix a botched heading comment tests: fix another spurious with FreeBSD make tests: fix a spurious failure with FreeBSD make tests: remove remaining exec bits ('maint' branch) PLANS: subdir-objects: various updates THANKS: update Akim's e-mail address tests: less uses of "make -e"; avoid spurious failures in 'check-cc-no-c-o' build: be more respectful of user-specified verbosity check-cc-no-c-o: unify initializations in a single place check-cc-no-c-o: avoid a spurious failure build: fixup for building in a VPATH setup Use AC_DEFUN_ONCE to define AM_PROG_CC_C_O compile: avoid AC_PROG_CC messy rewrite options: tiny simplification in dealing with incompatible versions options: try to report as much errors as possible refactor: fix few "inverted boolean" usages options: better name for an internal function options: more consistency in use of return statuses to report errors options: tiny simplification in dealing with erroneous opts options: consistently use return statuses to report errors options: re-enable some sanity checks THANKS: update Eric Blake's e-mail address NEWS: typofix news: document new 'subdir-objects' warning PLANS: one minor fixlet (mostly cosmetic) PLANS: we have already dropped support for split info files in master NEWS: fix a reference to Automake 1.14 where Automake 2.0 was intended PLANS: fix reference to non-existent 'next' branch PLANS: fix botched version reference maintcheck: fix two references to old location of aclocal and automake dist: deprecated shar and tar+compress formats am: prefer a shorter idiom where possible maint: re-run "make update-copyright" ... tests: avoid spurious failure with older flex (2.5.4) build: move automake and aclocal in 'bin' subdir build: break up monolithic Makefile.am in subdir-specific fragments maint branch: we are going to become Automake 1.14 tests: typofixes in comments in t/preproc-c-compile.sh tests: remove bashism from a test tests: rename some with more descriptive names typofix: in comments in t/extra2.sh tests: fix botched cross-reference in a heading comment automake: refactoring: factor out common cpp-like flags NEWS (mint): reflect new Automake versioning scheme maintcheck: avoid spurious failure perl: perl subroutine prototypes are problematic, don't use them maint: more adjustments to the new versioning scheme cosmetics: fix some "docstring-like" comments in automake style: call perl functions 'like_this()', not '&like_this()' preproc: enhance and extend tests preproc: add support for relative names in included fragments maint: use more perl subroutines prototypes in the automake script build: auto-generate perl subroutines prototypes for automake and aclocal refactor: rip module Automake::Language out of automake script tests: more information about Lex and Yacc programs lint: fix spurious failure for 'sc_rm_minus_f' syntax check maint: bump version 1.13.1a -> 1.13.2a plans: we are not going to remove AM_PROG_MKDIR_P in Automake 1.14 init.m4: add probe to check "rm -f" without args work subdir-objects: complain if it isn't enabled plans: update w.r.t. latest changes ywrap: remove an obsolete FIXME comment ywrap: style fixes (no semantic change intended) convenience: "make lint" as an alias for "make maintainer-check" docs: typofix in manual coverage: using multiple lexers in a single program tests: remove most uses of the AM_PROG_CC_C_O obsolete macro coverage: obsolete macro AM_PROG_CC_C_O should cause no warning nor errors INSTALL: update copyright years ithreads: use runtime (not configure time) detection of perl threads copyright: add few missing copyright notices maint: files in PLANS are to be exempted from copyright notice maint: consistently honor the UPDATE_COPYRIGHT_YEAR environment variable copyright: update some copyright years compile: use 'compile' script when "-c -o" is used with losing compilers HACKING: suggest more checks before releasing tests: can fake a compiler not grasping "-c -o" -- globally in all tests sync: update files from upstream with "make fetch" typofix: in comments in GNUmakefile Rename 'maint/' -> 'maintainer/', for Git's sake HACKING: minor typofix HACKING: bug-tracker, the PLANS directory, and how to plan "big" changes HACKING: rewindable branches should live in the 'experimental/*' namespace HACKING: fixlets about git branch rewinding policy HACKING: commit messages are not to follow GCS ChangeLog rules too strongly HACKING: "detailed explanation" in commit messages is almost mandatory HACKING: we use "merge --log" even when merging master HACKING: typofix depend2.am: fix comments on verbosity of compilation rules depend2.am: improve comments a little plans: automake 1.14 is to assume "rm -f" with no args is OK plans: we want to active subdir-objects unconditionally in automake 1.14 tests: adjust stale references to old test names tests: rename the last aclocal test with dumb name tests: fix an old botched change to an aclocal test tests: fix some botched inter-test references in heading comments coverage: compile rules used "-c -o" also with losing compilers texi: remove extra verbosity in creation of dirstamp directory coverage: user can avoid distributing '.info' pages plans: add some on-going plans (already registered on the bug tracker) docs: mention dist-hook help for EXTRA_DIST texi: remove workaround for older Texinfo (4.1) NEWS: improve wordings in entry deprecating suffix-less info files build: don't enable 'color-tests' automake option explicitly build: enable all warnings as fatal in our own build system texi: Texinfo sources and CLEANFILES definition should co-exist peacefully tests: make two new test executable runtest: better command line API tests: move runtest.in away from the top-lever directory maint: move more maintainer files in the 'maint/' subdir plans: add the "PLANS" directory tests: more significant names for some tests maint: add some of my maintainer-specific scripts texi: deprecate hack about info files in CLEANFILES variables texi: info files can be generated in the builddir
Diffstat (limited to 't/yacc-cxx-grepping.sh')
-rw-r--r--t/yacc-cxx-grepping.sh81
1 files changed, 81 insertions, 0 deletions
diff --git a/t/yacc-cxx-grepping.sh b/t/yacc-cxx-grepping.sh
new file mode 100644
index 000000000..079014673
--- /dev/null
+++ b/t/yacc-cxx-grepping.sh
@@ -0,0 +1,81 @@
+#! /bin/sh
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure Yacc + C++ is not obviously broken.
+# See also related tests 'yacc-cxx.sh' and 'yacc-d-cxx.sh',
+# which does much more in-depth checks (but requires an actual
+# Yacc program and a working C++ compiler).
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CXX
+AC_PROG_YACC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo bar baz qux
+foo_SOURCES = foo.y++
+bar_SOURCES = bar.ypp
+baz_SOURCES = baz.yy
+qux_SOURCES = qux.yxx
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+$EGREP '(\.[ch]|foo|bar|baz|qux)' Makefile.in # For debugging.
+
+$EGREP '(foo|bar|baz|qux)\.h' Makefile.in && exit 1
+
+sed -e 's/^/ /' -e 's/$/ /' Makefile.in >mk
+
+$FGREP ' foo.c++ ' mk
+$FGREP ' bar.cpp ' mk
+$FGREP ' baz.cc ' mk
+$FGREP ' qux.cxx ' mk
+
+cat >> Makefile.am <<END
+AM_YFLAGS = -d
+qux_YFLAGS = foo
+END
+
+$AUTOMAKE
+
+$EGREP '(\.[ch]|foo|bar|baz|qux)' Makefile.in # For debugging.
+
+sed -e 's/^/ /' -e 's/$/ /' Makefile.in >mk
+
+$FGREP ' foo.c++ ' mk
+$FGREP ' foo.h++ ' mk
+$FGREP ' bar.cpp ' mk
+$FGREP ' bar.hpp ' mk
+$FGREP ' baz.cc ' mk
+$FGREP ' baz.hh ' mk
+
+$EGREP '(^| )foo\.h\+\+(:| .*:)' Makefile.in
+$EGREP '(^| )bar\.hpp(:| .*:)' Makefile.in
+$EGREP '(^| )baz\.hh(:| .*:)' Makefile.in
+
+grep ' foo\.h[ :]' mk && exit 1
+grep ' bar\.h[ :]' mk && exit 1
+grep ' baz\.h[ :]' mk && exit 1
+
+$FGREP ' qux-qux.cxx ' mk
+$EGREP '(^| )qux-qux\.cxx(:| .*:)' Makefile.in
+grep 'qux\.h.*:' Makefile.in && exit 1
+
+: