Skip to contentSkip to conversation

Kbuild: avoid backup localversion files

PATCH Applied [email protected] 2 participants 2 messages Nov 2, 2004 – Nov 5, 2004 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Kbuild: avoid backup localversion files

From: Paolo 'Blaisorblade' Giarrusso <[email protected]>
Cc: Sam Ravnborg <[email protected]>

(Please CC me on replies as I'm not subscribed).

Avoid including as localversion-files the *~ files, i.e. backup files. If I have localversion-a and localversion-a~, I don't want both to be used. Nor I want to use localversion*~ anyway.

Don't code that as $(wildcard localversion*[^~]) as that would exclude "localversion" from the wildcard expansion result, because it requires at least one character after localversion to exist in the name file. I.e.,

---

 vanilla-linux-2.6.9-paolo/Makefile |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Makefile renamed from Makefile~avoid-backup-localversion +1 -1
diff -puN Makefile~avoid-backup-localversion Makefile
@@ -156,7 +156,7 @@ localversion-files := $(wildcard $(objtr
 endif
 
 LOCALVERSION = $(subst $(space),, \
-	       $(shell cat /dev/null $(localversion-files)) \
+	       $(shell cat /dev/null $(localversion-files:%~=)) \
 	       $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION)

_

Applied
#1 lore raw
Quoted 6 lines · On Wed, Nov 03, 2004 at 12:19:57AM +0100, [email protected] wrote:

From: Paolo 'Blaisorblade' Giarrusso <[email protected]>
Cc: Sam Ravnborg <[email protected]>

(Please CC me on replies as I'm not subscribed).

Quoted 7 lines

Avoid including as localversion-files the *~ files, i.e. backup files. If I have localversion-a and localversion-a~, I don't want both to be used. Nor I want to use localversion*~ anyway.

Don't code that as $(wildcard localversion*[^~]) as that would exclude "localversion" from the wildcard expansion result, because it requires at least one character after localversion to exist in the name file. I.e.,

Applied,

Sam