Reword the copyright notices to match what's suggested in GPLv3.
[automake/plouj.git] / lib / am / remake-hdr.am
blob2d6eaebea50a0a2309580094b4c89f3b20875aee
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2005
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 3, 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, see <http://www.gnu.org/licenses/>.
18 ## Explicitly look in srcdir for benefit of non-GNU makes.
21 %CONFIG_H%: %STAMP%
22 ## Recover from removal of CONFIG_HEADER
23         @if test ! -f $@; then \
24           rm -f %STAMP%; \
25           $(MAKE) $(AM_MAKEFLAGS) %STAMP%; \
26         else :; fi
29 %STAMP%: %CONFIG_H_DEPS% $(top_builddir)/config.status
30         @rm -f %STAMP%
31         cd $(top_builddir) && $(SHELL) ./config.status %CONFIG_H_PATH%
34 ## Only the first file of AC_CONFIG_HEADERS is assumed to be generated
35 ## by autoheader.
36 if %?FIRST%
37 %CONFIG_HIN%: %MAINTAINER-MODE% $(am__configure_deps) %FILES%
38         cd $(top_srcdir) && $(AUTOHEADER)
39 ## Whenever $(AUTOHEADER) has run, we must make sure that
40 ## ./config.status will rebuild config.h.  The dependency from %STAMP%
41 ## on %CONFIG_H_DEPS% (which contains config.hin) is not enough to
42 ## express his.
44 ## There are some tricky cases where this rule will build a
45 ## config.hin which has the same timestamp as %STAMP%, in which case
46 ## ./config.status will not be rerun (meaning that users will use in
47 ## out-of-date config.h without knowing it).  One situation where this
48 ## can occurs is the following:
49 ## 1. the user updates some configure dependency (let's say foo.m4)
50 ##    and run `make'
51 ## 2. the rebuild rules detect that a foo.m4 has changed,
52 ##    run aclocal, autoconf, automake, and then run ./config.status.
53 ##    (Note that autoheader hasn't been called yet, so ./config.status
54 ##    outputs a config.h from an obsolete config.hin.)
55 ## 3. Once Makefile has been regenerated, make continues, and
56 ##    discover that config.h is a dependency of the `all' rule.
57 ##    Because config.h depends on stamp-h1, stamp-h1 depends on
58 ##    config.hin, and config.hin depends on aclocal.m4, make runs
59 ##    autoheader to rebuild config.hin.
60 ## Now make ought to call ./config.status once again to rebuild
61 ## config.h from the new config.hin, but if you have a sufficiently
62 ## fast box, steps 2 and 3 will occur within the same second: the
63 ## config.h/stamp-h1 generated from the outdated config.hin will have
64 ## the same mtime as the new config.hin.  Hence make will think that
65 ## config.h is up to date.
67 ## A solution is to erase %STAMP% here so that the %STAMP% rule
68 ## is always triggered after the this one.
69         rm -f %STAMP%
70 ## Autoheader has the bad habit of not changing the timestamp if
71 ## config.hin is unchanged, which breaks Make targets.  Since what
72 ## must not changed gratuitously is config.h, which is already handled
73 ## by config.status, there is no reason to make things complex for
74 ## config.hin.
75         touch $@
76 endif %?FIRST%