Patchwork [U-Boot,3/3] rules.mk: replace GNU specific \w with POSIX equivalant

login
register
mail settings
Submitter Jeroen Hofstee
Date July 19, 2011, 8:41 p.m.
Message ID <1311108110-37409-4-git-send-email-jeroen@myspectrum.nl>
Download mbox | patch
Permalink /patch/105538/
State Accepted
Commit 2469c4b2dbdd601a4e44ecf9925b99bd2cd1b43f
Headers show

Comments

Jeroen Hofstee - July 19, 2011, 8:41 p.m.
If sed does not support the GNU \w regex extension, build attempts
lead to circular dependency warnings and finally build failure
(crc32.c not found). Build output before and after the patch on
FreeBSD is at:
http://lists.denx.de/pipermail/u-boot/2011-June/095235.html

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
 rules.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Wolfgang Denk - July 28, 2011, 7:18 p.m.
Dear Jeroen Hofstee,

In message <1311108110-37409-4-git-send-email-jeroen@myspectrum.nl> you wrote:
> If sed does not support the GNU \w regex extension, build attempts
> lead to circular dependency warnings and finally build failure
> (crc32.c not found). Build output before and after the patch on
> FreeBSD is at:
> http://lists.denx.de/pipermail/u-boot/2011-June/095235.html
> 
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
> ---
>  rules.mk |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/rules.mk b/rules.mk
index 5fd12a0..a6bae62 100644
--- a/rules.mk
+++ b/rules.mk
@@ -29,11 +29,11 @@  $(obj).depend:	$(src)Makefile $(TOPDIR)/config.mk $(SRCS) $(HOSTSRCS)
 		@rm -f $@
 		@touch $@
 		@for f in $(SRCS); do \
-			g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
+			g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \
 			$(CC) -M $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
 		done
 		@for f in $(HOSTSRCS); do \
-			g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
+			g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \
 			$(HOSTCC) -M $(HOSTCPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
 		done