summaryrefslogtreecommitdiff
path: root/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
...
| | * docs: build the web manuals for CVS in the builddir, not in the srcdirStefano Lattarini2012-12-131-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can do so using the '-I' option of the gendocs.sh script. Inspired by the 'web-manual' rule in the 'top/maint.mk' file provided by gnulib (as of commit v0.0-7741-g4a8c422) as customized by Bison in its 'cfg.mk' file (as of commit v2.6.5-1007-gf5fceda). * Makefile.am (web-manuals): Modify and simplify to take advantage of gendocs.sh's '-I' option. (upload-we-manuals): Accordingly adjust sanity checks and the rsync invocation in the recipe. (clean_texinfo_clutter_cmd): Delete this variable, it's no longer required. (clean-texinfo-clutter): Delete this phony target, it's no longer required. (clean-local): Don't depend on it. * configure.ac: Invoke AC_PROG_LN_S, since we want to use $(LN_S) in the new 'web-manuals' recipe. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| | * release: automate uploading of web manuals in CVSStefano Lattarini2012-12-131-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is partly inspired to the 'gnu-web-doc-update' script from gnulib. Unfortunately, we can't use that script directly, because as of now it assumes a build system integrated with gnulib. * Makefile.am (upload-web-manuals): New .PHONY rule. (RSYNC, CVS, CVSU, CVS_USER, WEBCVS_ROOT): New variables, used by the new rule. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * | maint: more files excluded in 'update-copyright'Stefano Lattarini2012-12-131-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will avoid the following spurious warnings when "make update-copyright" is run: .autom4te.cfg: warning: copyright statement not found .git-log-fix: warning: copyright statement not found .gitattributes: warning: copyright statement not found .gitignore: warning: copyright statement not found AUTHORS: warning: copyright statement not found THANKS: warning: copyright statement not found contrib/README: warning: copyright statement not found contrib/multilib/README: warning: copyright statement not found doc/amhello/README: warning: copyright statement not found lib/install-sh: warning: copyright statement not found lib/mkinstalldirs: warning: copyright statement not found m4/acdir/README: warning: copyright statement not found t/README: warning: copyright statement not found * Makefile.am (files_without_copyright): New. (update-copyright): Use it when computing '$exclude_list'. Also, skip any README file. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * | maint: adapt 'update-copyright' recipe to the new $(FETCHFILES) formatStefano Lattarini2012-12-131-2/+4
| |/ | | | | | | | | | | | | | | | | This is a fixup for commit v1.12.5-27-g71ce1b4 of 2012-12-09, "fetch: improve, and reduce code duplication". * Makefile.am (update-copyright): Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'maint'Stefano Lattarini2012-12-091-49/+138
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * maint: docs: AM_CFLAGS: remove reference to non-existing "more detailed" desc maintcheck: prefer '$(am__cd)' over plain 'cd' fetch: improve, and reduce code duplication docs: add rule to generate manuals for www.gnu.org docs: copy the 'gendocs.sh' script from Texinfo CVS repository sync: update files from upstream with "make fetch" release: generate a stub for the release announcement release: distinguish major and minor releases tests: avoid two spurious failures on FreeBSD
| * maintcheck: prefer '$(am__cd)' over plain 'cd'Stefano Lattarini2012-12-091-3/+3
| | | | | | | | | | | | | | | | | | In a couple of rules in out own build system, as suggested by the maintainer check 'sc_cd_relative_dir'. * Makefile.am (web-manuals, clean_texinfo_clutter_cmd): Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * fetch: improve, and reduce code duplicationStefano Lattarini2012-12-091-46/+38
| | | | | | | | | | | | | | | | | | | | * Makefile.am (WGET_SV_CVS, WGET_SV_GIT_CF, WGET_SV_GIT_AC, WGET_SV_GIT_GL): Delete. (SV_CVS, SV_GIT_CF, SV_GIT_AC, SV_GIT_GL): New. (fetch): Simplify and enhance. (update-copyright): Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * docs: add rule to generate manuals for www.gnu.orgStefano Lattarini2012-12-091-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Less clerical work to do by hand. * Makefile.am (web-manuals): New rule. (clean_texinfo_clutter): New macro. * clean-web-manuals, clean-texinfo-clutter: New cleaning rules. (clean-local): Depend on them. * .gitignore: Update. * HACKING: Adjust instructions for generation of manuals. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * docs: copy the 'gendocs.sh' script from Texinfo CVS repositoryStefano Lattarini2012-12-081-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | As well as the 'gendocs_template' file. And enhance the "make fetch" target to keep them synced. It's better than having to fetch these files by hand each time a release is to be made. * Makefile.am (FETCHFILES): List 'gendocs.sh' and 'gendocs_template'. (fetch): Fetch them, into 'lib/'. (EXRA_DIST): Distribute them. * HACKING: Adjust instructions for generation of manuals. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * release: generate a stub for the release announcementStefano Lattarini2012-12-081-5/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's much better than having to write it my hand each time; after all, most of it is either boilerplate or a cope of NEWS entries. * Makefile.am (determine_release_type): Also set the shell variable '$announcement_type' appropriately. (print-release-type): Print the value of this new variable as well. (announcement): New phony target, generate a files with the same name. The recipe uses the shell variable '$announcement_type'. (CLEANFILES): Clean it. (PACKAGE_MAILINGLIST): New make macro, used when generating the 'announcement' file. * HACKING: Explain how to take advantage of the new convenience target. * .gitignore: Ignore the 'announcement' file. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * release: distinguish major and minor releasesStefano Lattarini2012-12-081-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly a preparatory change, in view of future improvements in our release process. * Makefile.am (determine_release_type): Also distinguish between major and minor releases, with the help of ... (stable_major_version_rx, stable_minor_version_rx): ... these new macros. (stable_version_rx): Remove, it's obsolete now. (version_rx): Rename ... (base_version_rx): ... like this, and adjust. (print-release-type): New target; helps in debugging the code that determines the release type. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | fixup: Automake installation works againStefano Lattarini2012-11-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By renaming 'dist_automake_ac_DATA' to 'nobase_dist_automake_ac_DATA' in a recent patch, we have broken the Automake installation, since m4 files that were expected to be installed in '${prefix}/aclocal-${APIVERSION}' are now being installed in '${prefix}/aclocal-${APIVERSION}/m4' instead. Fix this mess. * Makefile.am (nobase_dist_automake_ac_DATA): Rename ... (dist_automake_ac_DATA): ... like this. And move 'm4/internal/ac-config-macro-dirs.m4' ... (dist_automake_internal_ac_DATA): ... here. (automake_internal_acdir): New, simply defined to '$(automake_acdir)/internal'. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | aclocal: AC_CONFIG_MACRO_DIRS: work around autom4te option parsing bugsStefano Lattarini2012-11-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autom4te program coming with autoconf 2.68 and earlier had a bug which caused the "-" command line argument (with which we tell it to read some input from from standard input) to aways be pushed at the *end* of the command line, regardless of where the user specified it (that bug was fixed by autoconf commit 'v2.68-120-gf4be358', "getopt: new Autom4te::Getopt module"). This broken semantics conflict with our usage in aclocal, where we need to pass some input to the invoked autom4te program early, and have so far been using the stdin to do so. Now we start using an external file instead. * m4/internal/ac-config-macro-dirs.m4: New file, contain a fallback definition of the AC_CONFIG_MACRO_DIRS macro for older autoconf releases. * aclocal.in (trace_used_macros): When invoking autom4te, use that file instead of "abusing" standard input. * Makefile.am (dist_automake_ac_DATA): Rename ... (nobase_dist_automake_ac_DATA): ... like this. Add 'm4/internal/ac-config-macro-dirs.m4' to it. * t/aclocal-acdir.sh: Adjust to avoid spurious failures. Helped-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'maint'Stefano Lattarini2012-10-311-1/+25
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: vala tests: source test-init.sh, not ./defs tests: fix a spurious typo-related failure tests: remove spurious leftover use of 'Exit' tests: can check our recipes avoid trailing backslashes vala: improve comments to AM_PROG_VALAC news: update w.r.t. recent vala changes vala: if no proper compiler found, set $(VALAC) to 'valac' vala: AM_PROG_VALAC should not produce an error for tool-old valac docs: document recent changes to AM_PROG_VALAC tests: enhance tests on AM_PROG_VALAC vala: style fixes in vala.m4 vala: add action arguments, for when no proper vala compiler is found Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * tests: can check our recipes avoid trailing backslashesStefano Lattarini2012-10-311-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is related to commit v1.11-1704-g254227b of 2012-05-01, "parallel-tests: avoid trailing backslashes in make recipes", and automake bug#10436. Recipes with a trailing backslash character (possibly followed by blank characters only) can cause spurious syntax errors with at least older bash versions (e.g., bash 2.05b), and can be potentially be unportable to other weaker shells. So provide a target that runs the testsuite looking for this kind of breakage (without requiring a real bugged shell). * t/ax/shell-no-trail-bslash.in: New, a "shell" that chokes on '-c' commands having a trailing '\' (possibly followed by whitespace only). * Makefile (t/ax/shell-no-trail-bslash): Generate this script from it. (noinst_SCRIPTS, CLEANFILES): Add it. (EXTRA_DIST): Add 't/ax/shell-no-trail-bslash.in'. (check-no-trailing-backslash-in-recipes): New target, runs the testsuite with 'shell-no-trail-bslash' as the CONFIG_SHELL, to catch possible recipes having a trailing backslash character (possibly followed by * .gitignore: Update. * t/self-check-shell-no-trail-bslash.sh: New testsuite self-check. * t/parallel-tests-trailing-bslash.sh: Remove as obsolete. * t/list-of-tests.mk: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'maint'Stefano Lattarini2012-10-271-0/+1
|\ \ | |/ | | | | | | * maint: tests: prepare to move ./defs to t/ax/test-init.sh
| * tests: prepare to move ./defs to t/ax/test-init.shStefano Lattarini2012-10-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't do this in a sweeping passage, because that would cause endless headaches in the synchronization between the maint, master and ng/master branches. Instead, we setup our framework to allow test scripts to work by sourcing either './defs' or 'test-init.sh', so that we'll be able to make the transition gradual and painless. * t/ax/test-init.sh: New, copied from the previous ./defs file. * defs: Simply work by sourcing the new file. * Makefile.am (dist_noinst_DATA): List the new file. * t/README: Adjust to mandate the sourcing of 'test-init.sh' rather than of './defs'. * t/c-demo.sh: Source 'test-init.sh' instead of ./defs. This is done to verify our new setup actually works. * t/ac-output-old.tap: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | compat: reinstate AM_PROG_MKDIR_P, for gettextJim Meyering2012-10-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not remove AM_PROG_MKDIR_P just yet. gettext (latest from git) still AC_REQUIRE's AM_PROG_MKDIR_P via its intl.m4 and po.m4 files, which are pulled into *many* projects. When I try to build one of those projects (coreutils) using the latest from automake.git/master, I see this failure: $ aclocal -I m4 configure.ac:477: warning: AM_PROG_MKDIR_P is m4_require'd \ but not m4_defun'd m4/po.m4:23: AM_PO_SUBDIRS is expanded from... m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from... configure.ac:477: the top level That is because AM_PROG_MKDIR_P was removed (via commit v1.12-20-g8a1c64f) in preparation for the next release of automake. * NEWS: Remove the paragraph that announced the removal of AM_PROG_MKDIR_P. * Makefile.am (dist_automake_ac_DATA): Add m4/mkdirp.m4. * m4/mkdirp.m4: Re-add file. * t/mkdirp-deprecation.sh: Likewise. * t/list-of-tests.mk: Add it. * automake.in: Restore removed code, and adjust comments, s/1.13/1.14/ to reflect new plan for removal. * doc/automake.texi (Obsolete Macros): Restore the section, but now with only one entry: the one for AM_PROG_MKDIR_P.
* | Merge branch 'elisp-work'Stefano Lattarini2012-08-051-1/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * elisp-work: news: document all the recent elisp-related changes and improvements coverage: byte-compiling elisp files in different subdirectories elisp: honour AM_ELCFLAFS and ELCFLAGS in byte-compilation elisp: --batch implies -q, remove -q elisp: support elisp files in subdirectories properly elisp: simplify suffix rules using emacs '-L' option elisp: no need to "absolutize" $(srcdir) and $(builddir) ... elisp: prefer $(builddir) files over $(srcdir) ones elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite) coverage: elisp path contains $(srcdir) and $(builddir) coverage: emacs lisp files in subdirectories
| * | elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)Jack Kelly2012-07-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivated by automake bug#11806. Traditionally, automake byte-compiled emacs-lisp '.el' files by invoking 'elisp-comp' on all of them in a bulk; this involved complex timestamping and file-locking logic. It was also brittle in any slightly-unusual setup, because 'elisp-comp' operated by copying all of the elisp files to be compiled into a temporary sub-directory and compiling them in there, the copying the resulting byte-compile files back in the build directory. This patch removes all of that juggling and chicanery in favour of defining a much simpler '.el.elc' suffix rule. Not only this is simpler, but it also interacts better with "make -jN" calls, which are becoming more and more common and useful on today's increasingly multicore systems. * Makefile.am (dist_script_DATA): Remove 'elisp-comp'. * automake.in (@common_files): Likewise. (handle_emacs_lisp): Do not require 'elisp-comp'. * doc/automake.texi: Remove references to 'elisp-comp'. * lib/am/lisp.am: Define elisp compilation via a suffix rule; this basically amounts to a complete re-write of the lisp byte-compilation rules. * lib/elisp-comp: Remove. * t/add-missing.tap: Remove elisp-comp test. * t/dist-auxdir-many-subdirs.sh: Remove reference to elisp-comp. * t/primary-prefix-invalid-couples.tap: Likewise. * t/primary-prefix-valid-couples.sh: Likewise. * t/lisp4.sh: Remove reference to elc-stamp. * t/lisp5.sh: Likewise. * t/lisp6.sh: Likewise. * t/lisp3.sh: Likewise. Also remove the recompilation check that involves a (message) call. * t/lisp7.sh: Remove check for "Warnings can be ignored". Remove reference to elc-stamp. * t/lisp8.sh: Likewise. * t/lispdry.sh: Remove references to elc-stamp. Acked-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | | Merge branch 'maint'Stefano Lattarini2012-07-301-0/+1
|\ \ \ | | |/ | |/| | | | | | | | | | * maint: build: fix build in VPATH setup gen-tests: simplify sourcing of helper shell files
| * | build: fix build in VPATH setupStefano Lattarini2012-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (t/ax/test-defs.sh): Ensure the 't/ax' directory exists, before trying to create 'test-defs.sh' in there. This is required in VPATH builds. Reported-by: Akim Demaille <akim@lrde.epita.fr> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | | typofix: in a comment in Makefile.amStefano Lattarini2012-07-261-1/+1
| | | | | | | | | | | | Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | | Merge branch 'maint'Stefano Lattarini2012-07-261-14/+44
|\ \ \ | |/ / | | / | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: (38 commits) maintcheck: fixup list of files in $(xdefs) tests: never source test-defs.sh directly, source test-lib.sh instead runtest: sanitize test environment tests: remove an obsolescent self test tests: "am_using_tap=yes" -> "am_test_protocol=tap" tests: protect test libs against multiple inclusion configure: testsuite shell can return early from "dot-sourced" files tests: move sanitization and "Bournification" in the generic test lib tests: source test defs in the generic test lib test defs: no need to re-add $srcdir/t/ax to $PATH tests: split test libs into "generic" and "automake-specific" test setup: move actual calling of testsuite setup in ./defs test setup: merge definitions of function for simple tests test init: refactor: new function 'am_test_setup' test init: refactor: move displaying of debugging info later test init: refactor: new function 'am_setup_testdir' test init: refactor: new function 'am_set_exit_traps' configure: testsuite shell set exit traps in shell functions test init: refactor: new function 'am_exit_trap' test init: refactor: new function 'process_requirements' ... Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * runtest: sanitize test environmentStefano Lattarini2012-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * runtest.in: Here, similarly to what is done by AM_TESTS_ENVIRONMENT in Makefile.am, unset variables that should be under the complete control of the test framework, and that could create havoc if inherited from the environment. This remove the need to check against possible environment "pollution" ... * t/ax/test-defs.in: ... in here. * Makefile.am (AM_TESTS_ENVIRONMENT): Add a comment about the need of synchronization with 'runtest.in'. * t/self-check-env-sanitize.tap: Remove as obsolete. * t/list-of-tests.mk: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * tests: "am_using_tap=yes" -> "am_test_protocol=tap"Stefano Lattarini2012-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And similarly, "am_using_tap=no" -> "am_test_protocol=none". The new '$am_test_protocol' name is clearer, and will allow the easy addition of further test protocols in the future. This is not truly relevant for automake, but we are trying to make some parts of our testsuite framework as general as possible, in view of a future move to a more generic project like Gnulib. * Makefile.am, t/ax/am-test-lib.sh, t/ax/test-defs.in, t/ax/test-lib.sh, t/self-check-env-sanitize.tap, t/self-check-tap.sh: Adjust. * syntax-checks.mk (sc_tests_obsolete_variables): Add 'am_using_tap' to the list of obsolete variables to check against. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * tests: protect test libs against multiple inclusionStefano Lattarini2012-07-261-0/+2
| | | | | | | | | | | | | | | | | | | | * t/ax/test-lib.sh, t/ax/am-test-lib.sh: Return early if already sourced. Use the witness variables '$test_lib_sourced' and '$am_test_lib_sourced', respectively, for this purpose. * runtest.in, Makefile.am (AM_TESTS_ENVIRONMENT): Unset 'test_lib_sourced' and 'am_test_lib_sourced', to avoid interferences from the environment. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * tests: split test libs into "generic" and "automake-specific"Stefano Lattarini2012-07-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the first step in the quest to merge the generically useful parts of our test suite framework in a more generic project, like Gnulib. Time will tell if we'll succeed, and whether the success will be worth the extra hassle. * t/ax/test-init.sh: Split out ... * t/ax/am-test-lib.sh, t/ax/test-lib.sh: ... into these two tests. * defs, Makefile.am: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * test setup: merge definitions of function for simple testsStefano Lattarini2012-07-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * t/ax/plain-functions.sh: Delete, moving the definitions of ... ($stderr_fileno_): ... this variable ... (warn_, fail_, skip_, skip_all_, fatal_, framework_failure_): ... and these functions ... * t/ax/test-init.sh: ... in here. This allow us to use those functions earlier in this file (instead of having to duplicate their behaviour with inlined code). The TAP-based tests are still able to override these functions later to their TAP-enhanced equivalents when 'tap-functions.sh' is sourced. * Makefile.am (dist_noinst_DATA): Remove 't/ax/plain-functions.sh'. * t/ax/tap-functions.sh: Adjust a comment. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * test defs: move in 't/ax/test-defs.sh'Stefano Lattarini2012-07-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can do so with minimal churn, now that the early setup of $PATH in both 'runtest' and AM_TESTS_ENVIRONMENT allow the '.' built-in to find to-be-sourced shell scripts in 't/ax' automatically, both in in-tree and VPATH builds. With this change, we take another step forward a more rational and "segregated" organization of our testsuite framework. * defs-static.in: Rename ... * t/ax/test-defs.in: ... like this, and adjust. * Makefile.am, syntax-checks.mk, t/README, gen-testsuite-part, t/tests-init.sh, t/ax/tap-setup.sh, t/tap-summary.sh, .gitignore, t/testsuite-summary-color.sh, t/testsuite-summary-count.sh, t/self-check-tap.sh, defs: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * tests: update PATH early from AM_TESTS_ENVIRONMENT and runtestStefano Lattarini2012-07-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because the POSIX standards mandate that sourcing a file with ". FILE" will cause FILE (assuming it is a relative containing no slashes) to be looked for in PATH, such a move will allow us to simplify our sourcing of shell testing libraries like (currently) 't/ax/test-init.sh' and 'defs', and to modularize and re-organize them better in the feature, with minimal churn. * runtest.in, Makefile.am (AM_TEST_ENVIRONMENT): Prepend $(abs_srcdir)/t/ax and $(abs_builddir)/t/ax (in that order) to PATH; do so avoiding repetition in the common case of non-VPATH builds. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * build: auxiliary testsuite files/scripts built by "make all"Stefano Lattarini2012-07-261-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow the developers to run a tests case by hand out of a newly extracted tarball simply doing: $ ./configure && make $ ./runtest t/the-test-case.sh while before this change one has to resort to: $ ./configure && make && make check TESTS= $ ./runtest t/the-test-case.sh or, with some non-GNU makes, even: $ ./configure && make && make check TESTS= AM_MAKEFLAGS="TESTS=" $ ./runtest t/the-test-case.sh This come very handy sometimes, especially when doing one-shot debugging. Admittedly not a big deal, but one less friction in the build system is always nice. * Makefile.am (check_SCRIPTS, dist_check_DATA, nodist_check_DATA): Move their content to ... (noinst_SCRIPTS, dist_noinst_DATA, nodist_noinst_DATA): ... these variables. Adjust comments. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * perf tests: reorganizeStefano Lattarini2012-07-261-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * t/list-of-tests.mk (handwritten_TESTS): Don't list ($perf_TESTS) in here anymore. * Makefile.am (EXTRA_DIST): Add them explicitly. (perf): New target, run the performance tests and save the logs of the ones with unexpected results in the file 't/perf/test-suite.log', which is thus ... (PERF_TEST_SUITE_LOG): ... defined in this variable ... (CLEANFILES): ... and added to this. (test_subdirs): Remove 't/perf': the tests in there are no more listed in $(TESTS). * t/ax/test-init.sh: Don't explicitly skip "perf" test here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'maint'Stefano Lattarini2012-07-131-0/+35
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * maint: news: mention fixed testsuite weaknesses news: bump, for future 1.12.3 tests: verify the shell test scripts are syntactically valid tests: don't use C instead of C++ compiler on case-insensitive platforms tests: avoid spurious TAP errors on Mac OS X 10.7 tests: fix spurious failure in aclocal7.sh on fast machines Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * tests: verify the shell test scripts are syntactically validStefano Lattarini2012-07-131-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes automake bug#11898. This measure of extra safety is mostly motivated by the fact that some shells (at least some versions of Bash in the 3.x release series, one of which serves as /bin/sh on Mac OS X 10.7, as well as Bash 4.0 and the /usr/xpg4/bin/sh shell from Solaris 10) erroneously exit with exit status 0 upon encountering a syntax error, if an exit trap is sett (as it is in our test scripts). * Makefile.am (check-tests-syntax): New, check that the shell test scripts listed in $(TESTS) are syntactically correct. (.PHONY, check-local): Depend on it. * t/self-check-exit.tap : Remove checks verifying that a script exits with non-zero status upon encountering a syntax error; as explained above, we can't depend on that. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'maint'Stefano Lattarini2012-07-071-6/+6
|\ \ | |/ | | | | | | * maint: tests: move 'runtest' into the top-level directory
| * tests: move 'runtest' into the top-level directoryStefano Lattarini2012-07-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move our wrapper script 'runtest' (meant to allow the execution of Automake test cases from the command line) from the 't/ax/' directory to the top-level one. This makes the script easier to find and to invoke. Much more importantly, our DejaGNU-checking test cases won't try anymore to use that script instead of the 'runtest' program provided by DejaGNU (that happened because '$(srcdir)/t/ax/' is automatically added early to the $PATH variable in our test cases), which was causing spurious SKIPs. * t/ax/runtest.in: Move ... * runtest.in: ... here. * Makefile.am, t/README, .gitignore: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'maint'Stefano Lattarini2012-07-071-5/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: cosmetics: rename t/ax/test-runner => t/ax/runtest fixup: another "make recheck" failure with BSD make test runner: work correctly in VPATH setups compat: automake should define $(mkdir_p), for backward compatibility coverage: test that AM_PROG_MKDIR_P and $(mkdir_p) still works tests init: don't automatically re-execute tests with a POSIX shell yacc tests: fix spurious failure with parallel make tests: ignore minor 'recheck' regression for BSD make tests: don't clutter the top-level dir with temporary test directories tests: avoid spurious failures when @MKDIR_P@ points to "install-sh -d" lisp: better support of VPATH builds news: fixlets and updates + Extra non-trivial edits: * NEWS: State that $(mkdir_p) is still provided as an alias to $(MKDIR_P), for (partial) backward-compatibility. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * cosmetics: rename t/ax/test-runner => t/ax/runtestStefano Lattarini2012-07-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | The latter is shorter and clearer. Better to do the rename early, before other developers or contributors begin to get used to the 'test-runner' name. * t/ax/test-runner.in: Rename ... * t/ax/runtest.in: ... like this. * Makefile.am, t/README, .gitignore: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * test runner: work correctly in VPATH setupsStefano Lattarini2012-07-061-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a "feature" of AC_CONFIG_FILES, because 't/ax/test-runner.in' is in a subdirectory, the '@srcdir@' value that is AC_SUBST'd in it gets tweaked to contain as much '..' components as are the directory components of 't/ax/test-runner'. Because our build system operates in a non-recursive setup, this substitution is wrong; for example, the final 't/ax/test-runner' build in a VPATH builds where the source directory is ".." contains the line: : ${srcdir='../../../t/ax'} instead of the expected (and correct): : ${srcdir='../t/ax'} We solve the issue by building 't/ax/test-runner' with a Makefile recipe instead of config.status substitutions; this is already done for other testsuite-related files, like 'defs-static'. * configure.ac (AC_CONFIG_FILES): Don't build 't/ax/test-runner' anymore. * Makefile.am (t/ax/test-runner): New rule. (EXTRA_DIST): Add 't/ax/test-runner.in'. (CLEANFILES, noinst_SCRIPTS): Add 't/ax/test-runner'. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * tests init: don't automatically re-execute tests with a POSIX shellStefano Lattarini2012-07-061-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've unwittingly broken support for that feature *again* in some of my recent testsuite tweaking. In this case, the re-execution code works correctly when the tests are executed with a POSIX shells, but breaks when they are invoked by an old-style Bourne shells (e.g., /bin/sh on Solaris). It's time to face it: that feature is too much brittle, and too seldom used (because the Makefile takes care of running the tests with the correct shell anyway, so that a breakage is only experienced when running the tests by hand). It just don't remain working for long, not when we often touch the testsuite setup (which we are going to do again when we'll try to move part of our testsuite framework to Gnulib, or a similar project). So, instead of trying to be extra-smart and automatically re-execute the tests with the correct shell, we now offer a simple wrapper script that the user can employ to run the test scripts with the proper shell. And while we are at it, we write this wrapper to also deal with TAP tests in a better way, running them through the prove(1) utility, so that their results are correctly recognized and reported. * t/ax/test-runner.in: New file; the wrapper script we were talking about. * configure.ac (AC_CONFIG_FILES): Process it into 't/ax/test-runner'. * .gitignore: Add 't/ax/test-runner'. * defs: Remove code for automatic re-execution of the scripts with the correct shell. This file now just a very thin layer around 'defs-static' and 't/ax/test-init.sh'. * t/README: Adjust, and remove or fix some imprecise or outdated text in the process (like "... test scripts are written with portability in mind, so that they should run with any decent Bourne-compatible shell ..." ). * Makefile.am (AM_TESTS_ENVIRONMENT): No need to export 'AM_TESTS_REEXEC' to "no" anymore. * t/self-check-explicit-skips.sh: Likewise. * t/self-check-exit.tap: Likewise. * t/self-check-me.tap: Likewise. * t/self-check-dir.tap: Likewise. * t/self-check-reexec.tap: Remove as obsolete. * t/list-of-tests.mk: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | maintcheck: fix spurious failure in 'maintainer-check-list-of-tests'Stefano Lattarini2012-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (test_subdirs): Add 'contrib/t', otherwise we would get a spurious error like: List of tests in Makefile an on filesystem differ + diff -u in-makefile on-filesystem --- tests-in-makefile-list.tmp 2012-07-03 23:07:47.000000000 +0200 +++ tests-on-filesystem-list.tmp 2012-07-03 23:07:47.000000000 +0200 @@ -1,7 +1,3 @@ -contrib/t/help-multilib.sh -contrib/t/multilib.sh -contrib/t/parallel-tests-html-recursive.sh -contrib/t/parallel-tests-html.sh t/ac-output-old.tap t/acloca10.sh t/acloca11.sh make: *** [maintainer-check-list-of-tests] Error 1 Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | build: fix cleaning of test directories in contrib (and in t/perf)Stefano Lattarini2012-07-031-7/+10
| | | | | | | | | | | | | | | | | | * Makefile.am (clean-local-check): Update recipe to cater to the fact that some tests using a temporary directory have been placed in other directories that the 't/' directory (for the moment, at least 't/perf' and 'contrib/t'). Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | tests: tests for stuff in contrib goes in 'contrib/t'Stefano Lattarini2012-07-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * t/help-multilib.sh: Move ... * contrib/t/help-multilib.sh: .. here. Remove a now-obsolete "FIXME" comment. * t/multlib.sh: Move ... * contrib/t/multilib.sh: .. here. Remove a now-obsolete "FIXME" comment. * t/parallel-test2.sh: Move ... * contrib/t/parallel-tests-html.sh: .. here. Remove a now-obsolete "FIXME" comment. * contrib/t/local.am: New, basically defining the list of tests for stuff in 'contrib/'. * t/list-of-tests.mk, Makefile.am: Adjust. * .gitignore: Update. * syntax-checks.mk (xtests): Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'user-recursive-targets'Stefano Lattarini2012-07-021-0/+1
|\ \ | | | | | | | | | | | | | | | | | | * user-recursive-targets: recursion: support user-defined recursive targets tests: rename 'recurs*.sh' to 'var-recurs*.sh' tests: minor improvements to 'recurs*.sh'
| * | recursion: support user-defined recursive targetsStefano Lattarini2012-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The user can now define his own recursive targets that recurse in the directories specified in $(SUBDIRS). That can be done by specifying the name of such targets in invocations of the new 'AM_EXTRA_RECURSIVE_TARGETS' m4 macro. The API goes like this: $ cat configure.ac AC_INIT([pkg-name], [1.0] AM_INIT_AUTOMAKE AM_EXTRA_RECURSIVE_TARGETS([foo]) AC_CONFIG_FILES([Makefile sub/Makefile]) AC_OUTPUT $ cat Makefile.am SUBDIRS = sub foo-local: @echo This will be run by "make foo". $ cat sub/Makefile.am foo-local: @echo This too will be run by a "make foo" issued either in @echo the 'sub/' directory or in the top-level directory. Like for the "default" recursive targets (e.g., 'all' and 'check'), the user-defined recursive targets descend in the $(SUBDIRS) in a depth-first fashion, and process '.' last (unless that is explicitly specified in $(SUBDIRS)). * NEWS, doc/automake.texi: Document the new feature. * automake.in (@extra_recursive_targets): New global variable. (scan_autoconf_traces): Trace macro '_AM_EXTRA_RECURSIVE_TARGETS'. (handle_user_recursion): New subroutine; among other things, it defines the new internal '$(am__extra_recursive_targets)' make variable, and the '*-am', '*-local' and '*-recursive' targets associated with the user-specified user recursive targets. (generate_makefile): Call the new subroutine. * lib/am/subdirs.am (am__recursive_targets): New internal make variable, listing all of '$(RECURSIVE_TARGETS)', '$(RECURSIVE_CLEAN_TARGETS)' and '$(am__extra_recursive_targets)' together. (AM_RECURSIVE_TARGETS): Adjust the definition of this variable ... (.PHONY, .MAKE): ... and the list of dependencies of these special targets to take advantage of the new '$(am__recursive_targets)' variable. ($(am__recursive_targets)): New targets, superseding ... ($(RECURSIVE_TARGETS), $(RECURSIVE_CLEAN_TARGETS)): ... these, and inheriting their rules. This way, the rules to handle recursion for built-in recursive targets (e.g., 'all', 'dvi', 'clean') and for user defined recursive targets are the same. * m4/extra-recurs.m4: New file, contain definition of new macro 'AM_EXTRA_RECURSIVE_TARGETS' and '_AM_EXTRA_RECURSIVE_TARGETS'. These macros are basically dummy, only used for tracing by automake. * m4/Makefile.am (dist_automake_ac_DATA): Update. * t/recurs-user.sh: New test. * t/recurs-user2.sh: Likewise. * t/recurs-user-deeply-nested.sh: Likewise. * t/recurs-user-indir.sh: Likewise. * t/recurs-user-keep-going.sh: Likewise. * t/recurs-user-many.sh: Likewise. * t/recurs-user-no-subdirs.sh: Likewise. * t/recurs-user-no-top-level.sh: Likewise. * t/recurs-user-override.sh: Likewise. * t/recurs-user-phony.sh: Likewise. * t/recurs-user-wrap.sh: Likewise. * t/remake-recurs-user.sh: Likewise. * t/list-of-tests.mk: Update. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | | Merge branch 'maint'Stefano Lattarini2012-07-011-5/+0
|\ \ \ | |/ / |/| / | |/ | | | | | | * maint: parallel-tests: silence an overly verbose recipe tests: fix some uses of 'Exit', where 'exit' should now be used instead maintcheck: test scripts should be executable, check for that
| * maintcheck: test scripts should be executable, check for thatStefano Lattarini2012-06-301-5/+0
| | | | | | | | | | | | | | | | | | * syntax-checks.mk (sc_tests_executable): Here, in this new check. (syntax_check_rules): Add it. * Makefile.am (dist-hook): Drop, no need to make test cases executable anymore. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'maint'Stefano Lattarini2012-06-281-1/+0
|\ \ | |/ | | | | | | | | | | | | * maint: tests init: don't bother allowing '$me' to be overridable tests init: typofixes in comments Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * tests init: don't bother allowing '$me' to be overridableStefano Lattarini2012-06-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We once used that feature in our wrapper tests; but now (and probably even since commit 'v1.11-1308-g375f23d' of 2011-09-08, "testsuite: revamp generation of autogenerated tests") it is not needed anymore. By removing it we can simplify our growingly complex testsuite framework a little. * t/ax/test-inist.sh ($me): Do not initialize it here (and only if not already set), instead ... * defs-static.in ($me): ... initialize it here unconditionally. Do not check anymore that $me doesn't come from the environment: that wouldn't cause any problem now. Now that '$me' is defined early, prefer it over 'argv0' in early error messages, both here ... * defs: ... and here. * Makefile.am (AM_TESTS_ENVIRONMENT): Do not bother "nullifying" $me anymore. * t/self-check-env-sanitize.tap: Adjust. * t/self-check-me.tap: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>