diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-09 11:17:47 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-09 11:17:47 +0200 |
commit | c8f106c772e608b25aa6a3aa8eeeb0119e097ab2 (patch) | |
tree | b920b5acc653a716b5ef84b461d79fd022c278f2 /lib | |
parent | 1667d369091fe41d2bbdf645490a29d45142556f (diff) | |
download | automake-c8f106c772e608b25aa6a3aa8eeeb0119e097ab2.tar.gz |
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 <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Automake/Makefile.inc | 57 | ||||
-rw-r--r-- | lib/Makefile.inc | 68 | ||||
-rw-r--r-- | lib/am/Makefile.inc | 65 |
3 files changed, 190 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>. + +## ---------------------------------------------------- ## +## 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 <http://www.gnu.org/licenses/>. + +## -------------------------------------------------------------------- ## +## 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 <http://www.gnu.org/licenses/>. + +## --------------------- ## +## 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 |