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

vppreproc does not use relative directories for files in -F arguments #444

Closed
veripoolbot opened this issue Feb 24, 2012 · 4 comments
Closed
Assignees

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Jeremy Bennett (@jeremybennett)
Original Redmine Issue: 444 from https://www.veripool.org
Original Date: 2012-02-24
Original Assignee: Wilson Snyder (@wsnyder)


-f and -F are used to pass a file of arguments to vppreproc. In the case of -F any arguments must be interpreted as relative to the directory containing the file of arguments.

It seems that any source file arguments in files specified with -F are not interpretive relative the directory containing the file, but to the original directory from which vppreproc was called.

The attached modification to test t/80_vppreproc.t demonstrates the problem.

For comparison, Verilator processes -F correctly.

I believe the problem is that vppreproc analyses non-file arguments separately from source files. Any source files are not therefore saved with the context of the directory in which they were specified.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Jeremy Bennett (@jeremybennett)
Original Date: 2012-02-24T19:12:02Z


I believe the attached patch (which also updates the test) fixes the problem.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-02-24T22:51:08Z


Thanks for the patch.

I agree with what you're after, but the problem is I sometimes use Getopt to process other tool options which have flags in .f/.vc files such as "--someoption foo". The patch will treat foo as a filename and so would break them.

So I'm thinking this should be both optional via a Getopt config option, and it should only add the / if the filename exists in the new place. vpreproc would set the option.

If that makes sense I can easily modify the patch you provided to test the new option.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Jeremy Bennett (@jeremybennett)
Original Date: 2012-02-27T09:16:18Z


That seems a good strategy. Look forward to seeing the revised patch.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-02-27T13:34:38Z


In 3.314.

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

No branches or pull requests

2 participants