Merge branch 'micro' into maint
[platform/upstream/automake.git] / doc / Makefile.inc
1 ## Included by top-level Makefile for Automake.
2
3 ## Copyright (C) 1995-2013 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.
14 ##
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/>.
17
18 ## ---------------- ##
19 ##  Documentation.  ##
20 ## ---------------- ##
21
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
25
26 man1_MANS = \
27   %D%/aclocal.1 \
28   %D%/automake.1 \
29   %D%/aclocal-$(APIVERSION).1 \
30   %D%/automake-$(APIVERSION).1
31
32 $(man1_MANS): $(top_srcdir)/configure.ac
33
34 CLEANFILES += $(man1_MANS)
35 EXTRA_DIST += %D%/help2man
36
37 update_mans = \
38   $(AM_V_GEN): \
39     && $(MKDIR_P) %D% \
40     && $(extend_PATH) \
41     && $(PERL) $(srcdir)/%D%/help2man --output=$@
42
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" > $@
48
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)
53
54 ## ---------------------------- ##
55 ##  Example package "amhello".  ##
56 ## ---------------------------- ##
57
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
64
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
75
76 dist_noinst_DATA += $(amhello_sources)
77 dist_doc_DATA = $(srcdir)/%D%/amhello-1.0.tar.gz
78
79 setup_autotools_paths = { \
80   $(extend_PATH) \
81     && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
82     && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
83     && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
84     && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
85     && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
86     && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
87     && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
88     && true; \
89 }
90
91 # We depend on configure.ac so that we regenerate the tarball
92 # whenever the Automake version changes.
93 $(srcdir)/%D%/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
94         $(AM_V_GEN)tmp=amhello-output.tmp \
95           && $(am__cd) $(srcdir)/%D%/amhello \
96           && : Make our aclocal and automake avaiable before system ones. \
97           && $(setup_autotools_paths) \
98           && ( \
99             { $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \
100               && $(am_AUTORECONF) -vfi \
101               && ./configure \
102               && $(MAKE) $(AM_MAKEFLAGS) distcheck \
103               && $(MAKE) $(AM_MAKEFLAGS) distclean \
104               || { \
105                 if $(AM_V_P); then :; else \
106                   echo "$@: recipe failed." >&5; \
107                   echo "See file '`pwd`/$$tmp' for details" >&5; \
108                 fi; \
109                 exit 1; \
110               } \
111           ) \
112           && rm -rf $(amhello_configury) $$tmp \
113           && mv -f amhello-1.0.tar.gz ..
114
115
116 # vim: ft=automake noet