From: Stefano Lattarini Date: Sun, 5 Aug 2012 09:06:16 +0000 (+0200) Subject: Merge branch 'elisp-work' X-Git-Tag: v1.12b~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e472de16e7cc0f10d2dc339f4308eb3ceadf55d;hp=-c;p=platform%2Fupstream%2Fautomake.git Merge branch 'elisp-work' * 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 --- 3e472de16e7cc0f10d2dc339f4308eb3ceadf55d diff --combined Makefile.am index 6ff7e71,26a04a1..e629787 --- a/Makefile.am +++ b/Makefile.am @@@ -135,7 -135,6 +135,6 @@@ dist_script_DATA = lib/mdate-sh \ lib/missing \ lib/mkinstalldirs \ - lib/elisp-comp \ lib/ylwrap \ lib/depcomp \ lib/compile \ @@@ -329,17 -328,14 +328,17 @@@ TESTS = ## Will be updated later # Some testsuite-influential variables should be overridable from the # test scripts, but not from the environment. +# Keep this in sync with the similar list in 'runtest.in'. AM_TESTS_ENVIRONMENT = \ for v in \ required \ - am_using_tap \ + am_test_protocol \ am_serial_tests \ am_test_prefer_config_shell \ am_original_AUTOMAKE \ am_original_ACLOCAL \ + am_test_lib_sourced \ + test_lib_sourced \ ; do \ eval test x"\$${$$v}" = x || unset $$v; \ done; @@@ -348,16 -344,6 +347,16 @@@ AM_TESTS_FD_REDIRECT = 9>&2 AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_; +# For sourcing of extra "shell libraries" by our test scripts. As per +# POSIX, sourcing a file with '.' will cause it to be looked up in $PATH +# in case it is given with a relative name containing no slashes. +AM_TESTS_ENVIRONMENT += \ + if test $(srcdir) != .; then \ + PATH='$(abs_srcdir)/t/ax'$(PATH_SEPARATOR)$$PATH; \ + fi; \ + PATH='$(abs_builddir)/t/ax'$(PATH_SEPARATOR)$$PATH; \ + export PATH; + # Hand-written tests. include $(srcdir)/t/list-of-tests.mk @@@ -392,35 -378,26 +391,35 @@@ include $(srcdir)/contrib/t/local.a TESTS += $(contrib_TESTS) EXTRA_DIST += $(contrib_TESTS) -# Static dependencies valid for each test case. -check_SCRIPTS = t/wrap/aclocal-$(APIVERSION) t/wrap/automake-$(APIVERSION) -dist_check_DATA = \ - t/ax/test-init.sh \ - t/ax/plain-functions.sh \ +# Static dependencies valid for each test case (also further +# extended later). Note that use 'noinst_' rather than 'check_' +# as the prefix, because we really want them to be built by +# "make all". This makes it easier to run the test cases by +# hand after having simply configured and built the package. + +nodist_noinst_SCRIPTS = \ + t/wrap/aclocal-$(APIVERSION) \ + t/wrap/automake-$(APIVERSION) + +dist_noinst_DATA = \ + t/ax/test-lib.sh \ + t/ax/am-test-lib.sh \ t/ax/tap-functions.sh -nodist_check_DATA = defs-static # Few more static dependencies. t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am t/distcheck-outdated-m4.log: t/ax/distcheck-hook-m4.am EXTRA_DIST += t/ax/distcheck-hook-m4.am -defs-static: defs-static.in Makefile +t/ax/test-defs.sh: t/ax/test-defs.in Makefile $(AM_V_at)rm -f $@ $@-t - $(AM_V_GEN)in=defs-static.in\ - && $(do_subst) <$(srcdir)/defs-static.in >$@-t + $(AM_V_at)$(MKDIR_P) t/ax + $(AM_V_GEN)in=t/ax/test-defs.in \ + && $(do_subst) <$(srcdir)/$$in >$@-t $(generated_file_finalize) -EXTRA_DIST += defs-static.in -CLEANFILES += defs-static +EXTRA_DIST += t/ax/test-defs.in +CLEANFILES += t/ax/test-defs.sh +nodist_noinst_DATA = t/ax/test-defs.sh runtest: runtest.in Makefile $(AM_V_at)rm -f $@ $@-t @@@ -484,7 -461,7 +483,7 @@@ check-local: check-tests-synta .PHONY: check-tests-syntax ## Checking the list of tests. -test_subdirs = t t/pm t/perf contrib/t +test_subdirs = t t/pm contrib/t include $(srcdir)/t/CheckListOfTests.am # Run the testsuite with the installed aclocal and automake. @@@ -492,19 -469,10 +491,19 @@@ installcheck-local: installcheck-testsu installcheck-testsuite: am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check +# Performance tests. +.PHONY: perf +perf: all + $(MAKE) $(AM_MAKEFLAGS) TEST_SUITE_LOG='$(PERF_TEST_SUITE_LOG)' \ + TESTS='$(perf_TESTS)' check +PERF_TEST_SUITE_LOG = t/perf/test-suite.log +CLEANFILES += $(PERF_TEST_SUITE_LOG) +EXTRA_DIST += $(perf_TESTS) + clean-local: clean-local-check .PHONY: clean-local-check clean-local-check: -## Directries candidate to be test directories match this wildcard. +## Directories candidate to be test directories match this wildcard. @globs='t/*.dir t/*/*.dir */t/*.dir */t/*/*.dir'; \ ## The 'nullglob' bash option is not portable, so use perl. dirs=`$(PERL) -e "print join(' ', glob('$$globs'));"` || exit 1; \ @@@ -576,7 -544,7 +575,7 @@@ amhello_configury = missing \ src/Makefile.in -dist_noinst_DATA = $(amhello_sources) +dist_noinst_DATA += $(amhello_sources) dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz # We depend on configure.ac so that we regenerate the tarball diff --combined NEWS index f308752,5884e78..1f1955d --- a/NEWS +++ b/NEWS @@@ -44,6 -44,30 +44,30 @@@ New in 1.13 - All the "old alias" macros in 'm4/obsolete.m4' have been removed. + * Elisp byte-compilation: + + - The byte compilation of '.el' files into '.elc' files is now done + with a suffix rule. This has simplified the compilation process, and + more importantly made it less brittle. The downside is that emacs is + now invoked once for each '.el' files, which cause some noticeable + slowdowns. These should however be mitigated on multicore machines + (which are becoming the norm today) if concurrent make ("make -j") + is used. + + - Elisp files placed in a subdirectory are now byte-compiled to '.elc' + files in the same subdirectory; for example, byte-compiling of file + 'sub/foo.el' file will result in 'sub/foo.elc' rather than in + 'foo.elc'. This behaviour is backward-incompatible with older + Automake versions, but it is more natural and more sane. See also + automake bug#7441. + + - The Emacs invocation performing byte-compilation of '.el' files honors + the $(AM_ELCFLAGS) and $(ELCFLAGS) variables; as typical, the former + one is developer-reserved and the latter one user-reserved. + + - The 'elisp-comp' script, once provided by Automake, has been rendered + obsoleted by the just-described changes, and thus removed. + * Changes to Automake-generated testsuite harnesses: - The parallel testsuite harness (previously only enabled by the @@@ -51,13 -75,6 +75,13 @@@ testsuite harness will still be available through the use of the 'serial-tests' option (introduced in Automake 1.12). + - The 'color-tests' option is now unconditionally activated by default. + In particular, this means that testsuite output is now colorized by + default if the attached terminal seems to support ANSI escapes, and + that the user can force output colorization by setting the variable + AM_COLOR_TESTS to "always". The 'color-tests' is still recognized + for backward-compatibility, although it's a handled as a no-op now. + * Silent rules support: - Support for silent rules is now always active in Automake-generated @@@ -72,7 -89,7 +96,7 @@@ * Texinfo Support: - The rules to build PDF and DVI files from Texinfo input now use the - ' --build-dir' option, to keep the auxiliary files used by texi2dvi + '--build-dir' option, to keep the auxiliary files used by texi2dvi and texi2pdf around without cluttering the build directory, and to make it possible to run the "dvi" and "pdf" recipes in parallel. @@@ -93,14 -110,10 +117,14 @@@ * Recursive targets: - The user can now define his own recursive targets that recurse - in the directories specified in $(SUBDIRS). This can be done by - specifying the name of such targets in invocations of the new - 'AM_EXTRA_RECURSIVE_TARGETS' m4 macro. + - The user can now define his own recursive targets that recurse + in the directories specified in $(SUBDIRS). This can be done by + specifying the name of such targets in invocations of the new + 'AM_EXTRA_RECURSIVE_TARGETS' m4 macro. + + - Any failure in the recipe of the "tags", "ctags", "cscope" or + "cscopelist" targets in a subdirectory is now propagated to the + top-level make invocation. * Improvements to aclocal and related rebuilds rules: @@@ -150,28 -163,10 +174,28 @@@ New in 1.12.3 giving more useful warnings than a bare "command not found" from a make recipe would. -* Automake Testsuite: +* Miscellaneous changes: + + - The '.m4' files provided by Automake does not define serial numbers + anymore. This should cause no difference in the behaviour of aclocal + though. - Some testsuite weaknesses and spurious failures have been fixed. +Bugs fixed in 1.12.3: + +* Long-standing bugs: + + - Instead of renaming only self-references of files (typically for + #lines), ylwrap now also renames references to the other generated + files. This fixes support for GLR and C++ parsers from Bison (PR + automake/491 and automake bug#7648): 'parser.c' now properly + #includes 'parser.h' instead of 'y.tab.h'. + + - Generated files unknown to ylwrap are now preserved. This fixes + C++ support for Bison (automake bug#7648): location.hh and the + like are no longer discarded. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New in 1.12.2: diff --combined automake.in index 48ece7f,92ad9a6..91133bd --- a/automake.in +++ b/automake.in @@@ -231,7 -231,7 +231,7 @@@ my @common_files (qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.DOC COPYING.LIB COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO ar-lib compile config.guess config.rpath - config.sub depcomp elisp-comp install-sh libversion.in mdate-sh + config.sub depcomp install-sh libversion.in mdate-sh missing mkinstalldirs py-compile texinfo.tex ylwrap), @libtool_files, @libtool_sometimes); @@@ -464,11 -464,9 +464,11 @@@ my %required_targets 'install-ps-am' => 1, 'install-info-am' => 1, 'installcheck-am' => 1, - 'uninstall-am' => 1, - - 'install-man' => 1, + 'uninstall-am' => 1, + 'tags-am' => 1, + 'ctags-am' => 1, + 'cscopelist-am' => 1, + 'install-man' => 1, ); # Queue to push require_conf_file requirements to. @@@ -3615,26 -3613,71 +3615,26 @@@ sub handle_tag '$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)' . "@config", INTERNAL); - my @tag_deps = (); - my @ctag_deps = (); - my @cscope_deps = (); - if (var ('SUBDIRS')) - { - $output_rules .= ("tags-recursive:\n" - . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n" - # Never fail here if a subdir fails; it - # isn't important. - . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir" - . " && \$(MAKE) \$(AM_MAKEFLAGS) tags); \\\n" - . "\tdone\n"); - push (@tag_deps, 'tags-recursive'); - &depend ('.PHONY', 'tags-recursive'); - &depend ('.MAKE', 'tags-recursive'); - - $output_rules .= ("ctags-recursive:\n" - . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n" - # Never fail here if a subdir fails; it - # isn't important. - . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir" - . " && \$(MAKE) \$(AM_MAKEFLAGS) ctags); \\\n" - . "\tdone\n"); - push (@ctag_deps, 'ctags-recursive'); - &depend ('.PHONY', 'ctags-recursive'); - &depend ('.MAKE', 'ctags-recursive'); - - $output_rules .= ("cscopelist-recursive:\n" - . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n" - # Never fail here if a subdir fails; it - # isn't important. - . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir" - . " && \$(MAKE) \$(AM_MAKEFLAGS) cscopelist); \\\n" - . "\tdone\n"); - push (@cscope_deps, 'cscopelist-recursive'); - &depend ('.PHONY', 'cscopelist-recursive'); - &depend ('.MAKE', 'cscopelist-recursive'); - } - if (rvar('am__tagged_files')->value_as_list_recursive - || var ('ETAGS_ARGS') || @tag_deps) - { - $output_rules .= &file_contents ('tags', - new Automake::Location, - TAGSDIRS => "@tag_deps", - CTAGSDIRS => "@ctag_deps", - CSCOPEDIRS => "@cscope_deps"); - + || var ('ETAGS_ARGS') || var ('SUBDIRS')) + { + $output_rules .= &file_contents ('tags', new Automake::Location); set_seen 'TAGS_DEPENDENCIES'; - } - elsif (reject_var ('TAGS_DEPENDENCIES', - "it doesn't make sense to define 'TAGS_DEPENDENCIES'" - . " without\nsources or 'ETAGS_ARGS'")) - { - } + } else - { + { + reject_var ('TAGS_DEPENDENCIES', + "it doesn't make sense to define 'TAGS_DEPENDENCIES'" + . " without\nsources or 'ETAGS_ARGS'"); # Every Makefile must define some sort of TAGS rule. # Otherwise, it would be possible for a top-level "make TAGS" - # to fail because some subdirectory failed. - $output_rules .= "tags: TAGS\nTAGS:\n\n"; - # Ditto ctags and cscope. - $output_rules .= "ctags: CTAGS\nCTAGS:\n\n"; - $output_rules .= "cscope cscopelist:\n\n"; - } + # to fail because some subdirectory failed. Ditto ctags and + # cscope. + $output_rules .= + "tags TAGS:\n\n" . + "ctags CTAGS:\n\n" . + "cscope cscopelist:\n\n"; + } } @@@ -4823,6 -4866,7 +4823,6 @@@ sub handle_test push (@check_tests, 'check-TESTS'); my $check_deps = "@check"; $output_rules .= &file_contents ('check', new Automake::Location, - COLOR => !! option 'color-tests', SERIAL_TESTS => !! option 'serial-tests', CHECK_DEPS => $check_deps); @@@ -4955,8 -4999,6 +4955,6 @@@ sub handle_emacs_lis require_variables ($elfiles[0][0], "Emacs Lisp sources seen", TRUE, 'EMACS', 'lispdir'); - require_conf_file ($elfiles[0][0], FOREIGN, 'elisp-comp'); - &define_variable ('elisp_comp', "$am_config_aux_dir/elisp-comp", INTERNAL); } # Handle Python @@@ -6805,7 -6847,7 +6803,7 @@@ sub transform ($$ # preprocess_file ($MAKEFILE, [%TRANSFORM]) # ----------------------------------------- # Load a $MAKEFILE, apply the %TRANSFORM, and return the result. -# No extra parsing of post-processing is done (i.e., recognition of +# No extra parsing or post-processing is done (i.e., recognition of # rules declaration or of make variables definitions). sub preprocess_file ($%) { diff --combined doc/automake.texi index 251c26b,d2bc574..76e84e0 --- a/doc/automake.texi +++ b/doc/automake.texi @@@ -2281,9 -2281,6 +2281,6 @@@ generate not only the desired output bu that is then used by the automatic dependency tracking feature (@pxref{Dependencies}). - @item elisp-comp - This program is used to byte-compile Emacs Lisp code. - @item install-sh This is a replacement for the @command{install} program that works on platforms where @command{install} is unavailable or unusable. @@@ -2929,7 -2926,6 +2926,6 @@@ Automake will look for various helper s @file{config.guess}, @file{config.sub}, @file{depcomp}, - @file{elisp-comp}, @file{compile}, @file{install-sh}, @file{ltmain.sh}, @@@ -7473,7 -7469,10 +7469,10 @@@ Lisp sources are not distributed by def distributed. Automake will byte-compile all Emacs Lisp source files using the Emacs - found by @code{AM_PATH_LISPDIR}, if any was found. + found by @code{AM_PATH_LISPDIR}, if any was found. When performing such + byte-compilation, the flags specified in the (developer-reserved) + @code{AM_ELCFLAGS} and (user-reserved) @code{ELCFLAGS} make variables + will be passed to the Emacs invocation. Byte-compiled Emacs Lisp files are not portable among all versions of Emacs, so it makes sense to turn this off if you expect sites to have @@@ -8843,18 -8842,18 +8842,18 @@@ run @anchor{Simple tests and color-tests} @vindex AM_COLOR_TESTS @cindex Colorized testsuite output -If the Automake option @code{color-tests} is used (@pxref{Options}) -and standard output is connected to a capable terminal, then the test -results and the summary are colored appropriately. The user can disable -colored output by setting the @command{make} variable -@samp{AM_COLOR_TESTS=no}, or force colored output even without a connecting -terminal with @samp{AM_COLOR_TESTS=always}. It's also worth noting that -some @command{make} implementations, when used in parallel mode, have -slightly different semantics (@pxref{Parallel make,,, autoconf, -The Autoconf Manual}), which can break the automatic detection of a -connection to a capable terminal. If this is the case, you'll have to -resort to the use of @samp{AM_COLOR_TESTS=always} in order to have the -testsuite output colorized. +If the standard output is connected to a capable terminal, then the test +results and the summary are colored appropriately. The developer and the +user can disable colored output by setting the @command{make} variable +@samp{AM_COLOR_TESTS=no}; the user can in addition force colored output +even without a connecting terminal with @samp{AM_COLOR_TESTS=always}. +It's also worth noting that some @command{make} implementations, +when used in parallel mode, have slightly different semantics +(@pxref{Parallel make,,, autoconf, The Autoconf Manual}), which can +break the automatic detection of a connection to a capable terminal. +If this is the case, the user will have to resort to the use of +@samp{AM_COLOR_TESTS=always} in order to have the testsuite output +colorized. Test programs that need data files should look for them in @code{srcdir} (which is both a make variable and an environment variable made available @@@ -9279,9 -9278,9 +9278,9 @@@ definition of generic and extension-spe @end itemize @noindent -On the other hand, the exact semantics of how (and if) -@option{color-tests}, @code{XFAIL_TESTS}, and hard errors are supported -and handled is left to the individual test drivers. +On the other hand, the exact semantics of how (and if) testsuite output +colorization, @code{XFAIL_TESTS}, and hard errors are supported and +handled is left to the individual test drivers. @c TODO: We should really add a working example in the doc/ directory, @c TODO: and reference if from here. @@@ -9973,6 -9972,13 +9972,6 @@@ implies options @option{readme-alpha} a Cause @samp{make dist} to fail unless the current version number appears in the first few lines of the @file{NEWS} file. -@item @option{color-tests} -@cindex Option, @option{color-tests} -@opindex color-tests -Cause output of the serial and parallel test harnesses (see @ref{Simple -Tests}) and of properly-written custom test drivers (@pxref{Custom Test -Drivers}) to be colorized on capable terminals. - @item @option{dejagnu} @cindex Option, @option{dejagnu} @opindex dejagnu diff --combined t/list-of-tests.mk index 6f1eeab,35197a5..3125cf4 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@@ -30,6 -30,8 +30,6 @@@ t/pm/Version3.p XFAIL_TESTS = \ t/all.sh \ -t/yacc-bison-skeleton-cxx.sh \ -t/yacc-bison-skeleton.sh \ t/cond17.sh \ t/gcj6.sh \ t/override-conditional-2.sh \ @@@ -37,6 -39,7 +37,6 @@@ t/dist-pr109765.sh t/instdir-cond2.sh \ t/java-nobase.sh \ t/objext-pr10128.sh \ -t/parallel-tests-many.sh \ t/pr8365-remake-timing.sh \ t/lex-subobj-nodep.sh \ t/remake-am-pr10111.sh \ @@@ -70,6 -73,7 +70,6 @@@ t/perf/testsuite-summary.s handwritten_TESTS = \ t/get-sysconf.sh \ $(perl_TESTS) \ -$(perf_TESTS) \ t/instspc.tap \ t/aclocal.sh \ t/aclocal3.sh \ @@@ -225,9 -229,8 +225,9 @@@ t/colon4.sh t/colon5.sh \ t/colon6.sh \ t/colon7.sh \ -t/color.sh \ -t/color2.sh \ +t/color-tests.sh \ +t/color-tests2.sh \ +t/color-tests-opt.sh \ t/comment.sh \ t/comment2.sh \ t/comment3.sh \ @@@ -627,8 -630,13 +627,13 @@@ t/lisp5.sh t/lisp6.sh \ t/lisp7.sh \ t/lisp8.sh \ + t/lisp-loadpath.sh \ + t/lisp-subdir.sh \ + t/lisp-subdir2.sh \ + t/lisp-subdir-mix.sh \ t/lispdry.sh \ t/lisp-pr11806.sh \ + t/lisp-flags.sh \ t/listval.sh \ t/location.sh \ t/longline.sh \ @@@ -769,6 -777,7 +774,6 @@@ t/parallel-tests-exit-statuses.sh t/parallel-tests-console-output.sh \ t/parallel-tests-once.sh \ t/parallel-tests-trailing-bslash.sh \ -t/parallel-tests-many.sh \ t/tests-environment.sh \ t/am-tests-environment.sh \ t/tests-environment-backcompat.sh \ @@@ -948,6 -957,7 +953,6 @@@ t/repeated-options.sh t/rulepat.sh \ t/self-check-configure-help.sh \ t/self-check-dir.tap \ -t/self-check-env-sanitize.tap \ t/self-check-exit.tap \ t/self-check-explicit-skips.sh \ t/self-check-is_newest.tap \ @@@ -955,6 -965,7 +960,6 @@@ t/self-check-me.tap t/self-check-report.sh \ t/self-check-seq.tap \ t/self-check-is-blocked-signal.tap \ -t/self-check-tap.sh \ t/self-check-unindent.tap \ t/sanity.sh \ t/scripts.sh \