LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] refix localversion handling
@ 2007-02-08 0:13 Roman Zippel
2007-02-08 0:31 ` Oleg Verych
0 siblings, 1 reply; 2+ messages in thread
From: Roman Zippel @ 2007-02-08 0:13 UTC (permalink / raw)
To: Andrew Morton; +Cc: olecom, linux-kernel
Hi,
This reverts part of the localversion patch, which now already got into
git. It removes the unnecessary find call, with the simpler $(notdir ...)
fix.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
Makefile | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
Index: linux-2.6/Makefile
===================================================================
--- linux-2.6.orig/Makefile
+++ linux-2.6/Makefile
@@ -787,12 +787,14 @@ $(vmlinux-dirs): prepare scripts
# moment, only git is supported but other SCMs can edit the script
# scripts/setlocalversion and add the appropriate checks as needed.
-pattern = ".*/localversion[^~]*"
-string = $(shell cat /dev/null \
- `find $(objtree) $(srctree) -maxdepth 1 -regex $(pattern) | sort`)
-
-localver = $(subst $(space),, $(string) \
- $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
+___localver = $(objtree)/localversion* $(srctree)/localversion*
+__localver = $(sort $(wildcard $(___localver)))
+# skip files containing '~' (like backup files)
+_localver = $(foreach f,$(__localver),$(if $(findstring ~,$(notdir $(f))),,$(f)))
+
+localver = $(subst $(space),, \
+ $(shell cat /dev/null $(_localver)) \
+ $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
# If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
# and if the SCM is know a tag from the SCM is appended.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] refix localversion handling
2007-02-08 0:13 [PATCH] refix localversion handling Roman Zippel
@ 2007-02-08 0:31 ` Oleg Verych
0 siblings, 0 replies; 2+ messages in thread
From: Oleg Verych @ 2007-02-08 0:31 UTC (permalink / raw)
To: Roman Zippel; +Cc: Andrew Morton, linux-kernel
On Thu, Feb 08, 2007 at 01:13:39AM +0100, Roman Zippel wrote:
> Hi,
>
> This reverts part of the localversion patch, which now already got into
> git. It removes the unnecessary find call, with the simpler $(notdir ...)
> fix.
I'm certainly have more stuff to deal with, but that was my attept to
prevent bloatware in makefiles (unlucky "meat" from "flies" split ;)
>
> -pattern = ".*/localversion[^~]*"
> -string = $(shell cat /dev/null \
> - `find $(objtree) $(srctree) -maxdepth 1 -regex $(pattern) | sort`)
> -
> -localver = $(subst $(space),, $(string) \
> - $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
> +___localver = $(objtree)/localversion* $(srctree)/localversion*
> +__localver = $(sort $(wildcard $(___localver)))
> +# skip files containing '~' (like backup files)
> +_localver = $(foreach f,$(__localver),$(if $(findstring ~,$(notdir $(f))),,$(f)))
> +
> +localver = $(subst $(space),, \
> + $(shell cat /dev/null $(_localver)) \
> + $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
____
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-08 0:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-08 0:13 [PATCH] refix localversion handling Roman Zippel
2007-02-08 0:31 ` Oleg Verych
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).