$_ stripped from custom-build command
Posted: Thu Apr 18, 2013 9:56 pm
How can I prevent the $_ special bash variable from being stripped from a custom-build command? When I use it in this command:
mkdir -p build/usr/bin && cp ../protobuf/linux-z3/usr/bin/protoc $_ && make TARGET=linux-z3
it gets stripped as you can see in this build output:
/bin/sh -c 'mkdir -p build/usr/bin && cp ../protobuf/linux-z3/usr/bin/protoc && make TARGET=linux-z3'
cp: missing destination file operand after `../protobuf/linux-z3/usr/bin/protoc'
If I replace $_ with an explicit path, it works, as in this command:
mkdir -p build/usr/bin && cp ../protobuf/linux-z3/usr/bin/protoc build/usr/bin && make TARGET=linux-z3
BTW, I previously posted http://forums.codelite.org/viewtopic.php?f=11&t=2099, which probably has the same cause--something about the shell CodeLite uses to execute custom build steps.
mkdir -p build/usr/bin && cp ../protobuf/linux-z3/usr/bin/protoc $_ && make TARGET=linux-z3
it gets stripped as you can see in this build output:
/bin/sh -c 'mkdir -p build/usr/bin && cp ../protobuf/linux-z3/usr/bin/protoc && make TARGET=linux-z3'
cp: missing destination file operand after `../protobuf/linux-z3/usr/bin/protoc'
If I replace $_ with an explicit path, it works, as in this command:
mkdir -p build/usr/bin && cp ../protobuf/linux-z3/usr/bin/protoc build/usr/bin && make TARGET=linux-z3
BTW, I previously posted http://forums.codelite.org/viewtopic.php?f=11&t=2099, which probably has the same cause--something about the shell CodeLite uses to execute custom build steps.