I want to assign the output of a shell command into a make variable. this is what I tried:
phonegap:
#download new phonegap
cd ${SOURCE_PHONEGAP};git pull
PHONE_VER = $(shell cat d:/path/to/workspace/common/phonegap/VERSION)
echo phonegap version: ${PHONE_VER}
when running MAKE from the command line I get the following:
PHONE_VER = 1.3.0 make: PHONE_VER: Command not found so the shell string is translated to the right value (1.3.0) but something fails after that.
I also tried declaring :
PHONE_VER =
and then in the command: ${PHONE_VER} = $(shell cat d:/path/to/workspace/common/phonegap/VERSION) or using := or +=. didn't work
I'm using cygwin (on win 7) with GNU make 3.81
I found this question and answer - but this doesn't seem to work for me. I'm obviously missing something (probably basic), but after a day of experimenting I have no clue whats the missing part.