From c8f106c772e608b25aa6a3aa8eeeb0119e097ab2 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 9 May 2013 11:17:47 +0200 Subject: build: break up monolithic Makefile.am in subdir-specific fragments This is convenient to do, now that we have improved "relative directory" support with the '%reladir%' (a.k.a. '%D%') and '%canon_reladir%' (a.k.a. '%C%') Automake-time substitutions for included makefile fragments. This move also satisfy our philosophy of using new Automake features in our own build system, as a way of facilitating early discovery of possible bugs or interface warts. * Makefile.am: Break up ... * doc/Makefile.inc, lib/Automake/Makefile.inc, lib/Makefile.inc, lib/am/Makefile.inc, m4/Makefile.inc, t/Makefile.inc): ... in this new included fragments. Adjust as needed, and make deliberate use of the '%D%' substitution. * contrib/t/local.am: Rename ... * contrib/t/Makefile.inc: ... like this. Signed-off-by: Stefano Lattarini --- lib/Automake/Makefile.inc | 57 +++++++++++++++++++++++++++++++++++++++ lib/Makefile.inc | 68 +++++++++++++++++++++++++++++++++++++++++++++++ lib/am/Makefile.inc | 65 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 lib/Automake/Makefile.inc create mode 100644 lib/Makefile.inc create mode 100644 lib/am/Makefile.inc (limited to 'lib') diff --git a/lib/Automake/Makefile.inc b/lib/Automake/Makefile.inc new file mode 100644 index 000000000..48b15231f --- /dev/null +++ b/lib/Automake/Makefile.inc @@ -0,0 +1,57 @@ +## Included by top-level Makefile for Automake. + +## 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 . + +## ---------------------------------------------------- ## +## Private perl modules used by automake and aclocal. ## +## ---------------------------------------------------- ## + +perllibdir = $(pkgvdatadir)/Automake + +dist_perllib_DATA = \ + %D%/ChannelDefs.pm \ + %D%/Channels.pm \ + %D%/Condition.pm \ + %D%/Configure_ac.pm \ + %D%/DisjConditions.pm \ + %D%/FileUtils.pm \ + %D%/General.pm \ + %D%/Getopt.pm \ + %D%/Item.pm \ + %D%/ItemDef.pm \ + %D%/Language.pm \ + %D%/Location.pm \ + %D%/Options.pm \ + %D%/Rule.pm \ + %D%/RuleDef.pm \ + %D%/Variable.pm \ + %D%/VarDef.pm \ + %D%/Version.pm \ + %D%/XFile.pm \ + %D%/Wrap.pm + +nodist_perllib_DATA = %D%/Config.pm +CLEANFILES += $(nodist_perllib_DATA) + +%D%/Config.pm: %D%/Config.in Makefile + $(AM_V_at)rm -f $@ $@-t + $(AM_V_at)$(MKDIR_P) %D% + $(AM_V_GEN)in=Config.in \ + && $(do_subst) <$(srcdir)/%D%/Config.in >$@-t + $(generated_file_finalize) +EXTRA_DIST += %D%/Config.in + +# vim: ft=automake noet diff --git a/lib/Makefile.inc b/lib/Makefile.inc new file mode 100644 index 000000000..d1971f55f --- /dev/null +++ b/lib/Makefile.inc @@ -0,0 +1,68 @@ +## Included by top-level Makefile for Automake. + +## 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 . + +## -------------------------------------------------------------------- ## +## Auxiliary scripts and files for use with "automake --add-missing". ## +## -------------------------------------------------------------------- ## + +dist_pkgvdata_DATA = \ + %D%/COPYING \ + %D%/INSTALL \ + %D%/texinfo.tex + +# These must all be executable when installed. However, if we use +# _SCRIPTS, then the program transform will be applied, which is not +# what we want. So we make them executable by hand. +dist_script_DATA = \ + %D%/config.guess \ + %D%/config.sub \ + %D%/install-sh \ + %D%/mdate-sh \ + %D%/missing \ + %D%/mkinstalldirs \ + %D%/ylwrap \ + %D%/depcomp \ + %D%/compile \ + %D%/py-compile \ + %D%/ar-lib \ + %D%/test-driver \ + %D%/tap-driver.sh \ + %D%/tap-driver.pl + +install-data-hook: + @$(POST_INSTALL) + @for f in $(dist_script_DATA); do echo $$f; done \ + | sed 's,^%D%/,,' \ + | ( st=0; \ + while read f; do \ + echo " chmod +x '$(DESTDIR)$(scriptdir)/$$f'"; \ + chmod +x "$(DESTDIR)$(scriptdir)/$$f" || st=1; \ + done; \ + exit $$st ) + +installcheck-local: installcheck-executable-scripts +installcheck-executable-scripts: + @for f in $(dist_script_DATA); do echo $$f; done \ + | sed 's,^%D%/,,' \ + | while read f; do \ + path="$(pkgvdatadir)/$$f"; \ + test -x "$$path" || echo $$path; \ + done \ + | sed 's/$$/: not executable/' \ + | grep . 1>&2 && exit 1; exit 0 + +# vim: ft=automake noet diff --git a/lib/am/Makefile.inc b/lib/am/Makefile.inc new file mode 100644 index 000000000..da9468284 --- /dev/null +++ b/lib/am/Makefile.inc @@ -0,0 +1,65 @@ +## Included by top-level Makefile for Automake. + +## 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 . + +## --------------------- ## +## Makefile fragments. ## +## --------------------- ## + +amdir = @amdir@ + +dist_am_DATA = \ + %D%/check.am \ + %D%/check2.am \ + %D%/clean-hdr.am \ + %D%/clean.am \ + %D%/compile.am \ + %D%/configure.am \ + %D%/data.am \ + %D%/dejagnu.am \ + %D%/depend.am \ + %D%/depend2.am \ + %D%/distdir.am \ + %D%/footer.am \ + %D%/header-vars.am \ + %D%/header.am \ + %D%/install.am \ + %D%/inst-vars.am \ + %D%/java.am \ + %D%/lang-compile.am \ + %D%/lex.am \ + %D%/library.am \ + %D%/libs.am \ + %D%/libtool.am \ + %D%/lisp.am \ + %D%/ltlib.am \ + %D%/ltlibrary.am \ + %D%/mans-vars.am \ + %D%/mans.am \ + %D%/program.am \ + %D%/progs.am \ + %D%/python.am \ + %D%/remake-hdr.am \ + %D%/scripts.am \ + %D%/subdirs.am \ + %D%/tags.am \ + %D%/texi-vers.am \ + %D%/texibuild.am \ + %D%/texinfos.am \ + %D%/vala.am \ + %D%/yacc.am + +# vim: ft=automake noet -- cgit v1.2.1 From ce70cf4b95a486f712fab0af865f6c005139fafe Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 9 May 2013 11:57:20 +0200 Subject: build: move automake and aclocal in 'bin' subdir * 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 --- lib/gen-perl-protos | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100755 lib/gen-perl-protos (limited to 'lib') diff --git a/lib/gen-perl-protos b/lib/gen-perl-protos deleted file mode 100755 index 9e73d8d7a..000000000 --- a/lib/gen-perl-protos +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env perl -# -# Copyright (C) 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 3, 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 . - -use warnings; -use strict; - -my @lines = <>; -my @protos = map { /^(sub \w+\s*\(.*\))/ ? ("$1;") : () } @lines; - -while (defined ($_ = shift @lines)) - { - if (/^#!.* prototypes/i) - { - print "# BEGIN AUTOMATICALLY GENERATED PROTOTYPES\n"; - print join ("\n", sort @protos) . "\n"; - print "# END AUTOMATICALLY GENERATED PROTOTYPES\n"; - } - else - { - print; - } - } -- cgit v1.2.1