Multiple PROJECT_EXTERNAL_SOURCE_PATHS

#1

Hello,

I am trying to add multiple external source paths to a project. But so far I have been unable to. When using PROJECT_EXTERNAL_SOURCE_PATHS in the config.make i get an compiler error during make.

If I add:

PROJECT_EXTERNAL_SOURCE_PATHS = ../shared/library1

It works. As does:

PROJECT_EXTERNAL_SOURCE_PATHS = ../shared/library2

But if I try

PROJECT_EXTERNAL_SOURCE_PATHS = ../shared/library1
PROJECT_EXTERNAL_SOURCE_PATHS += ../shared/library2

I will get the error:

*** No rule to make target `obj/linux64/Release/.shared/library2/somefile.o', needed by `bin/emptyExample'.  Stop.

I also tried using $(PROJECT_ROOT)/../shared/library2 but same issue. There is a trailing space on both paths.

Any ideas? Or is there another way to achieve multiple source paths via the make file system?

Many thanks

#2

I don’t think you can do it via the makefile. But you could maybe try it with softlinks to all your dependencies in a single directory?

#3

that should work, seems like a bug in the makefiles, i’ll look into it

#4

i just came across the same issue.
i could not work out how to add multiple paths to PROJECT_EXTERNAL_SOURCE_PATHS. it kept coming up with the same error you were getting @rc1.

so i ended up using only one PROJECT_EXTERNAL_SOURCE_PATHS,
and i added multiple paths to what i wanted to exclude using PROJECT_EXCLUSIONS.

weird that you can add multiple PROJECT_EXCLUSIONS but not PROJECT_EXTERNAL_SOURCE_PATHS…

is that a bug or limitation of the makefile?

#5

Same for me, I’ve met the same problem …

#6

Hi,
I am running into the same problem now. Does anybody found a fix for this?

#7

Any news about this problem?

Arturo, did you manage to fix the bug in the Makefile?

A workaround maybe?
(apart from adding all sources and use PROJECT_EXCLUSIONS to exclude most of them)

This problem is blocking for me.

#8

Something wrong around these lines?

#9

I also spotted that, and the following in config.project.mk:

ifneq ($(PROJECT_EXTERNAL_SOURCE_PATHS),)
	ALL_OF_PROJECT_SOURCE_PATHS += $(PROJECT_EXTERNAL_SOURCE_PATHS)
	ALL_OF_PROJECT_SOURCE_PATHS += $(shell find $(PROJECT_EXTERNAL_SOURCE_PATHS) -mindepth 1 -type d | grep -v "/\.[^\.]")
endif

… but I’m not familiar enough with the Makefile syntax to fix the problem.