Reputation: 1466
I'm trying to add a custom package from a git depository in my buildroot environment. The package is build with omake and has a OMakeroot file at its root directory.
In buildroot environment, I can define a custom Makefile which is automatically called by BR and this one shall call omake command. The problem is that the directory containing this Makefile is not the same as the build directory. Buildroot gives the build path with the variable $(D)
.
If I'd use standard Makefile, the command would be like this:
$(MAKE) TARGET_CC=$(TARGET_CC) -C $(D) <= -C is used to change directory
What is the omake equivalent to this command?
something like this is not working:
omake TARGET_CC=$(TARGET_CC) $(D)/OMakeroot
or
cd $(D)
omake TARGET_CC=$(TARGET_CC)
Upvotes: 0
Views: 181
Reputation: 65
Your two attempts look like they are supposed be rule recipes in a makefile, with a tab at the beginning of each line.
Your second attempt is close to a solution, but it lacks a continuation mark – a backslash – at the end of the first line (the one with cd
command), and a command sequence separator – ;
or even better &&
– so that Make can run these two commands in the same shell subprocess, so that omake
is effectively called with $(D)
as the current directory. All put together, you get:
cd $(D) && \
omake TARGET_CC=$(TARGET_CC)
These two commands are short enough to be put on a single line, though. Note also that the leading tabs may show as sequences of four spaces in your Web browser, but they should really be tabs in the makefile.
Upvotes: 1