[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: variables from shell output in makefile



Hi,

try this:

"andremachado" <andremachado@techforce.com.br> writes:

> Hello,
> I am trying to create a rudimentary package for php-java-bridge.sf.net.
> The problem now is that makefiles does not accept regular bash commands and
> need different sintax. Also, Policy define to avoid "bashisms".
> Reading 
> http://www.gnu.org/software/make/manual/make.html#Shell-Function
> I found the "$(shell command parms)" .
> But it still leaving EXT_DIR empty.
> Please, what am I doing wrong?
> Regards
> Andre Felipe Machado
> http://www.techforce.com.br
>
>
> #	EXT_DIR=`/usr/bin/php-config --extension-dir`;
> 	EXT_DIR = $(shell /usr/bin/php-config --extension-dir);

	EXT_DIR := $(shell /usr/bin/php-config --extension-dir)

'=' will be evaluated when EXT_DIR is used while := will evaluate once
now and save the result.

>
> 	mkdir -p ${CURDIR}/debian/php-java-bridge/var/lib/tomcat5/webapps; \
> 	cp ${CURDIR}/debian/php-java-bridge/${EXT_DIR}/JavaBridge.war
> ${CURDIR}/debian/php-java-bridge/var/lib/tomcat5/webapps; 

	cp ${CURDIR}/debian/php-java-bridge/$(EXT_DIR)/JavaBridge.war
 ${CURDIR}/debian/php-java-bridge/var/lib/tomcat5/webapps

MfG
        Goswin



Reply to: