Commit d42c6d0f authored by Michael Ellerman's avatar Michael Ellerman

powerpc/Makefile: Mark phony targets as PHONY

Some of our phony targets are not marked as such. This can lead to
confusing errors, eg:

  $ make clean
  $ touch install
  $ make install
  make: 'install' is up to date.
  $

Fix it by adding them to the PHONY variable which is marked phony in
the top-level Makefile, or in scripts/Makefile.build for the boot
Makefile.
Suggested-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Reviewed-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200219000434.15872-1-mpe@ellerman.id.au
parent 6453f9ed
...@@ -298,6 +298,7 @@ $(BOOT_TARGETS2): vmlinux ...@@ -298,6 +298,7 @@ $(BOOT_TARGETS2): vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@) $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
PHONY += bootwrapper_install
bootwrapper_install: bootwrapper_install:
$(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@) $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
...@@ -403,9 +404,11 @@ define archhelp ...@@ -403,9 +404,11 @@ define archhelp
@echo ' (minus the .dts extension).' @echo ' (minus the .dts extension).'
endef endef
PHONY += install
install: install:
$(Q)$(MAKE) $(build)=$(boot) install $(Q)$(MAKE) $(build)=$(boot) install
PHONY += vdso_install
vdso_install: vdso_install:
ifdef CONFIG_PPC64 ifdef CONFIG_PPC64
$(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@ $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@
...@@ -425,6 +428,7 @@ archheaders: ...@@ -425,6 +428,7 @@ archheaders:
ifdef CONFIG_STACKPROTECTOR ifdef CONFIG_STACKPROTECTOR
prepare: stack_protector_prepare prepare: stack_protector_prepare
PHONY += stack_protector_prepare
stack_protector_prepare: prepare0 stack_protector_prepare: prepare0
ifdef CONFIG_PPC64 ifdef CONFIG_PPC64
$(eval KBUILD_CFLAGS += -mstack-protector-guard-offset=$(shell awk '{if ($$2 == "PACA_CANARY") print $$3;}' include/generated/asm-offsets.h)) $(eval KBUILD_CFLAGS += -mstack-protector-guard-offset=$(shell awk '{if ($$2 == "PACA_CANARY") print $$3;}' include/generated/asm-offsets.h))
...@@ -436,10 +440,12 @@ endif ...@@ -436,10 +440,12 @@ endif
ifdef CONFIG_SMP ifdef CONFIG_SMP
prepare: task_cpu_prepare prepare: task_cpu_prepare
PHONY += task_cpu_prepare
task_cpu_prepare: prepare0 task_cpu_prepare: prepare0
$(eval KBUILD_CFLAGS += -D_TASK_CPU=$(shell awk '{if ($$2 == "TASK_CPU") print $$3;}' include/generated/asm-offsets.h)) $(eval KBUILD_CFLAGS += -D_TASK_CPU=$(shell awk '{if ($$2 == "TASK_CPU") print $$3;}' include/generated/asm-offsets.h))
endif endif
PHONY += checkbin
# Check toolchain versions: # Check toolchain versions:
# - gcc-4.6 is the minimum kernel-wide version so nothing required. # - gcc-4.6 is the minimum kernel-wide version so nothing required.
checkbin: checkbin:
......
...@@ -445,6 +445,8 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) ...@@ -445,6 +445,8 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
zInstall: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) zInstall: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $^ sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $^
PHONY += install zInstall
# anything not in $(targets) # anything not in $(targets)
clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \ clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \ zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment