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

Package with only include_dirs doesn't work #161

Open
msmithTT opened this issue Apr 10, 2024 · 4 comments · May be fixed by #167
Open

Package with only include_dirs doesn't work #161

msmithTT opened this issue Apr 10, 2024 · 4 comments · May be fixed by #167

Comments

@msmithTT
Copy link

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
@micprog
Copy link
Member

micprog commented Apr 10, 2024

I think you may be looking for the export_include_dirs functionality.

@msmithTT
Copy link
Author

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.

@micprog
Copy link
Member

micprog commented Apr 11, 2024

You may want to try the flist-plus script format, which also adds plusargs: +incdir+ and +define+. The flist script type only returns files.

micprog added a commit that referenced this issue Apr 17, 2024
@micprog micprog linked a pull request Apr 17, 2024 that will close this issue
micprog added a commit that referenced this issue Apr 17, 2024
@micprog
Copy link
Member

micprog commented Apr 17, 2024

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).

micprog added a commit that referenced this issue Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants