From: Pavel Pisa Date: Sun, 16 Sep 2007 15:40:00 +0000 (+0000) Subject: Corrected generation of defines from config options for complex values. X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk/sssa.git/commitdiff_plain/1b651dc29f79452ab1215a547618a850a227e1f8 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 --- 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' \