Code: Select all
Running benchmark for getting the signature ...
sed: -e: No such file or directory
make: *** [embed-signature] Error 1Code: Select all
LZsMacPro-OSX6: ~/Documents/Chess/Stockfish/src] more sign.txt
4769737Moderator: Ras
Code: Select all
Running benchmark for getting the signature ...
sed: -e: No such file or directory
make: *** [embed-signature] Error 1Code: Select all
LZsMacPro-OSX6: ~/Documents/Chess/Stockfish/src] more sign.txt
4769737it seems 'sed' is not installed on your ssetupzullil wrote:This much works:Code: Select all
Running benchmark for getting the signature ... sed: -e: No such file or directory make: *** [embed-signature] Error 1
Code: Select all
LZsMacPro-OSX6: ~/Documents/Chess/Stockfish/src] more sign.txt 4769737
Hi Marco,mcostalba wrote:it seems 'sed' is not installed on your ssetupzullil wrote:This much works:Code: Select all
Running benchmark for getting the signature ... sed: -e: No such file or directory make: *** [embed-signature] Error 1
Code: Select all
LZsMacPro-OSX6: ~/Documents/Chess/Stockfish/src] more sign.txt 4769737
Code: Select all
LZsMacPro-OSX6: ~/Documents/Chess/Stockfish/src] which sed
/usr/bin/sed
LZsMacPro-OSX6: ~/Documents/Chess/Stockfish/src] more sign.txt
4769737
LZsMacPro-OSX6: ~/Documents/Chess/Stockfish/src] sed -i -e 's,^,/static const string Version/s/"\\(.*\\)"/"sig-,1' -e 's,$$,"/1,1' sign.txt
sed: -e: No such file or directoryCode: Select all
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
@rm sign.txt
Code: Select all
LZsMacPro-OSX6: ~/Documents/Chess/Stockfish/src] ./stockfish
Stockfish sig-4769737 64 SSE4.2 by Tord Romstad, Marco Costalba and Joona Kiiski
Unfortunately not for me.zullil wrote:This works for me:
Code: Select all
embed-signature:
@echo "Running benchmark for getting the signature ..."
@$(SIGNBENCH) 2>&1 | sed -n 's/Nodes searched : \(.*\)/\1/p' > sign.txt
@sed -e 's,^,/static const string Version/s/"\\(.*\\)"/"sig-,1' -e 's,$$,"/1,1' -i sign.txt
@sed -f sign.txt -i misc.cpp
@rm sign.txt
Already tried that, and it didn't work. But I'll try again to be sure.mcostalba wrote:Unfortunately not for me.zullil wrote:This works for me:
Could you please test the following ?
Code: Select all
embed-signature: @echo "Running benchmark for getting the signature ..." @$(SIGNBENCH) 2>&1 | sed -n 's/Nodes searched : \(.*\)/\1/p' > sign.txt @sed -e 's,^,/static const string Version/s/"\\(.*\\)"/"sig-,1' -e 's,$$,"/1,1' -i sign.txt @sed -f sign.txt -i misc.cpp @rm sign.txt
Code: Select all
Running benchmark for getting the signature ...
sed: -i may not be used with stdin
make: *** [embed-signature] Error 1Code: Select all
embed-signature:
@echo "Running benchmark for getting the signature ..."
@$(SIGNBENCH) 2>&1 | sed -n 's/Nodes searched : \(.*\)/\1/p' > sign.txt
@sed -i .bak -e 's,^,/static const string Version/s/"\\(.*\\)"/"sig-,1' -e 's,$$,"/1,1' sign.txt
@sed -i .bak -f sign.txt misc.cpp
@rm sign.txt *.bak I found this link which explains the problem, i.e. "sed -i" behaves differently on Mac OS X than on Linux.zullil wrote:How about this?
Code: Select all
embed-signature: @echo "Running benchmark for getting the signature ..." @$(SIGNBENCH) 2>&1 | sed -n 's/Nodes searched : \(.*\)/\1/p' > sign.txt @sed -i .bak -e 's,^,/static const string Version/s/"\\(.*\\)"/"sig-,1' -e 's,$$,"/1,1' sign.txt @sed -i .bak -f sign.txt misc.cpp @rm sign.txt *.bak
Code: Select all
embed-signature:
@echo "Running benchmark for getting the signature ..."
@$(SIGNBENCH) 2>&1 | sed -n 's/Nodes searched : \(.*\)/\/string Version\/s\/"\\(.*\\)"\/"sig-\1"\//p' > sign.txt
@sed -f sign.txt -i misc.cpp
@rm sign.txt
Fails here, as before:mcostalba wrote:Ok, I have modified sed command to write the file in one go, this should work although is ugly as hell
Code: Select all
embed-signature: @echo "Running benchmark for getting the signature ..." @$(SIGNBENCH) 2>&1 | sed -n 's/Nodes searched : \(.*\)/\/string Version\/s\/"\\(.*\\)"\/"sig-\1"\//p' > sign.txt @sed -f sign.txt -i misc.cpp @rm sign.txt
Could you please verify ?
Code: Select all
Running benchmark for getting the signature ...
sed: -i may not be used with stdin
make: *** [embed-signature] Error 1