summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-05-09 11:17:47 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-05-09 11:17:47 +0200
commitc8f106c772e608b25aa6a3aa8eeeb0119e097ab2 (patch)
treeb920b5acc653a716b5ef84b461d79fd022c278f2 /doc
parent1667d369091fe41d2bbdf645490a29d45142556f (diff)
downloadautomake-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 'doc')
-rw-r--r--doc/Makefile.inc116
1 files changed, 116 insertions, 0 deletions
diff --git a/doc/Makefile.inc b/doc/Makefile.inc
new file mode 100644
index 000000000..8515a5d5a
--- /dev/null
+++ b/doc/Makefile.inc
@@ -0,0 +1,116 @@
+## 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/>.
+
+## ---------------- ##
+## Documentation. ##
+## ---------------- ##
+
+info_TEXINFOS = %D%/automake.texi %D%/automake-history.texi
+doc_automake_TEXINFOS = %D%/fdl.texi
+doc_automake_history_TEXINFOS = %D%/fdl.texi
+
+man1_MANS = \
+ %D%/aclocal.1 \
+ %D%/automake.1 \
+ %D%/aclocal-$(APIVERSION).1 \
+ %D%/automake-$(APIVERSION).1
+
+$(man1_MANS): $(top_srcdir)/configure.ac
+
+CLEANFILES += $(man1_MANS)
+EXTRA_DIST += %D%/help2man
+
+update_mans = \
+ $(AM_V_GEN): \
+ && $(MKDIR_P) %D% \
+ && $(extend_PATH) \
+ && $(PERL) $(srcdir)/%D%/help2man --output=$@
+
+%D%/aclocal.1 %D%/automake.1:
+ $(AM_V_GEN): \
+ && $(MKDIR_P) %D% \
+ && f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
+ && echo ".so man1/$$f-$(APIVERSION).1" > $@
+
+%D%/aclocal-$(APIVERSION).1: aclocal.in aclocal lib/Automake/Config.pm
+ $(update_mans) aclocal-$(APIVERSION)
+%D%/automake-$(APIVERSION).1: automake.in automake lib/Automake/Config.pm
+ $(update_mans) automake-$(APIVERSION)
+
+## ---------------------------- ##
+## Example package "amhello". ##
+## ---------------------------- ##
+
+amhello_sources = \
+ %D%/amhello/configure.ac \
+ %D%/amhello/Makefile.am \
+ %D%/amhello/README \
+ %D%/amhello/src/main.c \
+ %D%/amhello/src/Makefile.am
+
+amhello_configury = \
+ aclocal.m4 \
+ autom4te.cache \
+ Makefile.in \
+ config.h.in \
+ configure \
+ depcomp \
+ install-sh \
+ missing \
+ src/Makefile.in
+
+dist_noinst_DATA += $(amhello_sources)
+dist_doc_DATA = $(srcdir)/%D%/amhello-1.0.tar.gz
+
+setup_autotools_paths = { \
+ $(extend_PATH) \
+ && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
+ && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
+ && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
+ && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
+ && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
+ && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
+ && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
+ && true; \
+}
+
+# We depend on configure.ac so that we regenerate the tarball
+# whenever the Automake version changes.
+$(srcdir)/%D%/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
+ $(AM_V_GEN)tmp=amhello-output.tmp \
+ && $(am__cd) $(srcdir)/%D%/amhello \
+ && : Make our aclocal and automake avaiable before system ones. \
+ && $(setup_autotools_paths) \
+ && ( \
+ { $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \
+ && $(am_AUTORECONF) -vfi \
+ && ./configure \
+ && $(MAKE) $(AM_MAKEFLAGS) distcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) distclean \
+ || { \
+ if $(AM_V_P); then :; else \
+ echo "$@: recipe failed." >&5; \
+ echo "See file '`pwd`/$$tmp' for details" >&5; \
+ fi; \
+ exit 1; \
+ } \
+ ) \
+ && rm -rf $(amhello_configury) $$tmp \
+ && mv -f amhello-1.0.tar.gz ..
+
+
+# vim: ft=automake noet