From: Paul Eggert Date: Sun, 23 Sep 2012 09:18:24 +0000 (-0700) Subject: * Makefile.in (bootstrap): Set MAKEFILE_NAME when building Makefile, X-Git-Tag: emacs-24.2.90~244^2~129 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c462dda8c848d24cf84dd673b93d7ee8c8143b4e;p=emacs.git * Makefile.in (bootstrap): Set MAKEFILE_NAME when building Makefile, to avoid problems with recursion when using GNU make. --- diff --git a/ChangeLog b/ChangeLog index 2b1b2f2915c..c0f40b92c90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-09-23 Paul Eggert + + * Makefile.in (bootstrap): Set MAKEFILE_NAME when building Makefile, + to avoid problems with recursion when using GNU make. + 2012-09-22 Paul Eggert * Makefile.in (bootstrap): Simplify build procedure. diff --git a/Makefile.in b/Makefile.in index 542c30bbab7..571013e3244 100644 --- a/Makefile.in +++ b/Makefile.in @@ -355,6 +355,10 @@ blessmail: Makefile src FRC # config.status overrides MAKEFILE_NAME with a bogus name when creating # src/epaths.h, so that 'make epaths-force' does not recursively invoke # config.status and overwrite config.status while executing it (Bug#11214). +# +# 'make bootstrap' overrides MAKEFILE_NAME to a nonexistent file but +# then attempts to build that file. This forces 'Makefile', 'lib/Makefile', +# etc. to be built without running into similar recursion problems. MAKEFILE_NAME = Makefile $(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \ $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN) @@ -895,7 +899,7 @@ dvi: # * Do the actual build. bootstrap: bootstrap-clean FRC cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; } - $(MAKE) $(MFLAGS) Makefile + $(MAKE) $(MFLAGS) MAKEFILE_NAME=force-Makefile force-Makefile $(MAKE) $(MFLAGS) info all .PHONY: check-declare