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

Added new file list call &FILELIST where paths are relative to the FILELIST #22

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

RA-Phil-K
Copy link
Contributor

Added new file list call &FILELIST.
This differs from @FileList in that the working directory is changed to the directory of FILELIST before coging the files in the list. This has the effect that files and directories in the FILELIST are relative to the FILELIST instead of where cog is called.

This differs from @FileList in that the working directory is changed to the directory of FILELIST before coging the files in the list.
This has the effect that files and directiories in the FILELIST are relative to the FILELIST instead of where cog is called.
@nedbat
Copy link
Owner

nedbat commented Jan 7, 2023

Hi, thanks for the idea. Can you help me understand how you are using cog? This seems almost like something that could be handled outside of cog...

@RA-Phil-K
Copy link
Contributor Author

For my use case, I'm using this with some system verilog where I have some IP cores that I'm using cog to automate some aspects of the code. This feature makes the modules more portable since each module can have a file list and the module can be located anywhere in the hierarchy of the project. The is especially useful when the project contains sub-sub-modules that are called by sub-modules.

I'm sure there are workarounds to do this outside of cog, but for my use case its much easier and more direct to do it this way.

nedbat added a commit that referenced this pull request Nov 24, 2023
nedbat added a commit that referenced this pull request Nov 24, 2023
@nedbat nedbat merged commit 463b531 into nedbat:main Nov 24, 2023
20 checks passed
nedbat added a commit that referenced this pull request Nov 24, 2023
@nedbat
Copy link
Owner

nedbat commented Nov 24, 2023

Thanks! I added some tests and documentation.

nedbat added a commit that referenced this pull request Nov 24, 2023
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 this pull request may close these issues.

2 participants