diff options
| -rw-r--r-- | Makefile | 16 | ||||
| -rw-r--r-- | scripts/mkmakefile | 5 |
2 files changed, 11 insertions, 10 deletions
| @@ -344,16 +344,14 @@ scripts_basic: | |||
| 344 | scripts/basic/%: scripts_basic ; | 344 | scripts/basic/%: scripts_basic ; |
| 345 | 345 | ||
| 346 | PHONY += outputmakefile | 346 | PHONY += 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. |
| 350 | outputmakefile: | 350 | outputmakefile: |
| 351 | $(Q)if test ! $(srctree) -ef $(objtree); then \ | 351 | ifneq ($(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; \ | 354 | endif |
| 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 |
diff --git a/scripts/mkmakefile b/scripts/mkmakefile index a22cbedd3b3e..7f9d544f9b6c 100644 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile | |||
| @@ -10,7 +10,10 @@ | |||
| 10 | # $4 - patchlevel | 10 | # $4 - patchlevel |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | cat << EOF | 13 | test ! -r $2/Makefile -o -O $2/Makefile || exit 0 |
| 14 | echo " GEN $2/Makefile" | ||
| 15 | |||
| 16 | cat << EOF > $2/Makefile | ||
| 14 | # Automatically generated by $0: don't edit | 17 | # Automatically generated by $0: don't edit |
| 15 | 18 | ||
| 16 | VERSION = $3 | 19 | VERSION = $3 |
