summaryrefslogtreecommitdiff
path: root/t/ccnoco.sh
Commit message (Collapse)AuthorAgeFilesLines
* maint: Update copyright years to 2018Mathieu Lirzin2018-01-041-1/+1
| | | | This update has been made with 'make update-copyright'.
* Prefer https: URLsPaul Eggert2017-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | In Gnulib, Emacs, etc. we are changing ftp: and http: URLs to use https:, to discourage man-in-the-middle attacks when downloading software. The attached patch propagates these changes upstream to Automake. This patch does not affect files that Automake is downstream of, which I'll patch separately. Althouth the resources are not secret, plain HTTP is vulnerable to malicious routers that tamper with responses from GNU servers, and this sort of thing is all too common when people in some other countries browse US-based websites. See, for example: Aceto G, Botta A, Pescapé A, Awan MF, Ahmad T, Qaisar S. Analyzing internet censorship in Pakistan. RTSI 2016. https://dx.doi.org/10.1109/RTSI.2016.7740626 HTTPS is not a complete solution here, but it can be a significant help. The GNU project regularly serves up code to users, so we should take some care here.
* maint: Update copyright years to 2017.Mathieu Lirzin2017-03-021-1/+1
| | | | This update has been made with 'make update-copyright'.
* maint: update copyright years to 2015 (branch 'micro')Stefano Lattarini2015-01-051-1/+1
| | | | Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* maint: update copyright yearsStefano Lattarini2014-04-211-1/+1
| | | | | | We've been in 2014 already for few months now... Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* AM_PROG_CC_C_O: don't rely on AC_PROG_CC_C_O, re-implement similar logicStefano Lattarini2013-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ** Theoretical problems of AC_PROG_CC_C_O: Both cc and $CC are checked to see if they support the '-c' and '-o' options together. This behaviour is highly inconsistent with that of the other macros related to C compiler checks -- which test only $CC. It can also cause unwarranted uses of the 'compile' script on systems where the default 'cc' is inferior, but the user is compiling with a proper, different compiler (e.g., gcc). ** Practical problems with our previous implementation of C support m4 macros in Automake: - AM_PROG_AR must now be called *before* AC_PROG_CC; this wasn't the case before, and it turns out there are packages in the wild that relied on the old behaviour. - The cross-referenced requirements and macro rewrites juggled among AC_PROG_CC, AC_PROG_CC_C_O and AM_PROG_CC_C_O caused warnings in autoconf; for example, in our test 't/libobj3.sh', we could see warnings like these (here slightly tweaked for legibility): configure.ac:5: AC_REQUIRE: `AC_PROG_CC' expanded before required autoconf/c.m4:567: AC_PROG_CC_C_O is expanded from... autoconf/c.m4:429: AC_LANG_COMPILER(C) is expanded from... autoconf/lang.m4:329: AC_LANG_COMPILER_REQUIRE is expanded from... autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from... m4sugar/m4sh.m4:639: AS_IF is expanded from... autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... aclocal.m4:70: AM_PROG_AR is expanded from... configure.ac:5: the top level ** Fix all of that: We fix all of the described issues with a new internal m4 macro _AM_PROG_CC_C_O (inspired to, but not based on, AC_PROG_CC_C_O) that gets tacked on to AC_PROG_CC automatically (this is done in the Automake-generated aclocal.m4) and that takes care of checking and adjusting '$CC' for "-c -o" support. The macro AM_PROG_CC_C_O is still present, but is now just a thin wrapper around such Automake-enhanced AC_PROG_CC. It is worth noting that the present patch causes three slight *backward-incompatibilities*: 1. The name cache variable used by AM_PROG_CC_C_O is no longer computed (at configure runtime!) from the content of '$CC', but is statically defined as 'am_cv_prog_cc_c_o'. 2. 'cc' is no longer checked by AM_PROG_CC_C_O, only '$CC' is. 3. AM_PROG_CC_C_O no longer AC_DEFINE the C preprocessor symbol 'NO_MINUS_C_MINUS_O'. Given however that the third change can easily be worked around, that the first two changes can be legitimately seen as bug fixes, and that the new semantics introduced by such changes will simplify the transition to Automake 2.0 (when the 'subdir-objects' will always be enabled unconditionally), we believe they are acceptable to be shipped with Automake 1.14. With this patch, we also revert some of the testsuite adjustments done in previous commit v1.13.2-178-g9877109 of 2013-05-24 (compile: rewrite AC_PROG_CC with AM_PROG_CC_C_O contents). Such adjustments are no longer needed. * m4/minuso.m4 (_AM_PROG_CC_C_O): New internal macro, basically and adjusted version of a merge between Autoconf-provided AC_PROG_CC_C_O and our old implementation of AM_PROG_CC_C_O. (AM_PROG_CC_C_O): Redefine as a simple wrapper around AC_PROG_CC. * m4/init.m4 (AC_PROG_CC): Append _AM_PROG_CC_C_O, not AM_PROG_CC_C_O, to the pre-existing expansion of this macro. * m4/ar-lib.m4 (AM_PROG_AR): No longer require it to be expanded after AC_PROG_CC. * t/aclocal-deps.sh: Move AC_PROG_CC invocation after AC_PROG_RANLIB and AM_PROG_AR invocations. Things should work this way too (as they used to). * t/subobj-clean-lt-pr10697.sh: Likewise. * t/alloca.sh: Move AC_PROG_CC invocation after AM_PROG_AR invocation. * t/condlib.sh: Likewise. * t/aclocal-deps.sh: Move AC_PROG_CC invocation after LT_INIT and AM_PROG_AR invocations. Make autoconf and autoheader warnings fatal. * t/am-prog-cc-c-o.sh: Adjust to the new semantics, enhance a little, and reduce code duplication. * t/ccnoco.sh: Make autoconf warnings fatal. * t/subpkg.sh: Likewise. * t/ccnoco-lib.sh: Likewise, and fix a comment. * t/link_cond.sh: Enhance a couple of error messages. * configure.ac: Drop "nullification" of AM_PROG_CC_C_O. * NEWS: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* compile: rewrite AC_PROG_CC with AM_PROG_CC_C_O contentsStefano Lattarini2013-05-241-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a much simpler rewrite than the one we attempted in the past, and that was later removed by commit 'v1.13.1d-137-g32eb770' of 2013-05-11 (compile: avoid AC_PROG_CC messy rewrite). Not only this change simplifies the code a little, but has the welcome collateral effect of making automatic dependency tracking work better with compilers that doesn't grasp the '-c' and '-o' options together. Issues in that setup have been caught by several failures in the target 'check-no-cc-c-o'. Unfortunately, this change has less welcome collateral effects: 1. AM_PROG_AR must now be called *after* AC_PROG_CC; 2. Autoconf emits extra warnings when used with Automake-generated aclocal.m4. These are unacceptable regressions for a release, but since we are going to fix them soon enough in a follow-up patch (surely to be applied before Automake 1.14 is released) we don't worry too much. * m4/init.m4: Redefine AC_PROG_CC early, to automatically invoke AM_PROG_CC_C_O as well. Accordingly, drop now-unneeded "automagical" AM_PROG_CC_C_O expansion at later time (which took place thanks to a AC_CONFIG_COMMANDS_PRE call). * m4/minuso.m4 (AM_PROG_CC_C_O): Ensure the expansion of the body of this macro takes place with C as "current Autoconf language" (use AC_LANG_PUSH/AC_LANG_POP). * m4/ar-lib.m4 (AM_PROG_AR): Likewise. Also, require this macro to be expanded *after* AC_PROG_CC (so that any rewrite of $CC, if required, has already taken place). * t/add-missing.tap: Adjust to avoid spurious failures. * t/aclocal-deps.sh: Likewise, by having AM_PROG_AR called *after* AC_PROG_CC. * t/subobj-clean-lt-pr10697.sh: Likewise. * t/alloca.sh: Likewise. * t/condlib.sh: Likewise. * t/discover.sh: Likewise. * t/objc-megademo.sh: Likewise. * t/ccnoco.sh: Extend a little. * t/ccnoco-deps.sh: New test. * t/ccnoco-lib.sh: Likewise. * t/ccnoco-lt.sh: Likewise. * t/list-of-tests.mk: Add them. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* Merge branch 'micro' into maintStefano Lattarini2013-05-161-0/+0
|\ | | | | | | | | | | * micro: tests: remove exec bit from all of them ('micro' branch) maint: tests no longer need to have executable bit set
| * tests: remove exec bit from all of them ('micro' branch)Stefano Lattarini2013-05-161-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It gives the impression that they are directly runnable, as with "./t/foo.sh", but it has been a while since that was the case. Today, tests are runnable only through "make check" or "./runtest". This change is for the 'micro' branch (automake 1.13.2a). It will soon be followed by similar patches for the 'maint' branch (automake 1.13a) and the 'master' branch (automake 1.99a). * t/*.sh, t/*.tap: Remove executable bit. * maint.mk (sc_tests_executable): Remove. (syntax_check_rules): Adjust. * gen-testsuite-part: Set permissions of generated tests to '444' (-r--r--r--), rather than 555 (-r-xr-xr-x). Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | tests: remove most uses of the AM_PROG_CC_C_O obsolete macroStefano Lattarini2013-01-121-3/+1
| | | | | | | | | | | | | | | | | | Our NEWS file says its use will no longer be required in Automake 1.13, so better make sure that is actually the case. * Several tests: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | tests: can fake a compiler not grasping "-c -o" -- globally in all testsStefano Lattarini2013-01-111-19/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | The ability to easily do so will be quite important in upcoming changes about C compilation handling and semantics of the 'subdir-objects' option. Refer to the extensive discussion about automake bug#13378 for more details: <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378>. See also commit 'v1.13.1-34-g744cd57' of 2013-01-08, "coverage: compile rules used "-c -o" also with losing compilers". * t/ax/cc-no-c-o.in: New, a "C compiler" that chokes when the '-c' and '-o' options are passed together to it on the command line. * Makefile.am (t/ax/cc-no-c-o): Generate this script from it. (noinst_SCRIPTS, CLEANFILES): Add it. (EXTRA_DIST): Add 't/ax/cc-no-c-o.in'. (check-cc-no-c-o): New target, runs the whole testsuite with 'cc-no-c-o' as the C compiler (bot GNU and non-GNU). * .gitignore: Update. * t/ccnoco.sh: Use the new script instead of duplicating it. * t/ccnoco3.sh: Likewise. * t/ccnoco4.sh: Likewise. * t/self-check-cc-no-c-o.sh: New testsuite self-check. * t/list-of-tests.mk: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* maint: update copyright year for 2013 (in branch maint)Stefano Lattarini2012-12-311-1/+1
| | | | Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: remove obsolescent references to './defs'Stefano Lattarini2012-10-271-1/+2
| | | | | | | | | * t/distcom-subdir.sh, t/distcom2.sh, t/ax/depcomp.sh, t/conff2.sh, t/ccnoco3.sh, t/ccnoco.sh, t/self-check-dir.tap, t/self-check-exit.tap, t/self-check-me.tap: Here. Instead, refer to "am-test-lib.sh", "test-init.sh", or simply "the testsuite setup", as appropriate. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: prefer including 'test-init.sh' rather than './defs'Stefano Lattarini2012-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to today's commit v1.12.4-22-g0610fc8, "tests: prepare to move ./defs to t/ax/test-init.sh" * All tests: To run the common setup, use the command: . test-init.sh instead of the older, "historical" one: . ./defs || exit 1 Note that the "|| exit 1" wasn't really useful, since the 'errexit' shell flag is in effect in both './defs' and 'test-init.sh', and all the known shells that are good enough to run the automake testsuite do automatically exit with error when a sourced file cannot be found (at least, they do so in non-interactive mode, which is the only mode that concerns us in the testsuite). * t/ax/tap-summary-aux.sh, t/ax/testsuite-summary-checks.sh: Likewise. * gen-testsuite-part: Do the same in the generated tests. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: simpler workaround for shells losing the exit status in exit trapStefano Lattarini2012-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we can assume our tests are run by a decent POSIX shell, we can simplify our workaround aimed at having the exit status propagated correctly to the code in the exit trap. Unfortunately, we cannot dispense with such a workaround altogether, because it's still required by some shells we need to support (at least Solaris 10 /bin/ksh and /usr/xpg4/bin/sh). For more information about the need of that workaround, see the entry about 'trap' in the section "Limitations of Shell Builtins" in the Autoconf manual: <http://www.gnu.org/software/autoconf/manual/autoconf.html#trap> The new workaround has been tested successfully with the following shells: - Bash 4.1 - Bash 3.2 - Bash 3.0 - Bash 2.05b - dash 0.5.5.1 - dash 0.5.2 - AT&T Ksh 93u (from official Debian package) - MirBSD Korn Shell 40.2 (from official Debian package) - Solaris 9, 10 and 11 /bin/ksh - Solaris 9, 10 and 11 /usr/xpg4/bin/sh - NetBSD 5.1 /bin/sh - NetBSD 5.1 /bin/ksh * t/ax/test-init.sh (Exit): Rename ... (_am_exit): ... like this. (exit): New alias for '_am_exit'. We cannot simply redefine 'exit' as a shell function, because some shells (dash 0.5.5.1, Solaris 10 /bin/ksh and /usr/xpg4/bin/sh) do not allow it. (_am_exit, trap): Add extra escaping for 'exit' calls, to ensure we really invoke the 'exit' builtin and not our alias with the same name. * configure.ac: Check that the shell selected to run our testsuite supports aliases named like shell builtins. * t/REAMDE: Adjust. * All tests: Adjust, by simply using 'exit' instead of 'Exit'. * t/self-check-explicit-skips.sh: Adjust: the first usage of 'exit' after it has been redefined as an alias must be on a new line w.r.t. that where the alias is defined, in order for the redefinition to be honored. * syntax-checks.mk (sc_tests_Exit_not_exit): Delete. (sc_tests_exit_not_Exit): New. (syntax_check_rules): Adjust. (sc_tests_automake_fails): Simplify the recipe a little. * Several tests: Remove now useless spurious quoting once required to placate the 'sc_tests_Exit_not_exit' maintainer check. * gen-testsuite-part: Likewise. Also, avoid uses of 'Exit' in the generated scripts. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: use more POSIX shell features our test scriptsStefano Lattarini2012-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since commit 'v1.12-36-g2d68fd9' of 2012-05-07, "configure: search a sturdy POSIX shell to be used in the testsuite", the shell running our test script is assured to be a POSIX-conforming shell, so we can use the more modern and flexible idioms and features that we couldn't use when we also aimed at compatibility with non-POSIX Bourne shells, like Solaris /bin/sh. * t/README: Suggest to use POSIX shell features liberally in test cases, with possible exception of Makefile recipes and configure shell code. * Several tests: Adjust to use more POSIX shell features; e.g., $(...) rather than `...`, $((...)) rather than `expr ...`, "if ! CMD; then ..." instead of "if CMD; then :; else ...", and so on. In several places, when using the 'test' built-in, prefer '-eq' over '=' for numeric comparisons, and prefer "grep -c PATTERN FILE" over "grep PATTERN FILE | wc -l". Throw in other low-hanging easy improvements and fixlets while we are at it. * t/ax/depcomp.sh, t/ax/tap-summary-aux.sh, t/ax/tap-functions.sh, defs, defs-static.in: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: rename 'tests/' => 't/', '*.test' => '*.sh'Stefano Lattarini2012-04-061-0/+83
When we (soon) convert the Automake testsuite to a non-recursive make setup, we'll have to fix the entries of $(TESTS) to be prepended with the subdirectory they are in; this will increase the length of $(TESTS), and thus increase the possibility of exceeding the command-line length limits on some systems (most notably, MinGW/MSYS). See automake bug#7868 for more information. Thus we rename the 'tests/' subdirectory to 't/', and each 'x.test' script in there to 'x.sh'; this way, the $(TESTS) entry 'foo.test' will become 't/foo.sh', which have the same number of characters. * tests/: Rename ... * t/: ... to this. * t/*.test: Rename ... * t/*.sh: ... to this. * t/.gitignore: Removed as obsolete. * t/defs: Adjust. * t/gen-testsuite-part: Likewise. * t/list-of-tests.mk: Likewise. * t/ccnoco.sh: Likewise. * t/ccnoco3.sh: Likewise. * t/self-check-cleanup.tap: Likewise. * t/self-check-dir.tap: Likewise. * t/self-check-me.tap: Likewise. * t/self-check-reexec.tap: Likewise. * README: Likewise. * bootstrap: Likewise * configure.ac: Likewise. * Makefile.am: Likewise. * .gitignore: Likewise. * syntax-check.mk: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>