rpm-pkg: Always regenerate the specfile
The *pkg targets are always run, so it makes no sense to cache the generated specfile. This also fixes build errors when the specfile becomes out of date, without the Makefile noticing it: $ make rpm works $ echo yadadada >localversion-test $ make rpm fails, because kernel.spec assumes the old kernel release string Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
parent
403d3cc473
commit
6501320311
|
@ -35,10 +35,7 @@ MKSPEC := $(srctree)/scripts/package/mkspec
|
||||||
|
|
||||||
# rpm-pkg
|
# rpm-pkg
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
$(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile
|
rpm-pkg rpm: FORCE
|
||||||
$(CONFIG_SHELL) $(MKSPEC) > $@
|
|
||||||
|
|
||||||
rpm-pkg rpm: $(objtree)/kernel.spec FORCE
|
|
||||||
@if test "$(objtree)" != "$(srctree)"; then \
|
@if test "$(objtree)" != "$(srctree)"; then \
|
||||||
echo "Building source + binary RPM is not possible outside the"; \
|
echo "Building source + binary RPM is not possible outside the"; \
|
||||||
echo "kernel source tree. Don't set KBUILD_OUTPUT, or use the"; \
|
echo "kernel source tree. Don't set KBUILD_OUTPUT, or use the"; \
|
||||||
|
@ -47,6 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE
|
||||||
fi
|
fi
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
ln -sf $(srctree) $(KERNELPATH)
|
ln -sf $(srctree) $(KERNELPATH)
|
||||||
|
$(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
|
||||||
$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion
|
$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion
|
||||||
tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(TAR_CONTENT)
|
tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(TAR_CONTENT)
|
||||||
rm $(KERNELPATH)
|
rm $(KERNELPATH)
|
||||||
|
@ -56,17 +54,13 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE
|
||||||
set -e; \
|
set -e; \
|
||||||
mv -f $(objtree)/.tmp_version $(objtree)/.version
|
mv -f $(objtree)/.tmp_version $(objtree)/.version
|
||||||
$(RPM) $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
|
$(RPM) $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
|
||||||
rm $(KERNELPATH).tar.gz
|
rm $(KERNELPATH).tar.gz kernel.spec
|
||||||
|
|
||||||
clean-files := $(objtree)/kernel.spec
|
|
||||||
|
|
||||||
# binrpm-pkg
|
# binrpm-pkg
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
$(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile
|
binrpm-pkg: FORCE
|
||||||
$(CONFIG_SHELL) $(MKSPEC) prebuilt > $@
|
|
||||||
|
|
||||||
binrpm-pkg: $(objtree)/binkernel.spec FORCE
|
|
||||||
$(MAKE) KBUILD_SRC=
|
$(MAKE) KBUILD_SRC=
|
||||||
|
$(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
|
||||||
set -e; \
|
set -e; \
|
||||||
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
|
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
|
||||||
set -e; \
|
set -e; \
|
||||||
|
@ -74,8 +68,7 @@ binrpm-pkg: $(objtree)/binkernel.spec FORCE
|
||||||
|
|
||||||
$(RPM) $(RPMOPTS) --define "_builddir $(objtree)" --target \
|
$(RPM) $(RPMOPTS) --define "_builddir $(objtree)" --target \
|
||||||
$(UTS_MACHINE) -bb $<
|
$(UTS_MACHINE) -bb $<
|
||||||
|
rm binkernel.spec
|
||||||
clean-files += $(objtree)/binkernel.spec
|
|
||||||
|
|
||||||
# Deb target
|
# Deb target
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue