* lib/am/configure.am ($(top_builddir)/config.status): Added
[platform/upstream/automake.git] / lib / am / configure.am
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 2001
3 ## 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, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 ## 02111-1307, USA.
19
20 ## --------------------- ##
21 ## Building Makefile.*.  ##
22 ## --------------------- ##
23
24 ## This rule remakes the Makefile.in.
25 %MAKEFILE-IN%: %MAINTAINER-MODE% %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4)
26         cd $(top_srcdir) && \
27           $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%
28
29 ## This rule remakes the Makefile.
30 %MAKEFILE%: %MAINTAINER-MODE% %MAKEFILE-IN% %MAKEFILE-DEPS% $(top_builddir)/config.status
31         cd $(top_builddir) && \
32           CONFIG_HEADERS= CONFIG_LINKS= \
33           CONFIG_FILES=%CONFIG-MAKEFILE% $(SHELL) ./config.status
34
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 += 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 distclean:
87         -rm -f config.status config.cache config.log
88
89 ## Note: you might think we should remove Makefile.in, configure, or
90 ## aclocal.m4 here in a maintainer-clean rule.  However, the GNU
91 ## Coding Standards explicitly prohibit this.
92 endif %?TOPDIR_P%