Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple source path #23

Open
binarymaker opened this issue Sep 30, 2020 · 1 comment
Open

multiple source path #23

binarymaker opened this issue Sep 30, 2020 · 1 comment

Comments

@binarymaker
Copy link

How can I append multiple source paths?

my present makefile looks like this. but I don't know how to place multiple path in SRC_PATH

# Path to the source directory, relative to the makefile
SRC_PATH = . ../../../source
# Add additional include paths
INCLUDES = -I. -I../../../source -I../../../config

Error

blinky.c:1: *** missing separator.  Stop.
@mbcrawfo
Copy link
Owner

mbcrawfo commented Oct 1, 2020

Looks like the problem is happening on line 219. That line is intended to add a rule for every file that's part of your project, but when you try to use multiple paths after the variable substitution happens that line will become something like build_path/%.o: src_path_1 src_path_2 src_path_3/%.c. This isn't valid make syntax (due to the spaces between the source paths) and causes the missing separator error that you're seeing.

Unfortunately I don't know of a straightforward way to add support for this since to my knowledge make variables only support simple text substitution (no array support). Happy to look at PR's if I'm wrong there or anyone knows a good workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants