summaryrefslogtreecommitdiff
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* build: Generate versioned scripts at make timeMathieu Lirzin2017-08-313-40/+13
| | | | | | | | | | * configure.ac: Don't generate 'bin/aclocal-${APIVERSION}' and 'bin/automake-${APIVERSION}'. * bin/wrap-aclocal.in: Delete. * bin/wrap-automake.in: Likewise. * bin/Makefile.inc (%D%/automake-$(APIVERSION)) (%D%/aclocal-$(APIVERSION)): New targets. (CLEANFILES): Add them.
* aclocal: Support ACLOCAL_AUTOMAKE_DIR environment variableMathieu Lirzin2017-08-312-8/+11
| | | | | | | | | | | | | * bin/aclocal.in: Reset '@automake_includes' and '@system_includes' in for build environment. Allow setting '@automake_includes' with ACLOCAL_AUTOMAKE_DIR environment variable. (parse_arguments): Ignore 'dirlist' when '@system_includes' is empty. * doc/automake.texi (aclocal Options): Document ACLOCAL_AUTOMAKE_DIR. * bin/wrap-aclocal.in: Remove extra command line options. * pre-inst-env.in: Set ACLOCAL_AUTOMAKE_DIR and ACLOCAL_PATH environment variables. * t/ax/test-defs.in: Adapt. * t/ansi2knr-no-more.sh (warn_rx): Likewise.
* config: Support AUTOMAKE_LIBDIR environment variableMathieu Lirzin2017-08-301-5/+0
| | | | | | | | * lib/Automake/Config.in: Let AUTOMAKE_LIBDIR environment variable override the default location for '$libdir'. * doc/automake.texi (automake Invocation): Document AUTOMAKE_LIBDIR. * pre-inst-env.in (AUTOMAKE_LIBDIR): Set AUTOMAKE_LIBDIR. * bin/wrap-automake.in: Don't use "--libdir" option.
* build: Use PERL5LIB from 'pre-inst-env' scriptMathieu Lirzin2017-08-294-12/+4
| | | | | | | | | | * bin/aclocal.in: Detect build environment with AUTOMAKE_UNINSTALLED. Let 'PERL5LIB' from 'pre-inst-env' define the perl module directories. * bin/automake.in: Likewise. * bin/wrap-aclocal.in: Don't set 'Automake::perl_libdirs' anymore. * bin/wrap-automake.in: Likewise. * t/Makefile.inc (LOG_COMPILER, PL_LOG_COMPILER): Use 'pre-inst-env'. (AM_PL_LOG_FLAGS): Don't set perl module path.
* build: Move wrapped scripts in "bin" directoryMathieu Lirzin2017-08-293-0/+60
| | | | | | | | | | | | | | | | | | Those scripts are used both in the build process and for the tests, so it seems clearer to not hide them in "t/wrap" directory. * t/wrap/aclocal.in: Rename to ... * bin/wrap-aclocal.in: ... this. * t/wrap/automake.in: Rename to ... * bin/wrap-automake.in: ... this. * configure.ac: Generate "bin/aclocal-${APIVERSION}" and "bin/automake-${APIVERSION}" at configure time. * t/Makefile.inc (nodist_noinst_SCRIPTS): Move wrapped scripts ... * bin/Makefile.inc (nodist_noinst_SCRIPTS): ... here. * Makefile.am (extend_PATH): Use "bin" directory. * t/ax/test-defs.in (am_bindir): Likewise. * t/get-sysconf.sh: Likewise. * .gitignore: Update.
* automake: Handle LTLIBOBJS more specificallyMathieu Lirzin2017-08-271-3/+2
| | | | | * bin/automake.in (handle_LIBOBJS_or_ALLOCA): Remove complex regexp substitution when handling LTLIBOBJS.
* aclocal: Avoid problematic string interpolationThomas Jahns2017-07-151-1/+1
| | | | | | | | | | | This fixes bug#20903. Thanks to Eric Bavier for reporting this issue. * bin/aclocal.in (automake_includes): Avoid problematic string interpolation. * NEWS: Update. * THANKS: Thank Eric Bavier. Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
* automake: Shorter object file names under subdir-objectsThomas Martitz2017-07-061-17/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Combining the 'subdir-objects' option with target-specific flags had the consequence of producing long object file names. This was done to preventively ensure the uniqueness of object file names. We are now using shorter names by default, and handle long names when an actual conflict is detected. This will hopefully reduce the necessity of using the 'prog_SHORTNAME' facility. Example: previously: AUTOMAKE_OPTIONS = subdir-objects bin_PROGRAMS += path/to/foo path_to_foo_CFLAGS = $(AM_CFLAGS) -g resulted in objects: sub/path_to_foo-foo.o now object file name is: sub/foo-foo.o * bin/automake.in (proglist, liblist, ltliblist) (dup_shortnames): New globals. (initialize_per_input): Initialize them. (handle_targets): New subroutine. (handle_single_transform): Truncate object file names when possible. * t/subobj-objname-clash.sh: New test. * t/list-of-tests.mk (handwritten_TESTS): Add it. * NEWS: Update. Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
* Merge branch 'micro' into minorMathieu Lirzin2017-06-164-8/+12
|\
| * automake: Update 'read_am_file' docstring.Mathieu Lirzin2017-05-201-4/+7
| | | | | | | | | | * bin/automake.in (read_am_file): Update docstring which was referring to a non existent '%contents' variable.
| * maint: Update copyright years to 2017.Mathieu Lirzin2017-03-024-4/+4
| | | | | | | | This update has been made with 'make update-copyright'.
| * automake: do not emit rule with two dependentsJim Meyering2016-09-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a system using our replacement alloca, make would emit this warning: target '.deps/alloca.Po' given more than once in the same rule That arose because automake would emit a rule depending on both ./.deps/alloca.Po and .deps/alloca.Po. Normally, duplicate dependents are avoided by virtue of their names being keys in the %dep_files hash, but in this case, that particular file was specified in two different ways. * bin/automake.in (handle_ALLOCA): When the $dir prefix is empty, make it './', to ensure that when we add ./.deps/alloca.Po it is deduped. See: http://bugs/gnu/org/22702
* | Merge branch 'micro' into minorPaul Eggert2016-03-311-1/+1
|\ \ | |/
| * automake: port to Perl 5.22 and laterPaul Eggert2016-03-311-1/+1
| | | | | | | | | | | | | | | | Without this change, Perl 5.22 complains "Unescaped left brace in regex is deprecated" and this is planned to become a hard error in Perl 5.26. See: http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern * bin/automake.in (substitute_ac_subst_variables): Escape left brace.
* | deps: fix corner-case "make distclean" bugStefano Lattarini2015-01-061-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assume we have package satisfying the following conditions: (1) automatic dependency tracking is enabled; (2) the 'subdir-objects' Automake option is enabled; (3) the package uses a recursive make setup. Also assume that: (a) a subdir Makefile declares a foo_SOURCES variable containing a source file in the parent directory; (b) that parent Makefile declare a compiled program itself. Then BSD and Solaris make used to fail when running "make distclean", because the 'distclean' target of the subdir Makefile removed the whole '.deps' directory before the parent Makefile was done with the included '.Po' makefile fragments in that directory. This issue was revealed by failures in the 'subobj-vpath-pr13928.sh' test when those make implementations were used. We fix the issue by ensuring the 'distclean' target of any Makefile only removed the '.Po' makefile fragments included by it, rather than the whole '.deps' directory where such files resides. This change should be the last step in fixing automake bug#13928 for good. * bin/automake.in (handle_languages), lib/am/depend.am: Adjust to implement the new 'distclean' logic. * t/pr224.sh: Adjust to avoid a spurious failure. * PLANS/subdir-objects.txt: Update. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | compile: don't place built object files in $(srcdir), ever ...Stefano Lattarini2015-01-061-16/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... even when a source file is specified as '$(srdir)/foo.c' or '$(top_srcdir)/bar.c'. And ditto for dependency-tracking makefile fragments (those under '.deps' directories). Such issues used to occur when the 'subdir-objects' option was given. This change should fix the second and last part of automake bug#13928. See also bug#16375 and bug#15293. * NEWS: Update. * bin/automake.in (handle_single_transform): Make sure object files and dependency-tracking makefile fragments coming from source like '$(srcdir)/foo.c' and '$(top_srcdir)/bar.c' are placed respectively under $(builddir) and $(top_builddir). * t/subobj-vpath-pr13928.sh: Enhance to expose even more aspects of the bug we've just fixed. * t/subobj-pr13928-more-langs.sh: New test, similar to the one above, but with non-C languages as well. * t/list-of-tests.mk (XFAIL_TESTS): Remove 'subobj-vpath-pr13928.sh', it's now supposed to pass. (handwritten_TESTS): Add 'subobj-pr13928-more-langs.sh'. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | deps: 'subdir-object' option now works when foo_SOURCES contains $(var)Stefano Lattarini2015-01-061-41/+43
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following a suggestions of Johan Kristensen, we have config.status use 'make' invocations rather than Makefile-parsing 'sed' hacks to bootstrap the dependency-tracking '.Po' and '.Plo' makefile fragments. To handle the inclusion of such files that are still missing when make is first we basically generate a temporary Makefile without these includes, and call 'make' on that Makefile. This fixes the serious bug bug#13928, which was an hard blocker to make the behavior mandated by the 'subdir-object' active by default (which we want to do in Automake 2.0). The issue has also been reported in bug#15919. * NEWS, THANKS: Update. * bin/automake.in (handle_languages): Add a trailing "marking" comment ("# am--include-marker") to the generated Makefile lines issuing 'include' directives for the dependency-tracking '.Po' and '.Plo' makefile fragments. Also rename the generated Makefile variable 'am__depfiles_maybe' to the clearer 'am__maybe_remake_depfiles'. Minor unrelated refactoring. * lib/am/configure.am: Adjust to account for the 'am__depfiles_maybe' -> 'am__maybe_remake_depfiles' renaming. * lib/am/depend.am: Add rules to generate a dummy version of all the dependency-tracking '.Po' and '.Plo' makefile fragments. * m4/depout.m4: Use make invocations rather than Makefile-parsing sed hacks to bootstrap the dependency-tracking '.Po' and '.Plo' makefile fragments. We still use some sed trickery in order to remove the inclusion of the still non existing .Po and .Plo files from the Makefile we invoke make upon; this is done stripping lines that contain the magic string "# am--include-marker". * m4/make.m4 (AM_MAKE_INCLUDE): Given that now automake generates Makefiles containing include statements with trailing comment, adjust the checks done here to make sure $MAKE support that; e.g., "include foo.mk # comment" rather than just "include foo.mk". Also refactor and adjust to leave better debugging info in config.log. * t/postproc.sh: Rename ... * t/depend-postproc.sh: ... to this, and adjust and enhance. * t/list-of-tests.mk (handwritten_TESTS): Adjust. (XFAIL_TESTS): Remove 't/subobj-indir-pr13928.sh', which is now succeeding. * t/subobj-indir-pr13928.sh: Simplify slightly, now that we expect it to pass. * t/depcomp8a.sh: Adjust grepping check to account for the changes in the generated Makefile, and tp be somewhat more robust in light of possible future modifications. * t/depcomp8b.sh: Likewise. * t/subobj11b.sh: Likewise. * t/subobj11c.sh: Likewise. * t/extra-sources.sh: Likewise. * t/lex-depend-grep.sh: Likewise. * t/lex-depend-cxx.sh: Add a command to help debugging in case of test failure. Helped-by: Johan Kristensen <johankristensen@gmail.com> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* maint: update copyright years to 2015 (branch 'micro')Stefano Lattarini2015-01-054-4/+4
| | | | Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* Merge branch 'micro' into minorStefano Lattarini2014-12-221-28/+28
|\ | | | | | | | | | | | | | | | | | | | | * micro: cleanup: refactor code to initialize DIST_COMMON dist: ordering of files in DIST_COMMON is deterministic now tests: refactor some tests on DIST_COMMON maint: make output of 'gen-testsuite-part' deterministic When computing lispdir, don't load emacs site wide init file. PATH: quote $(PATH_SEPARATOR) as well Improve detection of GNU make, avoiding "Arg list too long" errors.
| * cleanup: refactor code to initialize DIST_COMMONStefano Lattarini2014-12-221-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is not need to make that an Automake variable early, only to later get and munge its contents, and use the new content to redefine the variable. * bin/automake.in (@dist_common): New global variable. (push_dist_common, handle_dist): Use it. (handle_dist): Define am__DIST_COMMON instead of DIST_COMMON directly. (initialize_per_input): Reset it to empty. ($configure_dist_common): Turn this scalar variable ... (@configure_dist_common): ... into this array variable. (handle_dist): Adjust. (required_file_check_or_copy): Update and wrap some comments. * lib/am/distdir.am (DIST_COMMON): Append $(am__DIST_COMMON). * t/distcom2.sh: Tighten a little. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * dist: ordering of files in DIST_COMMON is deterministic nowStefano Lattarini2014-12-221-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It had likely stopped being deterministic due to the new perl behavior of having non-deterministic order of numerating hash keys: <http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Hash_randomization> <http://onionstand.blogspot.ie/2012/12/are-you-relying-on-hash-keys-being.html> See also similar commit v1.14-19-g52e6404, albeit in this case the issue is likely coming from autom4te/autoconf, not from automake itself. Fixes automake bug http://debbugs.gnu.org/17908 * bin/automake.in (handle_dist): Sort @dist_common. (print_autodist_files): Swap invocations of 'sort' and 'uniq', for consistency with the new code in 'handle_dist' and to get rid of a minor hack. * NEWS: Update. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | init: ensure $ac_aux_dir is defined before being usedStefano Lattarini2014-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we use '$ac_aux_dir' to define '$am_aux_dir', we need to ensure the former has been initialized before we try to define the latter, otherwise the definition: am_aux_dir=`cd $ac_aux_dir && pwd` will set '$am_aux_dir' to '$HOME', likely causing weird and unexpected behaviours. This change fixes automake bug#15981. * m4/auxdir.m4 (AM_AUX_DIR_EXPAND): AC_REQUIRE expansion of 'AC_CONFIG_AUX_DIR_DEFAULT'. Fix redundant comment and AC_PREREQ, add extra quoting around '$ac_aux_dir'. * t/auxdir-pr15981.sh: New test. * t/auxdir-cc-pr15981.sh: Likewise. * t/list-of-tests.mk (handwritten_TESTS): Add them. * THANKS, NEWS: Update. * bin/automake.in: Fix a harmless typo in comments, that I happened to notice while writing this patch. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | maint: update copyright yearsStefano Lattarini2014-04-214-4/+4
| | | | | | | | | | | | We've been in 2014 already for few months now... Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Allow user to extend .PRECIOUS targetStefano Lattarini2013-12-261-2/+2
|/ | | | | | | | | | | | | | | | | | References: <http://lists.freedesktop.org/archives/systemd-devel/2013-July/012155.html> <http://lists.gnu.org/archive/html/automake/2013-07/msg00011.html> * bin/automake.in: Adjust to ensure we handle '.PRECIOUS' the same way we do for '.PHONY' and '.MAKE'. * lib/Automake/Rule.pm: Likewise. * t/precious.sh: New test. * t/list-of-tests.mk: Add it. * t/phony.sh: Enhance a little while at it. * NEWS: Update. * THANKS: Likewise. Reported-by: Holger Hans Peter Freyther <holger@freyther.de> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* Merge branch 'micro' into maintStefano Lattarini2013-06-121-4/+5
| | | | | | | | | * micro: THANKS: update e-mall address for Ralf Corsepius lang, suffix rules: don't require C stuff needlessly tests: expose automake bug#14560 Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* automake: assume we can always pass '-o' to the C compilerPeter Rosin2013-05-301-9/+2
| | | | | | | | | | | | | | | | | | | | | | It is assumed that we can pass -c -o to the C compiler, so remove some special casing and always do that. This change is similar in spirit to v1.13.1d-217-g7299c4d "depend: assume we can always pass '-o' to the C compiler" This change also happen to fix a testsuite failure (t/silent-many-languages.sh) when mixing MSVC and GNU fortran, which have different default object file extensions (.obj vs. .o). This difference in object file extension is not handled well and caused Automake to look for MSVC objects with .o extension. Always using -o makes MSVC create .o object files and linking succeeds. Not that anybody recommends mixing toolchains or anything. * bin/automake.in (handle_languages): Remove conditional modification of 'output_flag' entry for 'c'. (register_language ('name' => 'c')): Add 'output_flag' entry set to '-o'. Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* Merge branch 'micro' into maintStefano Lattarini2013-05-291-6/+5
| | | | | | | | | | | | | * micro: NEWS: fix typos and grammaros NEWS: document fix for bug#14441 Automake::Rule: consistently prepend underscore to private variables Automake::Rule: rename: suffix_rule() -> next_in_suffix_chain() Automake::Rule: adjust comments and POD according to previous changes Automake::Rule: make private variables lexically scoped suffix rules: better distinction between builtin and user-derived Automake::Rule: expose suffix rules as a function, not a scalar tests: expose automake bug#14441
* texi: build version.texi and stamp-vti in srcdirStefano Lattarini2013-05-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do so even when the 'info-in-builddir' option is present, or when the corresponding '*.info' files are listed in $(CLEANFILES) or in $(DISTCLEANFILES). This fixes failures in the following tests, when they are run with $MAKE pointing to FreeBSD make: - txinfo-nodist-info.sh - txinfo23.sh - txinfo24.sh - txinfo28.sh - txinfo25.sh BTW, notice that the test 'txinfo-builddir.sh' fails with FreeBSD make as well, but that is due to a known FreeBSD make VPATH issue (the same described in automake bug#7884). But that is not a regression, since the 'info-in-builddir' option will be new in Automake 1.14. Moreover, we already warn in the manual that the use of that option can indeed cause problems with VPATH builds done by non-GNU make. * bin/automake.in (handle_texinfo_helper): New local variable '$soutdir'. Use it instead of '$outdir' where appropriate (in particular, in the transform used on file 'texi-vers.am'. * t/txinfo-builddir.sh: Adjust to avoid spurious failures. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* build: fixup for building in a VPATH setupStefano Lattarini2013-05-141-0/+1
| | | | | | | | * bin/Makefile.inc (%D%/automake, %D%/aclocal): Make sure that the directory where the targets scripts are going to be built exists, before trying to create said scripts. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* Merge branch 'branch-1.13.2' into maintStefano Lattarini2013-05-111-3/+1
| | | | | * branch-1.13.2: warns: don't tell AM_PROG_MKDIR_P is going to be removed
* refactor: fix few "inverted boolean" usagesStefano Lattarini2013-05-101-5/+5
| | | | | | | | | | | | | | | In some subroutines, we used a return value of 0 to indicate success, and a return status of 1 to indicate failure. That was not very consistent with the perl interpretation of 0 as a false value and 1 as a true value. So we now invert the meaning of the exit statuses. * lib/Automake/Options.pm (_process_option_list): Here. (process_global_option_list, process_option_list): And by reflex, here as well. * bin/automake.in (handle_options): And here. (generate_makefile, scan_autoconf_traces): Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* Merge branch 'dog-feeding' into maintStefano Lattarini2013-05-101-3/+3
| | | | | | * dog-feeding: build: move automake and aclocal in 'bin' subdir build: break up monolithic Makefile.am in subdir-specific fragments
* build: move automake and aclocal in 'bin' subdirStefano Lattarini2013-05-094-0/+9571
* automake.in: Rename ... * bin/automake.in: ... like this. * aclocal.in: Rename ... * bin/aclocal.in: ... like this. * Makefile.am: Move parts that dealt with the building/distribution of aclocal and Automake .. * bin/Makefile.inc): ... in this new included fragment. Adjust as needed, and make deliberate use of the '%D%' substitution. * lib/gen-perl-protos: Move ... * bin/gen-perl-protos: ... here. * bootstrap.sh, configure.ac, maintainer/rename-tests, t/wrap/aclocal.in, t/wrap/automake.in, doc/Makefile.inc, t/ax/tap-setup.sh, .gitignore: Adjust. * maintainer/syntax-checks.mk: Likewise, and enhance a little. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>