* 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>
/config.status
/config.status.lineno
/configure.lineno
-/aclocal
-/automake
+/bin/aclocal
+/bin/automake
/runtest
/doc/.dirstamp
/doc/automake*.info
## Top level. ##
## ------------ ##
+EXTRA_DIST += \
+ bootstrap.sh \
+ GNUmakefile \
+ HACKING \
+ PLANS
+
# We want a handful of substitutions to be fully-expanded by make;
# then use config.status to substitute the remainder where a single
# expansion is sufficient. We use a funny notation here to avoid
fi; \
chmod a-w $@-t && mv -f $@-t $@
-bin_SCRIPTS = automake aclocal
-
-CLEANFILES += $(bin_SCRIPTS)
-AUTOMAKESOURCES = automake.in aclocal.in
-
-TAGS_FILES += $(AUTOMAKESOURCES)
-
-EXTRA_DIST += \
- $(AUTOMAKESOURCES) \
- bootstrap.sh \
- GNUmakefile \
- HACKING \
- PLANS
-
# 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; }
-# Make versioned links. We only run the transform on the root name;
-# then we make a versioned link with the transformed base name. This
-# seemed like the most reasonable approach.
-install-exec-hook:
- @$(POST_INSTALL)
- @for p in $(bin_SCRIPTS); do \
- f=`echo $$p | sed '$(transform)'`; \
- fv="$$f-$(APIVERSION)"; \
- rm -f "$(DESTDIR)$(bindir)/$$fv"; \
- echo " $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
- $(LN) "$(DESTDIR)$(bindir)/$$f" "$(DESTDIR)$(bindir)/$$fv"; \
- done
-
-uninstall-hook:
- @for p in $(bin_SCRIPTS); do \
- f=`echo $$p | sed '$(transform)'`; \
- fv="$$f-$(APIVERSION)"; \
- rm -f "$(DESTDIR)$(bindir)/$$fv"; \
- done
-
-# These files depend on Makefile so they are rebuilt if $(VERSION),
-# $(datadir) or other do_subst'ituted variables change.
-automake: automake.in
-aclocal: aclocal.in
-automake aclocal: Makefile lib/gen-perl-protos
- $(AM_V_GEN)rm -f $@ $@-t $@-t2 \
-## Common substitutions.
- && in=$@.in && $(do_subst) <$(srcdir)/$$in >$@-t \
-## Auto-compute prototypes of perl subroutines.
- && $(PERL) -w $(srcdir)/lib/gen-perl-protos $@-t > $@-t2 \
- && mv -f $@-t2 $@-t \
-## We can't use '$(generated_file_finalize)' here, because currently
-## Automake contains occurrences of unexpanded @substitutions@ in
-## comments, and that is perfectly legit.
- && chmod a+x,a-w $@-t && mv -f $@-t $@
-EXTRA_DIST += lib/gen-perl-protos
-
# The master location for INSTALL is lib/INSTALL.
# This is where "make fetch" will install new versions.
# Make sure we also update this copy.
maintainer/syntax-checks.mk
# Most work delegated to sub-dir makefile fragments.
+include $(srcdir)/bin/Makefile.inc
include $(srcdir)/doc/Makefile.inc
include $(srcdir)/lib/Makefile.inc
include $(srcdir)/lib/Automake/Makefile.inc
--- /dev/null
+## Copyright (C) 1995-2013 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 <http://www.gnu.org/licenses/>.
+
+## ----------------------------------- ##
+## The automake and aclocal scripts. ##
+## ----------------------------------- ##
+
+bin_SCRIPTS = %D%/automake %D%/aclocal
+CLEANFILES += $(bin_SCRIPTS)
+
+# Used by maintainer checks and such.
+automake_in = $(srcdir)/%D%/automake.in
+aclocal_in = $(srcdir)/%D%/aclocal.in
+automake_script = %D%/automake
+aclocal_script = %D%/aclocal
+
+AUTOMAKESOURCES = $(automake_in) $(aclocal_in)
+TAGS_FILES += $(AUTOMAKESOURCES)
+EXTRA_DIST += $(AUTOMAKESOURCES)
+
+# Make versioned links. We only run the transform on the root name;
+# then we make a versioned link with the transformed base name. This
+# seemed like the most reasonable approach.
+install-exec-hook:
+ @$(POST_INSTALL)
+ @for p in $(bin_SCRIPTS); do \
+ f=`echo $$p | sed -e 's,.*/,,' -e '$(transform)'`; \
+ fv="$$f-$(APIVERSION)"; \
+ rm -f "$(DESTDIR)$(bindir)/$$fv"; \
+ echo " $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
+ $(LN) "$(DESTDIR)$(bindir)/$$f" "$(DESTDIR)$(bindir)/$$fv"; \
+ done
+
+uninstall-hook:
+ @for p in $(bin_SCRIPTS); do \
+ f=`echo $$p | sed -e 's,.*/,,' -e '$(transform)'`; \
+ fv="$$f-$(APIVERSION)"; \
+ rm -f "$(DESTDIR)$(bindir)/$$fv"; \
+ done
+
+# These files depend on Makefile so they are rebuilt if $(VERSION),
+# $(datadir) or other do_subst'ituted variables change.
+%D%/automake: %D%/automake.in
+%D%/aclocal: %D%/aclocal.in
+%D%/automake %D%/aclocal: Makefile %D%/gen-perl-protos
+ $(AM_V_GEN)rm -f $@ $@-t $@-t2 \
+## Common substitutions.
+ && in=$@.in && $(do_subst) <$(srcdir)/$$in >$@-t \
+## Auto-compute prototypes of perl subroutines.
+ && $(PERL) -w $(srcdir)/%D%/gen-perl-protos $@-t > $@-t2 \
+ && mv -f $@-t2 $@-t \
+## We can't use '$(generated_file_finalize)' here, because currently
+## Automake contains occurrences of unexpanded @substitutions@ in
+## comments, and that is perfectly legit.
+ && chmod a+x,a-w $@-t && mv -f $@-t $@
+EXTRA_DIST += %D%/gen-perl-protos
+
+# vim: ft=automake noet
dosubst m4/amversion.in m4/amversion.m4
# Create temporary replacement for aclocal and automake.
-for p in aclocal automake; do
+for p in bin/aclocal bin/automake; do
dosubst $p.in $p.tmp
- $PERL -w lib/gen-perl-protos $p.tmp > $p.tmp2
+ $PERL -w bin/gen-perl-protos $p.tmp > $p.tmp2
mv -f $p.tmp2 $p.tmp
done
# Run the autotools. Bail out if any warning is triggered.
# Use '-I' here so that our own *.m4 files in m4/ gets included,
# not copied, in aclocal.m4.
-$PERL ./aclocal.tmp -Wall -Werror -I m4 \
- --automake-acdir=m4 --system-acdir=m4/acdir
+$PERL ./bin/aclocal.tmp -Wall -Werror -I m4 \
+ --automake-acdir=m4 --system-acdir=m4/acdir
$AUTOCONF -Wall -Werror
-$PERL ./automake.tmp -Wall -Werror
+$PERL ./bin/automake.tmp -Wall -Werror
# Remove temporary files and directories.
rm -rf aclocal-$APIVERSION automake-$APIVERSION
-rm -f aclocal.tmp automake.tmp
+rm -f bin/aclocal.tmp bin/automake.tmp
AC_PREREQ([2.69])
AC_INIT([GNU Automake], [1.13a], [bug-automake@gnu.org])
-AC_CONFIG_SRCDIR([automake.in])
+AC_CONFIG_SRCDIR([bin/automake.in])
AC_CONFIG_AUX_DIR([lib])
AM_SILENT_RULES([yes])
&& f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
&& echo ".so man1/$$f-$(APIVERSION).1" > $@
-%D%/aclocal-$(APIVERSION).1: aclocal.in aclocal lib/Automake/Config.pm
+%D%/aclocal-$(APIVERSION).1: $(aclocal_script) lib/Automake/Config.pm
$(update_mans) aclocal-$(APIVERSION)
-%D%/automake-$(APIVERSION).1: automake.in automake lib/Automake/Config.pm
+%D%/automake-$(APIVERSION).1: $(automake_script) lib/Automake/Config.pm
$(update_mans) automake-$(APIVERSION)
## ---------------------------- ##
AWK=${AWK-awk}
SED=${SED-sed}
-[[ -f automake.in && -d lib/Automake ]] \
+[[ -f bin/automake.in && -d lib/Automake ]] \
|| fatal "can only be run from the top-level of the Automake source tree"
$SED --version 2>&1 | grep GNU >/dev/null 2>&1 \
## aclocal.
automake_diff_no = 8
aclocal_diff_no = 9
+sc_diff_automake sc_diff_aclocal: in=$($*_in)
+sc_diff_automake sc_diff_aclocal: out=$($*_script)
sc_diff_automake sc_diff_aclocal: sc_diff_% :
@set +e; \
in=$*-in.tmp out=$*-out.tmp diffs=$*-diffs.tmp \
- && sed '/^#!.*[pP]rototypes/d' $(srcdir)/$*.in > $$in \
- && sed '/^# BEGIN.* PROTO/,/^# END.* PROTO/d' $* > $$out \
+ && sed '/^#!.*[pP]rototypes/d' $(in) > $$in \
+ && sed '/^# BEGIN.* PROTO/,/^# END.* PROTO/d' $(out) > $$out \
&& { diff -u $$in $$out > $$diffs; test $$? -eq 1; } \
&& added=`grep -v '^+++ ' $$diffs | grep -c '^+'` \
&& removed=`grep -v '^--- ' $$diffs | grep -c '^-'` \
&& test $$added,$$removed = $($*_diff_no),$($*_diff_no) \
|| { \
- echo "Found unexpected diffs between $*.in and $*"; \
+ echo "Found unexpected diffs between $(in) and $(out)"; \
echo "Lines added: $$added" ; \
echo "Lines removed: $$removed"; \
cat $$diffs; \
## We never want to use "undef", only "delete", but for $/.
sc_perl_no_undef:
- @if grep -n -w 'undef ' $(srcdir)/automake.in | \
+ @if grep -n -w 'undef ' $(automake_in) | \
grep -F -v 'undef $$/'; then \
- echo "Found undef in automake.in; use delete instead" 1>&2; \
+ echo "Found 'undef' in the lines above; use 'delete' instead" 1>&2; \
exit 1; \
fi
## We never want split (/ /,...), only split (' ', ...).
sc_perl_no_split_regex_space:
- @if grep -n 'split (/ /' $(srcdir)/automake.in; then \
+ @if grep -n 'split (/ /' $(automake_in) $(acloca_in); then \
echo "Found bad split in the lines above." 1>&2; \
exit 1; \
fi
## Look for cd within backquotes
sc_cd_in_backquotes:
- @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in $(ams); then \
+ @if grep -n '^[^#]*` *cd ' $(automake_in) $(ams); then \
echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
exit 1; \
fi
## Look for cd to a relative directory (may be influenced by CDPATH).
## Skip some known directories that are OK.
sc_cd_relative_dir:
- @if grep -n '^[^#]*cd ' $(srcdir)/automake.in $(ams) | \
+ @if grep -n '^[^#]*cd ' $(automake_in) $(ams) | \
grep -v 'echo.*cd ' | \
grep -v 'am__cd =' | \
grep -v '^[^#]*cd [./]' | \
## Using @_ in a scalar context is most probably a programming error.
sc_perl_at_uscore_in_scalar_context:
- @if grep -Hn '[^@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' $(srcdir)/automake.in; then \
+ @if grep -Hn '[^%@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' \
+ $(automake_in) $(aclocal_in); then \
echo "Using @_ in a scalar context in the lines above." 1>&2; \
exit 1; \
fi
-## Allow only few variables to be localized in Automake.
+## Allow only few variables to be localized in automake and aclocal.
sc_perl_local:
- @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' $(srcdir)/automake.in | \
- grep '^[ \t]*local [^*]'; then \
+ @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' \
+ $(automake_in) $(aclocal_in) | \
+ grep '^[ \t]*local [^*]'; then \
echo "Please avoid 'local'." 1>&2; \
exit 1; \
fi
## Don't let AMDEP_TRUE substitution appear in automake.in.
sc_AMDEP_TRUE_in_automake_in:
- @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
+ @if grep '@AMDEP''_TRUE@' $(automake_in); then \
echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
exit 1; \
fi
## Recursive make invocations should always pass $(AM_MAKEFLAGS)
## to $(MAKE), for portability to non-GNU make.
sc_tests_make_without_am_makeflags:
- @if grep '^[^#].*(MAKE) ' $(ams) $(srcdir)/automake.in \
+ @if grep '^[^#].*(MAKE) ' $(ams) $(automake_in) \
| grep -v 'AM_MAKEFLAGS' \
| grep -v '/am/header-vars\.am:.*am--echo.*| $$(MAKE) -f *-'; \
then \
exit 1; \
fi
-$(syntax_check_rules): automake aclocal
+$(syntax_check_rules): bin/automake bin/aclocal
maintainer-check: $(syntax_check_rules)
.PHONY: maintainer-check $(syntax_check_rules)
# Check that we are running from a proper directory: last thing we want
# is to overwrite some random user files.
-test -f ../../automake && test -f ../../runtest && test -d ../../t \
+test -f ../../bin/automake && test -f ../../runtest && test -d ../../t \
|| fatal_ "running from a wrong directory"
test ! -f Makefile.am || mv Makefile.am Makefile.am~ \
'--automake-acdir=@abs_top_srcdir@/m4',
'--system-acdir=@abs_top_srcdir@/m4/acdir';
}
-require '@abs_top_builddir@/aclocal';
+require '@abs_top_builddir@/bin/aclocal';
if '@srcdir@' ne '.';
unshift @ARGV, '--libdir=@abs_top_srcdir@/lib';
}
-require '@abs_top_builddir@/automake';
+require '@abs_top_builddir@/bin/automake';