Makefile builds: do not inherit SRC from environment in big-int#8742
Makefile builds: do not inherit SRC from environment in big-int#8742tautschnig wants to merge 1 commit intodiffblue:developfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8742 +/- ##
========================================
Coverage 79.94% 79.94%
========================================
Files 1699 1699
Lines 187790 187790
Branches 73 73
========================================
Hits 150133 150133
Misses 37657 37657 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The make documentation https://www.gnu.org/software/make/manual/html_node/Environment.html seems to suggest that definitions in the Makefile override environment variables? |
fd382f7 to
16e1bb5
Compare
In just `src/big-int` we were including `common` before defining `SRC`, which meant a possible environment-defined value of `SRC` was being used to construct some rules. The possible reason for having the `include` earlier in just that file was that we were lacking a rule for `.cc` files, the absence of which caused `make` to fail when sourcing `common` after setting `SRC`. Both fixes together now ensure that even an environment with `SRC` set won't cause builds to fail in strange ways. Fixes: diffblue#4834
16e1bb5 to
7d06389
Compare
You are of course right. Nonetheless the original bug report in #4834 was justified and reproducible, because only in |
In just
src/big-intwe were includingcommonbefore definingSRC,which meant a possible environment-defined value of
SRCwas being usedto construct some rules. The possible reason for having the
includeearlier in just that file was that we were lacking a rule for
.ccfiles, the absence of which caused
maketo fail when sourcingcommonafter setting
SRC.Both fixes together now ensure that even an environment with
SRCsetwon't cause builds to fail in strange ways.
Fixes: #4834