]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cobol: sed portability fix
authorJakub Jelinek <jakub@redhat.com>
Mon, 7 Apr 2025 12:25:49 +0000 (14:25 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 7 Apr 2025 12:25:49 +0000 (14:25 +0200)
Apparently Darwin sed doesn't like 's/\(foo\|bar\|baz\)/qux/' syntax,
simplified by using a pattern which matches all libgcobol header names
except possible config.h.

2025-04-07  Jakub Jelinek  <jakub@redhat.com>

* Make-lang.in (cobol/charmaps.cc, cobol/valconv.cc): Use a BRE
only sed regex.

gcc/cobol/Make-lang.in

index d14190f07957f87e965284897eda59f39f145683..422ebe28b213327b0f0cfd75837423ec76bd92a6 100644 (file)
@@ -90,9 +90,7 @@ cobol1_OBJS =    \
 # so that the .h files can be found.
 
 cobol/charmaps.cc cobol/valconv.cc: cobol/%.cc: $(LIB_SOURCE)/%.cc
-       -l='ec\|common-defs\|io\|gcobolio\|gfileio\|charmaps'; \
-       l=$$l'\|valconv\|exceptl'; \
-       sed -e '/^#include/s,"\('$$l'\)\.h","../../libgcobol/\1.h",' $^ > $@
+       sed -e '/^#include/s,"\([^"]*[^g"].h\)","../../libgcobol/\1",' $^ > $@
 
 LIB_SOURCE_H=$(wildcard $(LIB_SOURCE)/*.h)