bender
bender copied to clipboard
Package with only include_dirs doesn't work
I have a package that just contains include files (global files that define parts of a larger project). If I attempt to create a Bender file for this, for example:
package:
name: my_package
authors:
- "My Name"
sources:
include_dirs:
- rtl
files:
This doesn't generate any +incdir+ command-line options.
If I add a single dummy file to this, then it adds the required +incdir+ command-line options as well as the dummy file:
package:
name: my_package
authors:
- "My Name"
sources:
include_dirs:
- rtl
files:
- rtl/empty_dummy_module.sv
I think you may be looking for the export_include_dirs
functionality.
Thanks for the hint, but unfortunately doesn't make a difference.
Using this Bender file:
sources:
export_include_dirs:
- rtl
files:
Then running 'bender script flist' it returns an empty string.
You may want to try the flist-plus
script format, which also adds plusargs: +incdir+
and +define+
. The flist
script type only returns files.
Investigating another issue, I found a problem when defining a bender dependency with no source files. I adjusted bender's script export in #167 to keep sourcegroups with no sourcefiles, resulting in a proper export of include directories when no source files are found. I don't know, however, if this is reasonable behavior, as include directories should only be necessary when compiling a source file, and blanket include directories can cause issues for some projects (which is why we can differentiate include directories for individual sourcegroups, although the flist format won't expose this).