build: Inline perl prototypes in sources
[automake.git] / doc / Makefile.inc
blob807c29308059ff94072c0c0d1292fa7e7e9ce860
1 ## Included by top-level Makefile for Automake.
3 ## Copyright (C) 1995-2017 Free Software Foundation, Inc.
4 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option)
8 ## any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 ## ---------------- ##
19 ##  Documentation.  ##
20 ## ---------------- ##
22 info_TEXINFOS = %D%/automake.texi %D%/automake-history.texi
23 doc_automake_TEXINFOS = %D%/fdl.texi
24 doc_automake_history_TEXINFOS = %D%/fdl.texi
26 man1_MANS = \
27   %D%/aclocal.1 \
28   %D%/automake.1 \
29   %D%/aclocal-$(APIVERSION).1 \
30   %D%/automake-$(APIVERSION).1
32 $(man1_MANS): $(top_srcdir)/configure.ac
34 CLEANFILES += $(man1_MANS)
35 # XXX: This script should be updated with 'fetch' target.
36 EXTRA_DIST += %D%/help2man
38 update_mans = \
39   $(AM_V_GEN): \
40     && $(MKDIR_P) %D% \
41     && ./pre-inst-env $(PERL) $(srcdir)/%D%/help2man --output=$@
43 %D%/aclocal.1 %D%/automake.1:
44         $(AM_V_GEN): \
45           && $(MKDIR_P) %D% \
46           && f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
47           && echo ".so man1/$$f-$(APIVERSION).1" > $@
49 %D%/aclocal-$(APIVERSION).1: $(aclocal_script) lib/Automake/Config.pm
50         $(update_mans) aclocal-$(APIVERSION)
51 %D%/automake-$(APIVERSION).1: $(automake_script) lib/Automake/Config.pm
52         $(update_mans) automake-$(APIVERSION)
54 ## ---------------------------- ##
55 ##  Example package "amhello".  ##
56 ## ---------------------------- ##
58 amhello_sources = \
59   %D%/amhello/configure.ac \
60   %D%/amhello/Makefile.am \
61   %D%/amhello/README \
62   %D%/amhello/src/main.c \
63   %D%/amhello/src/Makefile.am
65 amhello_configury = \
66   aclocal.m4 \
67   autom4te.cache \
68   Makefile.in \
69   config.h.in \
70   configure \
71   depcomp \
72   install-sh \
73   missing \
74   src/Makefile.in
76 dist_noinst_DATA += $(amhello_sources)
77 dist_doc_DATA = $(srcdir)/%D%/amhello-1.0.tar.gz
79 setup_autotools_paths = { \
80   ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
81     && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
82     && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
83     && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
84     && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
85     && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
86     && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
87     && true; \
90 # We depend on configure.ac so that we regenerate the tarball
91 # whenever the Automake version changes.
92 $(srcdir)/%D%/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
93         $(AM_V_GEN)tmp=amhello-output.tmp \
94           && $(am__cd) $(srcdir)/%D%/amhello \
95           && : Make our aclocal and automake avaiable before system ones. \
96           && $(setup_autotools_paths) \
97           && ( \
98             { $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \
99               && $(abs_builddir)/pre-inst-env $(am_AUTORECONF) -vfi \
100               && ./configure \
101               && $(MAKE) $(AM_MAKEFLAGS) distcheck \
102               && $(MAKE) $(AM_MAKEFLAGS) distclean \
103               || { \
104                 if $(AM_V_P); then :; else \
105                   echo "$@: recipe failed." >&5; \
106                   echo "See file '`pwd`/$$tmp' for details" >&5; \
107                 fi; \
108                 exit 1; \
109               } \
110           ) \
111           && rm -rf $(amhello_configury) $$tmp \
112           && mv -f amhello-1.0.tar.gz ..
115 # vim: ft=automake noet