Skip to content

Commit 7d06389

Browse files
committed
Makefile builds: do not inherit SRC from environment in big-int
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: #4834
1 parent 0985044 commit 7d06389

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/big-int/makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
SRC = bigint-func.cc bigint.cc
2+
13
include ../config.inc
24
include ../common
35

4-
SRC = bigint-func.cc bigint.cc
56
CLEANFILES = big-int$(LIBEXT)
67

78
all: big-int$(LIBEXT)

src/common

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ sources: Makefile
270270
# endif
271271

272272
D_FILES1 = $(SRC:.c=$(DEPEXT))
273-
D_FILES = $(D_FILES1:.cpp=$(DEPEXT))
273+
D_FILES2 = $(D_FILES1:.cc=$(DEPEXT))
274+
D_FILES = $(D_FILES2:.cpp=$(DEPEXT))
274275

275276
-include $(D_FILES)

0 commit comments

Comments
 (0)