From 1b651dc29f79452ab1215a547618a850a227e1f8 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Sun, 16 Sep 2007 15:40:00 +0000 Subject: [PATCH] Corrected generation of defines from config options for complex values. The words boundary finding have sometimes not allow to eliminate whole value part. The separators (spaces or tabulator characters) are converted to newlines first now and whole lines are processed then. darcs-hash:20070916154019-ff715-fbae584556617a07d1d6bc580d82ca9c741e547f.gz --- snippets/config_h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/config_h b/snippets/config_h index 4ca3783..653364f 100644 --- a/snippets/config_h +++ b/snippets/config_h @@ -20,7 +20,7 @@ $(1) : $(wildcard $(CONFIG_FILE)) $(wildcard $(CONFIG_FILE)-default) $(if $(DOXYGEN),@echo "/** @file */" >> "$(1).tmp") @echo "#ifndef $(3)" >> "$(1).tmp" @echo "#define $(3)" >> "$(1).tmp" - @( $(foreach x, $(shell echo '$($(2))' | sed -e 's/\<\([^ =]*\)\(=[^ ]\+\|\)\>/\1/g' ), \ + @( $(foreach x, $(shell echo '$($(2))' | sed -e 's/[ \t]/\n/g' | 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' \ -- 2.39.2