On OS X when you use -i an extension for the in-place
substitution a backup files is required.
http://stackoverflow.com/questions/
4247068/sed-command-failing-on-mac-but-works-on-linux
So rewrite to make sed flushing sign.txt in one go and avoid
using -i option.
Reported by Louis Zulli
No functional change.
embed-signature:
@echo "Running benchmark for getting the signature ..."
- @$(SIGNBENCH) 2>&1 | sed -n 's/Nodes searched : \(.*\)/\1/p' > sign.txt
- @sed -i -e 's,^,/static const string Version/s/"\\(.*\\)"/"sig-,1' -e 's,$$,"/1,1' sign.txt
- @sed -i -f sign.txt misc.cpp
+ @$(SIGNBENCH) 2>&1 | sed -n 's/Nodes searched : \(.*\)/\/string Version\/s\/"\\(.*\\)"\/"sig-\1"\//p' > sign.txt
+ @sed -f sign.txt misc.cpp > misc2.cpp
+ @mv misc2.cpp misc.cpp
@rm sign.txt
signature-build: build embed-signature