From bb64793a95ea0576c817a8e01f0a689d9547de4a Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Tue, 29 Aug 2017 11:27:52 +0200 Subject: build: Move wrapped scripts in "bin" directory 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. --- .gitignore | 4 ++-- Makefile.am | 2 +- bin/Makefile.inc | 4 ++++ bin/wrap-aclocal.in | 29 +++++++++++++++++++++++++++++ bin/wrap-automake.in | 27 +++++++++++++++++++++++++++ configure.ac | 12 ++++++------ t/Makefile.inc | 4 ---- t/ax/test-defs.in | 2 +- t/get-sysconf.sh | 4 ++-- t/wrap/aclocal.in | 29 ----------------------------- t/wrap/automake.in | 27 --------------------------- 11 files changed, 72 insertions(+), 72 deletions(-) create mode 100644 bin/wrap-aclocal.in create mode 100644 bin/wrap-automake.in delete mode 100644 t/wrap/aclocal.in delete mode 100644 t/wrap/automake.in diff --git a/.gitignore b/.gitignore index 19da02f71..56bdce2c6 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,9 @@ /config.status.lineno /configure.lineno /bin/aclocal +/bin/aclocal-1.* /bin/automake +/bin/automake-1.* /runtest /doc/.dirstamp /doc/automake*.info @@ -41,8 +43,6 @@ /doc/web-manual /lib/Automake/Config.pm /test-suite.log -/t/wrap/aclocal-1.* -/t/wrap/automake-1.* /t/ax/test-defs.sh /t/ax/shell-no-trail-bslash /t/ax/cc-no-c-o diff --git a/Makefile.am b/Makefile.am index cfe4dd40d..65787e030 100644 --- a/Makefile.am +++ b/Makefile.am @@ -72,7 +72,7 @@ generated_file_finalize = $(AM_V_at) \ # For some tests or targets, we need to have the just-build automake and # aclocal scripts avaiable on PATH. extend_PATH = \ - { PATH='$(abs_builddir)/t/wrap$(PATH_SEPARATOR)'$$PATH && export PATH; } + { PATH='$(abs_builddir)/bin$(PATH_SEPARATOR)'$$PATH && export PATH; } # The master location for INSTALL is lib/INSTALL. # This is where "make fetch" will install new versions. diff --git a/bin/Makefile.inc b/bin/Makefile.inc index 102dec9fc..69a744d87 100644 --- a/bin/Makefile.inc +++ b/bin/Makefile.inc @@ -20,6 +20,10 @@ bin_SCRIPTS = %D%/automake %D%/aclocal CLEANFILES += $(bin_SCRIPTS) +nodist_noinst_SCRIPTS += \ + %D%/aclocal-$(APIVERSION) \ + %D%/automake-$(APIVERSION) + # Used by maintainer checks and such. automake_in = $(srcdir)/%D%/automake.in aclocal_in = $(srcdir)/%D%/aclocal.in diff --git a/bin/wrap-aclocal.in b/bin/wrap-aclocal.in new file mode 100644 index 000000000..a624bcb16 --- /dev/null +++ b/bin/wrap-aclocal.in @@ -0,0 +1,29 @@ +#!@PERL@ -w +# @configure_input@ + +# Copyright (C) 2012-2017 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +BEGIN +{ + use strict; + @Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib'); + unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib' + if '@srcdir@' ne '.'; + unshift @ARGV, + '--automake-acdir=@abs_top_srcdir@/m4', + '--system-acdir=@abs_top_srcdir@/m4/acdir'; +} +require '@abs_top_builddir@/bin/aclocal'; diff --git a/bin/wrap-automake.in b/bin/wrap-automake.in new file mode 100644 index 000000000..1075346a1 --- /dev/null +++ b/bin/wrap-automake.in @@ -0,0 +1,27 @@ +#!@PERL@ -w +# @configure_input@ + +# Copyright (C) 2012-2017 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +BEGIN +{ + use strict; + @Automake::perl_libdirs = ('@abs_top_srcdir@/lib'); + unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib' + if '@srcdir@' ne '.'; + unshift @ARGV, '--libdir=@abs_top_srcdir@/lib'; +} +require '@abs_top_builddir@/bin/automake'; diff --git a/configure.ac b/configure.ac index 30ba7d97b..c9c257b37 100644 --- a/configure.ac +++ b/configure.ac @@ -67,8 +67,8 @@ AC_SUBST([system_acdir], ["\${datadir}/aclocal"]) # aclocal and automake, hence the remake rules must use those versions # as well. The extra quoting is to cater to cases when the build # directory contains whitespace or shell metacharacters. -ACLOCAL="\"`pwd`/t/wrap/aclocal-$APIVERSION\"" -AUTOMAKE="\"`pwd`/t/wrap/automake-$APIVERSION\"" +ACLOCAL="\"`pwd`/bin/aclocal-$APIVERSION\"" +AUTOMAKE="\"`pwd`/bin/automake-$APIVERSION\"" AC_PROG_LN_S @@ -580,11 +580,11 @@ AC_SUBST([EXEEXT]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_LINKS([GNUmakefile:GNUmakefile]) -AC_CONFIG_FILES([t/wrap/aclocal-${APIVERSION}:t/wrap/aclocal.in], - [chmod +x t/wrap/aclocal-${APIVERSION}], +AC_CONFIG_FILES([bin/aclocal-${APIVERSION}:bin/wrap-aclocal.in], + [chmod +x bin/aclocal-${APIVERSION}], [APIVERSION=$APIVERSION]) -AC_CONFIG_FILES([t/wrap/automake-${APIVERSION}:t/wrap/automake.in], - [chmod +x t/wrap/automake-${APIVERSION}], +AC_CONFIG_FILES([bin/automake-${APIVERSION}:bin/wrap-automake.in], + [chmod +x bin/automake-${APIVERSION}], [APIVERSION=$APIVERSION]) AC_OUTPUT diff --git a/t/Makefile.inc b/t/Makefile.inc index 708e93397..936108ed6 100644 --- a/t/Makefile.inc +++ b/t/Makefile.inc @@ -110,10 +110,6 @@ EXTRA_DIST += $(contrib_TESTS) # "make all". This makes it easier to run the test cases by # hand after having simply configured and built the package. -nodist_noinst_SCRIPTS += \ - %D%/wrap/aclocal-$(APIVERSION) \ - %D%/wrap/automake-$(APIVERSION) - dist_noinst_DATA += \ %D%/ax/test-init.sh \ %D%/ax/test-lib.sh \ diff --git a/t/ax/test-defs.in b/t/ax/test-defs.in index 2465c61c1..b4a690fc6 100644 --- a/t/ax/test-defs.in +++ b/t/ax/test-defs.in @@ -56,7 +56,7 @@ case ${am_running_installcheck:=no} in no) am_amdir=$am_top_srcdir/lib/am am_automake_acdir=$am_top_srcdir/m4 - am_bindir=$am_top_builddir/t/wrap + am_bindir=$am_top_builddir/bin am_datadir=$am_top_srcdir am_docdir=$am_top_srcdir/doc am_pkgvdatadir=$am_top_srcdir/lib diff --git a/t/get-sysconf.sh b/t/get-sysconf.sh index 986c1dd36..a768b4769 100644 --- a/t/get-sysconf.sh +++ b/t/get-sysconf.sh @@ -55,8 +55,8 @@ $YACC --version || : $YACC --help || : cat "$am_top_builddir/config.log" || st=1 -cat "$am_top_builddir/t/wrap/aclocal-$APIVERSION" || st=1 -cat "$am_top_builddir/t/wrap/automake-$APIVERSION" || st=1 +cat "$am_top_builddir/bin/aclocal-$APIVERSION" || st=1 +cat "$am_top_builddir/bin/automake-$APIVERSION" || st=1 if test $st -eq 0; then # This test SKIPs, so that all the information it has gathered and diff --git a/t/wrap/aclocal.in b/t/wrap/aclocal.in deleted file mode 100644 index a624bcb16..000000000 --- a/t/wrap/aclocal.in +++ /dev/null @@ -1,29 +0,0 @@ -#!@PERL@ -w -# @configure_input@ - -# Copyright (C) 2012-2017 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -BEGIN -{ - use strict; - @Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib'); - unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib' - if '@srcdir@' ne '.'; - unshift @ARGV, - '--automake-acdir=@abs_top_srcdir@/m4', - '--system-acdir=@abs_top_srcdir@/m4/acdir'; -} -require '@abs_top_builddir@/bin/aclocal'; diff --git a/t/wrap/automake.in b/t/wrap/automake.in deleted file mode 100644 index 1075346a1..000000000 --- a/t/wrap/automake.in +++ /dev/null @@ -1,27 +0,0 @@ -#!@PERL@ -w -# @configure_input@ - -# Copyright (C) 2012-2017 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -BEGIN -{ - use strict; - @Automake::perl_libdirs = ('@abs_top_srcdir@/lib'); - unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib' - if '@srcdir@' ne '.'; - unshift @ARGV, '--libdir=@abs_top_srcdir@/lib'; -} -require '@abs_top_builddir@/bin/automake'; -- cgit v1.2.1