[patch] update for (kbuild: correctly skip tilded backups in localversion files)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kbuild: finally correctly skip tilded backups in localversion files


Signed-off-by: Oleg Verych <[email protected]>
---

 Final addition. Why i want to maximize usage of shell, rather, than
 `make'? Just because i think, it's more portable, clear way.

 Thanks.

--- linux-2.6.20-rc6/Makefile~4tilde-backups~	2007-01-31 07:46:18.696404500 +0100
+++ linux-2.6.20-rc6/Makefile	2007-01-31 10:19:18.406100500 +0100
@@ -788,10 +788,10 @@ $(vmlinux-dirs): prepare scripts
 # scripts/setlocalversion and add the appropriate checks as needed.
 
-localversion = $(objtree)/localversion	    $(srctree)/localversion
-ext_versions = $(objtree)/localversion[^~]* $(srctree)/localversion[!~]*
-versions = $(localversion) $(ext_versions)
-localver = $(subst $(space),, \
-	   $(shell cat /dev/null $(sort $(wildcard $(versions)))) \
-	   $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
+pattern = ".*/localversion[^~]*"
+string  = $(shell cat /dev/null \
+	   `find $(objtree) $(srctree) -maxdepth 1 -regex $(pattern) | sort`)
+
+localver = $(subst $(space),, $(string) \
+			      $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
 
 # If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux