-
Notifications
You must be signed in to change notification settings - Fork 620
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
Make: add CppDef extra for extracting FOO in -DFOO as a macro of CPreProcessor #4024
Conversation
2ebb923
to
1dfca79
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4024 +/- ##
==========================================
+ Coverage 85.42% 85.45% +0.03%
==========================================
Files 235 235
Lines 56729 56848 +119
==========================================
+ Hits 48462 48582 +120
+ Misses 8267 8266 -1 ☔ View full report in Codecov by Sentry. |
1dfca79
to
1b49294
Compare
We must merge #4025 first. |
3054dd8
to
54b4dad
Compare
b4605ec
to
31db172
Compare
The last one line the test cases don't cover looks a bit strange for me. Though I have modified the line, I cannot convince we need the line. |
…ments Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…Processor Implement the heuristics discussed in bootlin/elixir#221 Based on ideas suggested by @tleb. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
The edge cases were suggested by @tleb in bootlin/elixir#221 Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Suggested by @tleb in bootlin/elixir#221 (comment) . Signed-off-by: Masatake YAMATO <yamato@redhat.com>
With the original code, X for the input: C += -DX\ -I. is extracted as: X input.mak /^ -I.$/;" d language:CPreProcessor extras:CppDef The pattern is extracted from the line next to the line where X appears. Reported by @tleb in bootlin/elixir#221 (comment) . Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
31db172
to
c16adc6
Compare
See bootlin/elixir#221 .
input.mak:
Output:
When --extras-Make='+{CppDef}' is given, the Make parser extracts
OUTPUT
.Violent heuristics, but I know this is useful when reading a source tree like Linux kernel.
I have tried hard to make the impact on the original code small.