1 ## -*- makefile-automake -*-
2 ## Copyright (C) 1995-2025 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program. If not, see <https://www.gnu.org/licenses/>.
17 ## ---------------- ##
19 ## ---------------- ##
21 info_TEXINFOS
= %D
%/automake.texi
%D
%/automake-history.texi
22 doc_automake_TEXINFOS
= %D
%/fdl.texi
23 doc_automake_history_TEXINFOS
= %D
%/fdl.texi
28 %D
%/aclocal-
$(APIVERSION
).1 \
29 %D
%/automake-
$(APIVERSION
).1
31 $(man1_MANS
): $(top_srcdir
)/configure.ac
32 CLEANFILES
+= $(man1_MANS
)
34 # In automake, users generate man pages as part of a normal build from
35 # release tarballs. This is ok because we also distribute the help2man
36 # script, as given below.
38 # Autoconf handles this in an alternative way, of including the man
39 # pages in the tarballs and thus not requiring help2man to be run by
40 # users (q.v.). Neither is better or worse than the other.
42 # See the "Errors with distclean" node in the manual for more info.
44 # XXX: The help2man script we include in the Automake distribution
45 # should be updated with 'fetch' target, but isn't. Instead, you must
46 # build help2man normally and copy it in manually. Keep the first line as:
48 # whatever it might have ended up as on your system.
49 EXTRA_DIST
+= %D
%/help2man
53 && AUTOMAKE_HELP2MAN
=true .
/pre-inst-env \
54 $(PERL
) $(srcdir)/%D
%/help2man
--output
=$@
--info-page
=automake \
55 --name
="$${HELP2MAN_NAME}"
57 %D
%/aclocal
.1 %D
%/automake
.1:
60 && f
=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
61 && echo
".so man1/$$f-$(APIVERSION).1" > $@
63 %D
%/aclocal-
$(APIVERSION
).1: $(aclocal_script
) lib
/Automake
/Config.pm
64 $(AM_V_GEN
):; HELP2MAN_NAME
="Generate aclocal.m4 by scanning configure.ac"; export HELP2MAN_NAME
; $(update_mans
) $(aclocal_script
)
65 %D
%/automake-
$(APIVERSION
).1: $(automake_script
) lib
/Automake
/Config.pm
66 $(AM_V_GEN
):; HELP2MAN_NAME
="Generate Makefile.in files for configure from Makefile.am"; export HELP2MAN_NAME
; $(update_mans
) $(automake_script
)
68 ## This checklinkx target is not invoked as a dependency of anything.
69 ## It exists merely to make checking the links in automake.texi (that is,
70 ## automake.html) more convenient. We use a slightly-enhanced version of
71 ## W3C checklink to do this. We intentionally do not have automake.html
72 ## as a dependency, as it seems more convenient to have its regeneration
73 ## under manual control. See https://debbugs.gnu.org/10371.
75 checklinkx
= $(top_srcdir
)/contrib
/checklinkx
76 # that particular sleep seems to be what gnu.org likes.
77 chlx_args
= -v
--sleep
8 #--exclude-url-file=/tmp/xf
78 # Explanation of excludes:
79 # - w3.org dtds, they are fine (and slow).
80 # - mailto urls, they are always forbidden.
81 # - vala, redirects to a Gnome subpage and returns 403 to us.
82 # - cfortran, forbidden by site's robots.txt.
83 # - debbugs.gnu.org/automake, forbidden by robots.txt.
84 # - autoconf.html, forbidden by robots.txt (since served from savannah).
85 # - https://fsf.org redirects to https://www.fsf.org and nothing to do
86 # (it's in the FDL). --suppress-redirect options do not suppress the msg.
89 -X
'http.*w3\.org/.*dtd' \
91 -X
'https://www\.vala-project\.org/' \
92 -X
'https://www-zeus\.desy\.de/~burow/cfortran/' \
93 -X
'https://debbugs\.gnu\.org/automake' \
94 -X
'https://www\.gnu\.org/software/autoconf/manual/autoconf\.html' \
95 -X
'https://fsf\.org/'
96 chlx_file
= $(top_srcdir
)/doc
/automake.html
99 $(checklinkx
) $(chlx_args
) $(chlx_excludes
) $(chlx_file
)
101 ## ---------------------------- ##
102 ## Example package "amhello". ##
103 ## ---------------------------- ##
106 %D
%/amhello
/configure.ac \
107 %D
%/amhello
/Makefile.am \
109 %D
%/amhello
/src
/main.c \
110 %D
%/amhello
/src
/Makefile.am
112 amhello_configury
= \
123 dist_noinst_DATA
+= $(amhello_sources
)
124 dist_doc_DATA
= $(srcdir)/%D
%/amhello-1.0.
tar.gz
126 setup_autotools_paths
= { \
127 ACLOCAL
=aclocal-
$(APIVERSION
) && export ACLOCAL \
128 && AUTOMAKE
=automake-
$(APIVERSION
) && export AUTOMAKE \
129 && AUTOCONF
='$(am_AUTOCONF)' && export AUTOCONF \
130 && AUTOM4TE
='$(am_AUTOM4TE)' && export AUTOM4TE \
131 && AUTORECONF
='$(am_AUTORECONF)' && export AUTORECONF \
132 && AUTOHEADER
='$(am_AUTOHEADER)' && export AUTOHEADER \
133 && AUTOUPDATE
='$(am_AUTOUPDATE)' && export AUTOUPDATE \
137 # We depend on configure.ac so that we regenerate the tarball
138 # whenever the Automake version changes.
139 $(srcdir)/%D
%/amhello-1.0.
tar.gz
: $(amhello_sources
) $(srcdir)/configure.ac
140 $(AM_V_GEN
)tmp
=amhello-output.tmp \
141 && $(am__cd
) $(srcdir)/%D
%/amhello \
142 && : Make our aclocal and automake available before system ones. \
143 && $(setup_autotools_paths
) \
145 { $(AM_V_P
) || exec
5>&2 >$$tmp 2>&1; } \
146 && $(abs_builddir
)/pre-inst-env
$(am_AUTORECONF
) -vfi \
148 && $(MAKE
) $(AM_MAKEFLAGS
) distcheck \
149 && $(MAKE
) $(AM_MAKEFLAGS
) distclean \
151 if
$(AM_V_P
); then
:; else \
152 echo
"$@: recipe failed." >&5; \
153 echo
"See file '`pwd`/$$tmp' for details" >&5; \
158 && rm -rf
$(amhello_configury
) $$tmp \
159 && mv
-f amhello-1.0.
tar.gz ..
162 # vim: ft=automake noet