1 | ## automake - create Makefile.in from Makefile.am
|
---|
2 | ## Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
---|
3 |
|
---|
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)
|
---|
7 | ## any later version.
|
---|
8 |
|
---|
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.
|
---|
13 |
|
---|
14 | ## You should have received a copy of the GNU General Public License
|
---|
15 | ## along with this program; if not, write to the Free Software
|
---|
16 | ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
---|
17 | ## 02111-1307, USA.
|
---|
18 |
|
---|
19 | ## --------------------- ##
|
---|
20 | ## Building Makefile.*. ##
|
---|
21 | ## --------------------- ##
|
---|
22 |
|
---|
23 | ## This rule remakes the Makefile.in.
|
---|
24 | %MAKEFILE-IN%: %MAINTAINER-MODE% %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4)
|
---|
25 | cd $(top_srcdir) && \
|
---|
26 | $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%
|
---|
27 |
|
---|
28 | ## This rule remakes the Makefile.
|
---|
29 | %MAKEFILE%: %MAINTAINER-MODE% %MAKEFILE-IN% %MAKEFILE-DEPS% $(top_builddir)/config.status
|
---|
30 | ## FIXME: $(am__depfiles_maybe) lets us re-run the rule to create the
|
---|
31 | ## .P files. Ideally we wouldn't have to do this by hand.
|
---|
32 | cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe)
|
---|
33 |
|
---|
34 | DIST_COMMON += %MAKEFILE-AM% %MAKEFILE-IN%
|
---|
35 |
|
---|
36 |
|
---|
37 | ## --------------------------- ##
|
---|
38 | ## config.status & configure. ##
|
---|
39 | ## --------------------------- ##
|
---|
40 |
|
---|
41 | if %?TOPDIR_P%
|
---|
42 | ## Explicitly look in srcdir for benefit of non-GNU makes.
|
---|
43 | ## Use `$(top_builddir)' for the benefit of Tru64 v5.1 make and also
|
---|
44 | ## NetBSD v1.5 make. These `make's don't know that
|
---|
45 | ## `$(top_builddir)/config.status' and `config.status' are the same
|
---|
46 | ## file when top_builddir==`.'.
|
---|
47 | $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
---|
48 | $(SHELL) ./config.status --recheck
|
---|
49 |
|
---|
50 | ## Always require configure.ac and configure at top level, even if they
|
---|
51 | ## don't exist. This is especially important for configure, since it
|
---|
52 | ## won't be created until autoconf is run -- which might be after
|
---|
53 | ## automake is run.
|
---|
54 | DIST_COMMON += $(srcdir)/configure %CONFIGURE-AC%
|
---|
55 |
|
---|
56 | ## Explicitly look in srcdir for benefit of non-GNU makes.
|
---|
57 | $(srcdir)/configure: %MAINTAINER-MODE% $(srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
---|
58 | cd $(srcdir) && $(AUTOCONF)
|
---|
59 | endif %?TOPDIR_P%
|
---|
60 |
|
---|
61 |
|
---|
62 |
|
---|
63 | ## ------------ ##
|
---|
64 | ## aclocal.m4. ##
|
---|
65 | ## ------------ ##
|
---|
66 |
|
---|
67 | if %?TOPDIR_P%
|
---|
68 | if %?REGEN-ACLOCAL-M4%
|
---|
69 | $(ACLOCAL_M4): %MAINTAINER-MODE% %CONFIGURE-AC% %ACLOCAL_M4_DEPS%
|
---|
70 | cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
---|
71 | endif %?REGEN-ACLOCAL-M4%
|
---|
72 | endif %?TOPDIR_P%
|
---|
73 |
|
---|
74 |
|
---|
75 | ## --------- ##
|
---|
76 | ## cleanup. ##
|
---|
77 | ## --------- ##
|
---|
78 |
|
---|
79 |
|
---|
80 | ## We special-case config.status here. If we do it as part of the
|
---|
81 | ## normal clean processing for this directory, then it might be
|
---|
82 | ## removed before some subdir is cleaned. However, that subdir's
|
---|
83 | ## Makefile depends on config.status.
|
---|
84 |
|
---|
85 | if %?TOPDIR_P%
|
---|
86 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
---|
87 | configure.lineno
|
---|
88 | distclean:
|
---|
89 | -rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
---|
90 |
|
---|
91 | ## Note: you might think we should remove Makefile.in, configure, or
|
---|
92 | ## aclocal.m4 here in a maintainer-clean rule. However, the GNU
|
---|
93 | ## Coding Standards explicitly prohibit this.
|
---|
94 |
|
---|
95 | maintainer-clean:
|
---|
96 | -rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
---|
97 | ## autom4te.cache is created by Autoconf; the only valid target to
|
---|
98 | ## remove it is maintainer-clean, not distclean.
|
---|
99 | ## If you have an autom4te.cache that cause distcheck to fail, then
|
---|
100 | ## it is good news: you finally discovered that autoconf and/or
|
---|
101 | ## autoheader is needed to use your tarball, which is wrong.
|
---|
102 | -rm -rf $(top_srcdir)/autom4te.cache
|
---|
103 |
|
---|
104 |
|
---|
105 | endif %?TOPDIR_P%
|
---|