aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-05-02 06:33:20 -0400
committerSam Ravnborg <sam@mars.ravnborg.org>2006-05-08 00:55:32 -0400
commitfd5f0cd6b0cef59ba18e5ac13be5b2775fa6ec28 (patch)
tree3ae3209f1846261c9a455339ddcd40d16cd2bf99 /Makefile
parentcc873e1aa1fa916a485294117a9846e668505671 (diff)
kbuild: Do not overwrite makefile as anohter user
Change the conditional of the outputmakefile rule to be evaluated entirely in make, and add a conditional to not touch the generated makefile when e.g. running 'make install' as root while the build was done as non-root. Also adjust the comment describing this, and move the message printing and redirection to mkmakefile. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 7 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 8517f7ba2473..9e4c5692a32f 100644
--- a/Makefile
+++ b/Makefile
@@ -344,16 +344,14 @@ scripts_basic:
344scripts/basic/%: scripts_basic ; 344scripts/basic/%: scripts_basic ;
345 345
346PHONY += outputmakefile 346PHONY += outputmakefile
347# outputmakefile generate a Makefile to be placed in output directory, if 347# outputmakefile generates a Makefile in the output directory, if using a
348# using a seperate output directory. This allows convinient use 348# separate output directory. This allows convenient use of make in the
349# of make in output directory 349# output directory.
350outputmakefile: 350outputmakefile:
351 $(Q)if test ! $(srctree) -ef $(objtree); then \ 351ifneq ($(KBUILD_SRC),)
352 $(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ 352 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
353 $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \ 353 $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
354 > $(objtree)/Makefile; \ 354endif
355 echo ' GEN $(objtree)/Makefile'; \
356 fi
357 355
358# To make sure we do not include .config for any of the *config targets 356# To make sure we do not include .config for any of the *config targets
359# catch them early, and hand them over to scripts/kconfig/Makefile 357# catch them early, and hand them over to scripts/kconfig/Makefile