[clue-tech] Portability of shell expressions in a Makefile
Matt Gushee
mgushee at havenrock.com
Sun May 8 22:32:44 MDT 2005
Hello, all--
I am using the following to set a variable in a Makefile:
SOLID=$(shell \
version=`ocamlc -version`; \
major=$${version:0:4}; \
minor=$${version:5}; \
if [ $$major = "3.08" ] && [ $$minor ] && \
[ $$minor -ge 3 ]; then \
echo "-DSOLID_RELIEF"; \
else \
echo ""; \
fi )
This has the desired effect in bash. Can anyone tell me if it will work
with other Bourne-compatible shells? And while we're at it, how about
non-GNU make implementations?
Thanks in advance for any info.
--
Matt Gushee
Englewood, CO, USA
More information about the clue-tech
mailing list