Xiaodan Tang(deleted)
|
RE: Problem with EXTRA_SRCVPATH
|
Xiaodan Tang(deleted)
01/26/2009 10:02 PM
post20807
|
RE: Problem with EXTRA_SRCVPATH
Looks like you only target ppc. How about add the line below into
ppc/a-be-Variant2/Makefile?
EXTRA_SRCVPATH += $(PROJECT_ROOT)/sources2
-xtang
> -----Original Message-----
> From: Stefan Witanis [mailto:community-noreply@qnx.com]
> Sent: January 26, 2009 9:55 PM
> To: general-community
> Subject: Problem with EXTRA_SRCVPATH
>
> Hello,
>
> Attached there is a simple project that shows the problem. I'm using
QNX
> Momentics IDE v4.0.1.
>
> The project makes a library. It has two variants:
>
> Variant1 - that should use only sources1/file1.c
> Variant2 - that should use both sources1/file1.c and sources2/file2.c
>
> In common.mk source paths are specified correctly:
> ...
> EXTRA_SRCVPATH+=../../sources1
> EXTRA_SRCVPATH_ppcbe_Variant2+=../../sources2
> ...
>
> However, when I build Variant2 it compiles only file1.c and ignores
> file2.c in folder specified by EXTRA_SRCVPATH_ppcbe_Variant2. See the
> vtest\ppc\a-be-Variant2\ folder - there is just one .o file.
>
> How to make IDE to compile the file from a second folder but for this
> variant only? I'll appreciate your help.
>
> Thanks in advance,
> Stefan
>
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post20806
|
|
|
Andy Pekarske
|
Re: Problem with EXTRA_SRCVPATH
|
Andy Pekarske
01/28/2009 3:47 PM
post20960
|
Re: Problem with EXTRA_SRCVPATH
I think you can get what you want by adding this:
EXTRA_SRCVPATH+=$(if $(strip $(findstring Variant2, $(CURDIR))),../../sources2)
Essentially this looks at the current directory you are compiling in. If it matches variant 2 it will add the ../../
sources2 to the extra srcvpath, if not, it wont add anything.
Give it a shot!
> Hello,
>
> Attached there is a simple project that shows the problem. I'm using QNX
> Momentics IDE v4.0.1.
>
> The project makes a library. It has two variants:
>
> Variant1 - that should use only sources1/file1.c
> Variant2 - that should use both sources1/file1.c and sources2/file2.c
>
> In common.mk source paths are specified correctly:
> ...
> EXTRA_SRCVPATH+=../../sources1
> EXTRA_SRCVPATH_ppcbe_Variant2+=../../sources2
> ...
>
> However, when I build Variant2 it compiles only file1.c and ignores file2.c in
> folder specified by EXTRA_SRCVPATH_ppcbe_Variant2. See the vtest\ppc\a-be-
> Variant2\ folder - there is just one .o file.
>
> How to make IDE to compile the file from a second folder but for this variant
> only? I'll appreciate your help.
>
> Thanks in advance,
> Stefan
|
|
|