* [patch] .version, newversion in Makefile
@ 2001-10-10 21:22 Rudi Sluijtman
2001-10-11 0:00 ` Russell King
0 siblings, 1 reply; 5+ messages in thread
From: Rudi Sluijtman @ 2001-10-10 21:22 UTC (permalink / raw)
To: linux-kernel
Hi,
Due to a change in the main Makefile the .version file is overwritten
by a new empty one since at least 2.4.10-pre12, so the version becomes
or remains 1 after each recompile.
>From the xfs cvs tree (http://oss.sgi.com/cgi-bin/cvsweb.cgi/linux-2.4-xfs/):
> --- linux-2.4-xfs/linux/Makefile 2001/09/17 02:09:52 1.123
> +++ linux-2.4-xfs/linux/Makefile 2001/09/21 16:28:50 1.124
> @@ -1,7 +1,7 @@
> VERSION = 2
> PATCHLEVEL = 4
> SUBLEVEL = 10
> -EXTRAVERSION =-pre10-xfs
> +EXTRAVERSION =-pre12-xfs
> .
> .
> newversion:
> - @if [ ! -f .version ]; then \
> - echo 1 > .version; \
> - else \
> - expr 0`cat .version` + 1 > .version; \
> - fi
> + . scripts/mkversion > .version
The script does the same as the lines in the Makefile, except that it does
not specify stdout.
The script cats .version, but, this has just been overwritten because of
the redirection: "scripts/mkversion > .version", so it is empty before
the script can read it.
I do no know why the lines in the Makefile have been moved to a script,
but this is obviously not the way to do it.
A small change to mkversion and leaving out the "> .version" in the
Makefile for instance can do the trick:
A patch for this against linux-2.4.11:
diff -u --recursive --new-file linux-2.4.11/Makefile linux/Makefile
--- linux-2.4.11/Makefile Wed Oct 10 22:59:03 2001
+++ linux/Makefile Wed Oct 10 23:01:58 2001
@@ -300,7 +300,7 @@
$(TOPDIR)/include/linux/compile.h: include/linux/compile.h
newversion:
- . scripts/mkversion > .version
+ . scripts/mkversion
include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
@echo -n \#define UTS_VERSION \"\#`cat .version` > .ver
@@ -530,6 +530,6 @@
tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
rm $(KERNELPATH) ; \
cd $(TOPDIR) ; \
- . scripts/mkversion > .version ; \
+ . scripts/mkversion ; \
rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
rm $(TOPDIR)/../$(KERNELPATH).tar.gz
diff -u --recursive --new-file linux-2.4.11/scripts/mkversion linux/scripts/mkversion
--- linux-2.4.11/scripts/mkversion Wed Oct 10 22:59:34 2001
+++ linux/scripts/mkversion Wed Oct 10 23:03:30 2001
@@ -1,6 +1,6 @@
if [ ! -f .version ]
then
- echo 1
+ echo 1 > .version
else
- expr 0`cat .version` + 1
+ expr 0`cat .version` + 1 > .version
fi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] .version, newversion in Makefile
2001-10-10 21:22 [patch] .version, newversion in Makefile Rudi Sluijtman
@ 2001-10-11 0:00 ` Russell King
2001-10-11 0:08 ` David S. Miller
0 siblings, 1 reply; 5+ messages in thread
From: Russell King @ 2001-10-11 0:00 UTC (permalink / raw)
To: Rudi Sluijtman; +Cc: linux-kernel
On Wed, Oct 10, 2001 at 11:22:59PM +0200, Rudi Sluijtman wrote:
> Due to a change in the main Makefile the .version file is overwritten
> by a new empty one since at least 2.4.10-pre12, so the version becomes
> or remains 1 after each recompile.
There is a patch in -ac to fix this.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] .version, newversion in Makefile
2001-10-11 0:00 ` Russell King
@ 2001-10-11 0:08 ` David S. Miller
2001-10-11 0:13 ` Russell King
2001-10-11 7:34 ` Alan Cox
0 siblings, 2 replies; 5+ messages in thread
From: David S. Miller @ 2001-10-11 0:08 UTC (permalink / raw)
To: rmk; +Cc: rudi, linux-kernel
From: Russell King <rmk@arm.linux.org.uk>
Date: Thu, 11 Oct 2001 01:00:32 +0100
On Wed, Oct 10, 2001 at 11:22:59PM +0200, Rudi Sluijtman wrote:
> Due to a change in the main Makefile the .version file is overwritten
> by a new empty one since at least 2.4.10-pre12, so the version becomes
> or remains 1 after each recompile.
There is a patch in -ac to fix this.
I've also independantly just sent Linus a patch to fix this.
I was not aware of the -ac fix, sorry.
Franks a lot,
David S. Miller
davem@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] .version, newversion in Makefile
2001-10-11 0:08 ` David S. Miller
@ 2001-10-11 0:13 ` Russell King
2001-10-11 7:34 ` Alan Cox
1 sibling, 0 replies; 5+ messages in thread
From: Russell King @ 2001-10-11 0:13 UTC (permalink / raw)
To: David S. Miller; +Cc: rudi, linux-kernel
On Wed, Oct 10, 2001 at 05:08:05PM -0700, David S. Miller wrote:
> I've also independantly just sent Linus a patch to fix this.
> I was not aware of the -ac fix, sorry.
It was sent around 20 September to Alan, Linus and lkml. Alan accepted it,
Linus dropped it, and hardly anyone noticed on lkml. ;(
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] .version, newversion in Makefile
2001-10-11 0:08 ` David S. Miller
2001-10-11 0:13 ` Russell King
@ 2001-10-11 7:34 ` Alan Cox
1 sibling, 0 replies; 5+ messages in thread
From: Alan Cox @ 2001-10-11 7:34 UTC (permalink / raw)
To: David S. Miller; +Cc: rmk, rudi, linux-kernel
> There is a patch in -ac to fix this.
>
> I've also independantly just sent Linus a patch to fix this.
> I was not aware of the -ac fix, sorry.
Maybe he'll notice this time. Russell sent him a fix, I sent him Russells
fix and now you've sent him a fix 8)
No big problem
Alan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-10-11 7:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-10 21:22 [patch] .version, newversion in Makefile Rudi Sluijtman
2001-10-11 0:00 ` Russell King
2001-10-11 0:08 ` David S. Miller
2001-10-11 0:13 ` Russell King
2001-10-11 7:34 ` Alan Cox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.