public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kconfig: fix the failure of `make rpm-pkg` after localversion file changed
@ 2012-11-04  7:32 Adam Lee
  2013-02-18  3:08 ` Adam Lee
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Lee @ 2012-11-04  7:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Michal Marek, open list:KERNEL BUILD + fi...

`make rpm-pkg` and `make binrpm-pkg` will write $KERNELRELEASE into rpm
spec files which don't depend on localversion file now. So, the
unchanged spec files will cause failure after localversion file changed.

I added the localversion file into the dependencies of spec files.
Because that file is not necessary, I made it a empty target, so its
last-modification time will be checked by Make only when it exists.

Signed-off-by: Adam Lee <adam8157@gmail.com>
---
 scripts/package/Makefile |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 87bf080..a7c1f59 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -30,9 +30,12 @@ KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
 MKSPEC     := $(srctree)/scripts/package/mkspec
 PREV       := set -e; cd -P ..;
 
+# localversion, its last-modification time will be checked only when it exists
+localversion:
+
 # rpm-pkg
 # ---------------------------------------------------------------------------
-$(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile
+$(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile localversion
 	$(CONFIG_SHELL) $(MKSPEC) > $@
 
 rpm-pkg rpm: $(objtree)/kernel.spec FORCE
@@ -60,7 +63,7 @@ clean-files := $(objtree)/kernel.spec
 
 # binrpm-pkg
 # ---------------------------------------------------------------------------
-$(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile
+$(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile localversion
 	$(CONFIG_SHELL) $(MKSPEC) prebuilt > $@
 
 binrpm-pkg: $(objtree)/binkernel.spec FORCE
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kconfig: fix the failure of `make rpm-pkg` after localversion file changed
  2012-11-04  7:32 [PATCH] kconfig: fix the failure of `make rpm-pkg` after localversion file changed Adam Lee
@ 2013-02-18  3:08 ` Adam Lee
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Lee @ 2013-02-18  3:08 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kbuild

On Sun, Nov 04, 2012 at 03:32:41PM +0800, Adam Lee wrote:
> `make rpm-pkg` and `make binrpm-pkg` will write $KERNELRELEASE into rpm
> spec files which don't depend on localversion file now. So, the
> unchanged spec files will cause failure after localversion file changed.
> 
> I added the localversion file into the dependencies of spec files.
> Because that file is not necessary, I made it a empty target, so its
> last-modification time will be checked by Make only when it exists.
> 
> Signed-off-by: Adam Lee <adam8157@gmail.com>
> ---
>  scripts/package/Makefile |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

Hi, Michal

Any comment about my fix?

reproduce steps:
1, make rpm-pkg
2, change localversion
3, make rpm-pkg

-- 
Regards,
Adam Lee
http://adam8157.info

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-18  3:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-04  7:32 [PATCH] kconfig: fix the failure of `make rpm-pkg` after localversion file changed Adam Lee
2013-02-18  3:08 ` Adam Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox