linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.4.23, 2.6.0-test11] avoid unportable "expr length"
@ 2003-12-10 10:31 Martin Schaffner
  0 siblings, 0 replies; only message in thread
From: Martin Schaffner @ 2003-12-10 10:31 UTC (permalink / raw)
  To: linux-kernel

Hi,

This one-line patch makes it possible to compile the linux kernel on systems
without GNU expr.


patch for 2.6.0-test11

--- a/Makefile	2003-12-09 13:54:50.000000000 +0100
+++ b/Makefile	2003-12-09 13:56:39.000000000 +0100
@@ -640,7 +640,7 @@
 uts_len := 64
 
 define filechk_version.h
-	if expr length "$(KERNELRELEASE)" \> $(uts_len) >/dev/null ; then \
+	if expr "$(KERNELRELEASE)" : '.*' \> $(uts_len) >/dev/null ; then \
 	  echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
 	  exit 1; \
 	fi; \


patch for 2.4.23

--- a/Makefile   2003-12-09 14:27:56.000000000 +0100
+++ b/Makefile   2003-12-09 14:28:37.000000000 +0100
@@ -353,7 +353,7 @@
        @rm -f .ver1

 include/linux/version.h: ./Makefile
-       @expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
+       @expr "$(KERNELRELEASE)" : '.*' \<= $(uts_len) > /dev/null || \
          (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len)
characters >&2; false)
        @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
        @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 +
$(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver


-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-10 10:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-10 10:31 [PATCH 2.4.23, 2.6.0-test11] avoid unportable "expr length" Martin Schaffner

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).