Closed xpac27 closed 8 years ago
I'll try to reproduce it :)
I guess problems are this :
obj(...)
instead of .obj
, otherwise it's wrong object extension for OS X**_*
doesn't make sense on input side when you compile shared library, just use *
:) If you want mask to be the same then use **/*
on output and input so it will be somewhat like this : build obj(out/objects/lib/**/*): auto lib/src/**/*.cpp
I tried .o instead of .obj and got the same error. Now I tried what you suggested this way:
build out/objects/lib/obj(**/*): auto lib/src/**/*.cpp
And it works :joy: :+1: I guess what was confusing to me was that the manual says:
# recursive glob
build **/*.obj: cxx **/*.cxx
And I was a bit confused by .obj VS obj().
Also, I haven't looked at the config file for a week and when reading it again I thought out/objects/lib/obj was a folder. Bu that's just me :angel: maybe obj
being an extension, a function and sometimes a folder could be misleading.
So to avoid confusion try using obj macro on whole path like this : build obj(out/objects/lib/**/*): auto lib/src/**/*.cpp
Maybe I need to disable ability to use macro inside path :)
@jimon maybe we need a prefix or some kind of special notation for that transformers, like variables have.
Indeed, we should allow only one use case of that transformer!
Maybe the obj() macro could have a better name, like object_files() or something else (instead of having the same name as an extension ^^). Same goes for lib() and app(). They could be named library_file() and application_file(). To me this would be easier to read:
build object_files(out/**/*): auto lib/src/**/*.cpp
build library_file(out/lib/mylib): auto object_files(out/**/*)
I guess those abbreviated macro at the end of paths are my main source of confusion.
This is just a suggestion of course :ghost:
I'm thinking about it :) We shouldn't include that "_file" suffix, imo.
We can go with objects
, executable
, library
, shared_library
:)
Error handling will be improved in #101, so closing this for now
When using the latest bf from pip (to this date) and modifying my config file line 14:
and line 23:
I get the following error: