diff options
| author | Paul Eggert | 2012-07-30 13:34:58 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-07-30 13:34:58 -0700 |
| commit | 8f25abd317c64e2a69e1839633382841c3848a2d (patch) | |
| tree | b935c1910d2babd5f8646c8a7654f859420e534f | |
| parent | adff3182ba51523423ce15cf26347c2b8b130826 (diff) | |
| download | emacs-8f25abd317c64e2a69e1839633382841c3848a2d.tar.gz emacs-8f25abd317c64e2a69e1839633382841c3848a2d.zip | |
Do not overwrite config.status while executing it.
* Makefile.in (MAKEFILE_NAME): New macro.
($(MAKEFILE_NAME)): Rename rule from Makefile.
* configure.ac (epaths): Set MAKEFILE_NAME to a bogus value,
so that GNU 'make' isn't tempted to make the Makefile and then
regenerate config.status while config.status is running.
Fixes: debbugs:11214
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | Makefile.in | 7 | ||||
| -rw-r--r-- | configure.ac | 2 |
3 files changed, 14 insertions, 2 deletions
| @@ -1,5 +1,12 @@ | |||
| 1 | 2012-07-30 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2012-07-30 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Do not overwrite config.status while executing it (Bug#11214). | ||
| 4 | * Makefile.in (MAKEFILE_NAME): New macro. | ||
| 5 | ($(MAKEFILE_NAME)): Rename rule from Makefile. | ||
| 6 | * configure.ac (epaths): Set MAKEFILE_NAME to a bogus value, | ||
| 7 | so that GNU 'make' isn't tempted to make the Makefile and then | ||
| 8 | regenerate config.status while config.status is running. | ||
| 9 | |||
| 3 | Update .PHONY listings in makefiles. | 10 | Update .PHONY listings in makefiles. |
| 4 | * Makefile.in (.PHONY): Add all, ${SUBDIR}, blessmail, epath-force, | 11 | * Makefile.in (.PHONY): Add all, ${SUBDIR}, blessmail, epath-force, |
| 5 | FRC, install-arch-dep, install-arch-indep, install-doc, | 12 | FRC, install-arch-dep, install-arch-indep, install-doc, |
diff --git a/Makefile.in b/Makefile.in index 4b9364ac3f4..89c06cce16e 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -350,7 +350,12 @@ blessmail: Makefile src FRC | |||
| 350 | # We used to have one rule per */Makefile.in, but that leads to race | 350 | # We used to have one rule per */Makefile.in, but that leads to race |
| 351 | # conditions with parallel makes, so let's assume that the time stamp on | 351 | # conditions with parallel makes, so let's assume that the time stamp on |
| 352 | # ./Makefile is representative of the time stamp on all the other Makefiles. | 352 | # ./Makefile is representative of the time stamp on all the other Makefiles. |
| 353 | Makefile: config.status $(srcdir)/src/config.in \ | 353 | # |
| 354 | # config.status overrides MAKEFILE_NAME with a bogus name when creating | ||
| 355 | # src/epaths.h, so that 'make epaths-force' does not recursively invoke | ||
| 356 | # config.status and overwrite config.status while executing it (Bug#11214). | ||
| 357 | MAKEFILE_NAME = Makefile | ||
| 358 | $(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \ | ||
| 354 | $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN) | 359 | $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN) |
| 355 | ./config.status | 360 | ./config.status |
| 356 | 361 | ||
diff --git a/configure.ac b/configure.ac index 23833f4913c..a68caca4072 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -4464,7 +4464,7 @@ dnl by configure. This also explains the `move-if-change' test and | |||
| 4464 | dnl the use of force in the `epaths-force' rule in Makefile.in. | 4464 | dnl the use of force in the `epaths-force' rule in Makefile.in. |
| 4465 | AC_CONFIG_COMMANDS([epaths], [ | 4465 | AC_CONFIG_COMMANDS([epaths], [ |
| 4466 | echo creating src/epaths.h | 4466 | echo creating src/epaths.h |
| 4467 | ${MAKE-make} epaths-force | 4467 | ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force |
| 4468 | ], [GCC="$GCC" CPPFLAGS="$CPPFLAGS"]) | 4468 | ], [GCC="$GCC" CPPFLAGS="$CPPFLAGS"]) |
| 4469 | 4469 | ||
| 4470 | AC_CONFIG_COMMANDS([gdbinit], [ | 4470 | AC_CONFIG_COMMANDS([gdbinit], [ |