]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Yet another MinGW extraordinary expansion problem fix.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 20 Sep 2007 21:44:00 +0000 (21:44 +0000)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 20 Sep 2007 21:44:00 +0000 (21:44 +0000)
The sed invocation
  sed -e 's/[ \t]/\n/g'
loses backslash before 'n' for some reason.
  tr 'x \t' 'x\n\n'
equivalent function works correctly and "tr" command
has already been made necessary by previous MinGW fix.
Both patterns starts by x to prevent some clever
substitution of '\' (absolute path character in MinGW).

darcs-hash:20070920214402-ff715-27607c33d4136ec49a1297262dc849da2a1162ca.gz

snippets/config_h

index 03b65bf216d1f6c420daf70daf72997d023644ab..1170302eff06d7a493d01d6f5843526386b29218 100644 (file)
@@ -20,7 +20,7 @@ $(addprefix $(1)/,$(notdir $(addsuffix .stamp,$(2)))) : $(wildcard $(CONFIG_FILE
        $(if $(DOXYGEN),@echo "/** @file */" >> "$(2).tmp")
        @echo "#ifndef $(4)" >> "$(2).tmp"
        @echo "#define $(4)" >> "$(2).tmp"
-       @( $(foreach x, $(shell echo '$($(3))' | sed -e 's/[ \t]/\n/g' | sed -e 's/^\([^ =]*\)\(=[^ ]\+\|\)$$/\1/' ), \
+       @( $(foreach x, $(shell echo '$($(3))' | tr 'x\t ' 'x\n\n' | sed -e 's/^\([^ =]*\)\(=[^ ]\+\|\)$$/\1/' ), \
                echo '$(x).$($(x))' ; ) echo ; ) | \
                sed -e '/^[^.]*\.n$$$$/d' -e '/^[^.]*\.$$$$/d' -e 's/^\([^.]*\)\.[ym]$$$$/\1.1/' | \
                sed -n -e 's/^\([^.]*\)\.\(.*\)$$$$/#define \1 \2/p' \