kbuild: replace PHONY with FORCE
.PHONY: does not take patterns so use FORCE to achive same effect. Thanks to "Paul D. Smith" <psmith@gnu.org> for noticing this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
f7b05e64bd
commit
0131705d58
2
Makefile
2
Makefile
|
@ -1000,8 +1000,6 @@ distclean: mrproper
|
||||||
# rpm target kept for backward compatibility
|
# rpm target kept for backward compatibility
|
||||||
package-dir := $(srctree)/scripts/package
|
package-dir := $(srctree)/scripts/package
|
||||||
|
|
||||||
PHONY += %-pkg rpm
|
|
||||||
|
|
||||||
%pkg: FORCE
|
%pkg: FORCE
|
||||||
$(Q)$(MAKE) -f $(package-dir)/Makefile $@
|
$(Q)$(MAKE) -f $(package-dir)/Makefile $@
|
||||||
rpm: FORCE
|
rpm: FORCE
|
||||||
|
|
|
@ -32,12 +32,11 @@ MKSPEC := $(srctree)/scripts/package/mkspec
|
||||||
PREV := set -e; cd ..;
|
PREV := set -e; cd ..;
|
||||||
|
|
||||||
# rpm-pkg
|
# rpm-pkg
|
||||||
PHONY += rpm-pkg rpm
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
$(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile
|
$(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile
|
||||||
$(CONFIG_SHELL) $(MKSPEC) > $@
|
$(CONFIG_SHELL) $(MKSPEC) > $@
|
||||||
|
|
||||||
rpm-pkg rpm: $(objtree)/kernel.spec
|
rpm-pkg rpm: $(objtree)/kernel.spec FORCE
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
$(PREV) ln -sf $(srctree) $(KERNELPATH)
|
$(PREV) ln -sf $(srctree) $(KERNELPATH)
|
||||||
$(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
|
$(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
|
||||||
|
@ -54,11 +53,11 @@ rpm-pkg rpm: $(objtree)/kernel.spec
|
||||||
clean-files := $(objtree)/kernel.spec
|
clean-files := $(objtree)/kernel.spec
|
||||||
|
|
||||||
# binrpm-pkg
|
# binrpm-pkg
|
||||||
PHONY += binrpm-pkg
|
# ---------------------------------------------------------------------------
|
||||||
$(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile
|
$(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile
|
||||||
$(CONFIG_SHELL) $(MKSPEC) prebuilt > $@
|
$(CONFIG_SHELL) $(MKSPEC) prebuilt > $@
|
||||||
|
|
||||||
binrpm-pkg: $(objtree)/binkernel.spec
|
binrpm-pkg: $(objtree)/binkernel.spec FORCE
|
||||||
$(MAKE) KBUILD_SRC=
|
$(MAKE) KBUILD_SRC=
|
||||||
set -e; \
|
set -e; \
|
||||||
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
|
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
|
||||||
|
@ -71,9 +70,7 @@ clean-files += $(objtree)/binkernel.spec
|
||||||
|
|
||||||
# Deb target
|
# Deb target
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
#
|
deb-pkg: FORCE
|
||||||
PHONY += deb-pkg
|
|
||||||
deb-pkg:
|
|
||||||
$(MAKE) KBUILD_SRC=
|
$(MAKE) KBUILD_SRC=
|
||||||
$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
|
$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
|
||||||
|
|
||||||
|
@ -82,8 +79,7 @@ clean-dirs += $(objtree)/debian/
|
||||||
|
|
||||||
# tarball targets
|
# tarball targets
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
PHONY += tar%pkg
|
tar%pkg: FORCE
|
||||||
tar%pkg:
|
|
||||||
$(MAKE) KBUILD_SRC=
|
$(MAKE) KBUILD_SRC=
|
||||||
$(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@
|
$(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@
|
||||||
|
|
||||||
|
@ -92,7 +88,7 @@ clean-dirs += $(objtree)/tar-install/
|
||||||
|
|
||||||
# Help text displayed when executing 'make help'
|
# Help text displayed when executing 'make help'
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
help:
|
help: FORCE
|
||||||
@echo ' rpm-pkg - Build the kernel as an RPM package'
|
@echo ' rpm-pkg - Build the kernel as an RPM package'
|
||||||
@echo ' binrpm-pkg - Build an rpm package containing the compiled kernel'
|
@echo ' binrpm-pkg - Build an rpm package containing the compiled kernel'
|
||||||
@echo ' and modules'
|
@echo ' and modules'
|
||||||
|
|
Loading…
Reference in New Issue