* automake.in (read_am_file): Removed debugging code.
[automake.git] / remake-hdr.am
blobc6d5c33046bba0e61f0c951d7b71b81c86d26eea
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2001
3 ## Free Software Foundation, Inc.
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.
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, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 ## 02111-1307, USA.
19 %CONFIG_HEADER%: %STAMP%
20 ## Recover from removal of CONFIG_HEADER
21         @if test ! -f $@; then \
22                 rm -f %STAMP%; \
23                 $(MAKE) %STAMP%; \
24         else :; fi
25 ## Explicitly look in srcdir for benefit of non-GNU makes.
26 %STAMP%: $(srcdir)/%CONFIG_HEADER_IN% $(top_builddir)/config.status
27         @rm -f %STAMP% %STAMP%T
28 ## We used to try to get a real timestamp here.  But the fear is that
29 ## that will cause unnecessary cvs conflicts
30         @echo timestamp > %STAMP%T 2> /dev/null
31         cd $(top_builddir) \
32           && CONFIG_FILES= CONFIG_HEADERS=%CONFIG_HEADER_FULL% \
33              $(SHELL) ./config.status
34 ## Creating the timestamp first, and moving it later, helps ensure that
35 ## it will be older than the header file, avoiding needless triggering
36 ## of the rebuild rule.
37         @mv %STAMP%T %STAMP%
38 ## Explicitly look in srcdir for benefit of non-GNU makes.
39 ## SRC_STAMP takes into account a possible subdir where CONFIG_HEADER_IN is
40 $(srcdir)/%CONFIG_HEADER_IN%: %MAINTAINER-MODE% $(srcdir)/%SRC_STAMP%.in
41 ## Recover from removal of CONFIG_HEADER_IN
42         @if test ! -f $@; then \
43                 rm -f $(srcdir)/%SRC_STAMP%.in; \
44                 $(MAKE) $(srcdir)/%SRC_STAMP%.in; \
45         else :; fi
46 $(srcdir)/%SRC_STAMP%.in: $(top_srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4) %FILES%
47         @rm -f $(srcdir)/%SRC_STAMP%.in $(srcdir)/%SRC_STAMP%.inT
48 ## We used to try to get a real timestamp here.  But the fear is that
49 ## that will cause unnecessary cvs conflicts
50         @echo timestamp > $(srcdir)/%SRC_STAMP%.inT 2> /dev/null
51         cd $(top_srcdir) && $(AUTOHEADER)
52 ## Creating the timestamp first, and moving it later, helps ensure that
53 ## it will be older than the header file, avoiding needless triggering
54 ## of the rebuild rule.
55         @mv $(srcdir)/%SRC_STAMP%.inT $(srcdir)/%SRC_STAMP%.in