mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] use POSIX BRE in headers install target
@ 2007-05-24 18:18 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2007-05-24 18:18 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

The sed expression used at the moment in scripts/Makefile.headersinst relies
on the (handy) GNU extension where you can escape ERE's in an otherwise BRE
without using the GNU -r option.  The following patch replaces this "\+" usage
with a functionally equivalent POSIX BRE compliant "\{1,\}".  Tested with
`make headers_install` against blackfin/x86_64/i386 targets.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
Stupid whiny OS X users and their crappy sed ;)

diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 8cd6301..fb6726b 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -11,13 +11,13 @@ UNIFDEF := scripts/unifdef -U__KERNEL__
 
 # Eliminate the contents of (and inclusions of) compiler.h
 HDRSED  := sed 	-e "s/ inline / __inline__ /g" \
-		-e "s/[[:space:]]__user[[:space:]]\+/ /g" \
-		-e "s/(__user[[:space:]]\+/ (/g" \
-		-e "s/[[:space:]]__force[[:space:]]\+/ /g" \
-		-e "s/(__force[[:space:]]\+/ (/g" \
-		-e "s/[[:space:]]__iomem[[:space:]]\+/ /g" \
-		-e "s/(__iomem[[:space:]]\+/ (/g" \
-		-e "s/[[:space:]]__attribute_const__[[:space:]]\+/\ /g" \
+		-e "s/[[:space:]]__user[[:space:]]\{1,\}/ /g" \
+		-e "s/(__user[[:space:]]\{1,\}/ (/g" \
+		-e "s/[[:space:]]__force[[:space:]]\{1,\}/ /g" \
+		-e "s/(__force[[:space:]]\{1,\}/ (/g" \
+		-e "s/[[:space:]]__iomem[[:space:]]\{1,\}/ /g" \
+		-e "s/(__iomem[[:space:]]\{1,\}/ (/g" \
+		-e "s/[[:space:]]__attribute_const__[[:space:]]\{1,\}/\ /g" \
 		-e "s/[[:space:]]__attribute_const__$$//" \
 		-e "/^\#include <linux\/compiler.h>/d"
 

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

only message in thread, other threads:[~2007-05-24 18:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-24 18:18 [patch] use POSIX BRE in headers install target Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®