Use perl because sed isn't portable enough (doesn't work on Mac).

This commit is contained in:
dbaron%dbaron.org 2007-02-08 20:39:12 +00:00
parent b1e56b53c5
commit 4544a9a376

View File

@ -59,7 +59,7 @@ autoconf.js: $(DEPTH)/config/autoconf.mk Makefile
# strip comments, escape \ and ", use only assignment lines that
# don't end in backslashes and don't have variables, and then
# convert to JS properties
cat $< | sed 's/#.*//;s,\\,\\\\,g;s,",\\",g' | grep '=' | grep -v '\\$$' | grep -v '\$$' | sed 's/[ \t]*:\?= *\(.*\)/: "\1",/' >> $@
cat $< | perl -p -e 's/#.*//;s,\\,\\\\,g;s,",\\",g' | grep '=' | grep -v '\\$$' | grep -v '\$$' | perl -p -e 's/[ \t]*:?= *(.*)/: "\1",/' >> $@
echo 'dummy_var: null' >> $@ # to avoid trailing comma
echo '};' >> $@