Peter Stephens
|
Re: Blank environment variables in post-build actions
|
Peter Stephens
02/14/2012 6:20 PM
post91580
|
Re: Blank environment variables in post-build actions
Also, why don't the post-build actions show up in the console? It may have something to do with the '-@', but I am not
sure about that.
|
|
|
Christian Damus(deleted)
|
Re: Blank environment variables in post-build actions
|
Christian Damus(deleted)
02/15/2012 9:04 AM
post91593
|
Re: Blank environment variables in post-build actions
Hi, Peter,
Your makefile snippet misspells $(QNX_TARGET) as $(QNX_TRAGET). That should explain why this one is blank.
The $(CPU) variable is literally just the CPU architecture, which is ARM in your case. For 'armle', you want $(CPUDIR),
which combines the CPU architecture with endianness. For 'armle-v7', you would want $(CPUVARDIR), which includes
architecture-specific variants. Thus your path construction in the copy command (using $(CP_HOST) macro) should
probably be $(QNX_TARGET)/$(CPUVARDIR)/lib. However, this command would seem to be duplicating what the standard 'make
install' target already does.
The variants in effect in the current build directory are provided by $(VARIANT_LIST), not $(VARIANT).
HTH,
Christian
On 2012-02-14, at 6:16 PM, Peter Stephens wrote:
> I want to add some post-build actions to my QNX Momentics static library project. It seems like QNX_TARGET and
VARIANT are blank while CPU and BUILDNAME are properly populated. With the post build actions below I expected:
>
> c:\test1.txt = "libhutilcpp_g.a"
> c:\test2.txt = "armle"
> c:\test3.txt = "C:/proj/cf/trunk/target/qnx6/"
> c:\test4.txt = "-v7"
>
> The test1.txt file contained what I expected. The test2.txt file contained "arm" instead of "armle" even though my
build variants was set to ARM v7 (Little Endian). The test3.txt and test4.txt files were completly blank.
>
> #===== POST_BUILD - extra steps to do after building the image.
> define POST_BUILD
> -@echo $(BUILDNAME) > c:\test1.txt
> -@echo $(CPU) > c:\test2.txt
> -@echo $(QNX_TRAGET) > c:\test3.txt
> -@echo $(VARIANT) > c:\test4.txt
> -$(if $(filter AR, $(BUILD_TYPE)), @$(CP_HOST) $(BUILDNAME) $(QNX_TARGET)/$(CPU)$(VARIANT)/lib)
> -@cp $(PROJECT_ROOT)/*.h $(QNX_TARGET)/usr/include
> endef
>
> The build products are all OK. Any ideas on why these are blank would be appreciated.
>
> - Pete
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post91579
>
|
|
|