Skip to content

Commit

Permalink
make: override built-in CXX var [#182]
Browse files Browse the repository at this point in the history
make sets CXX to gcc.
We can clear it by the simple assignment:
CXX=
That assignment is ignored if the var was set from cmd line.
Using -R seems to be no longer needed.
  • Loading branch information
stsp committed Sep 8, 2021
1 parent a118020 commit ad925d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions fdpp/clang.mak
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
#

CC = clang++
# Override builtin CXX.
# The assignment below is ignored if CXX was set via cmd line.
CXX=
ifeq ($(CXX),)
CL = clang++
else
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ define mdir
mkdir $(1) 2>/dev/null ; \
ln -s $(srcdir)/$(1)/makefile $(1)/makefile ; \
fi
cd $(1) && $(MAKE) -R srcdir=$(srcdir)/$(1) $(2)
cd $(1) && $(MAKE) srcdir=$(srcdir)/$(1) $(2)
endef

all:
Expand Down

0 comments on commit ad925d6

Please sign in to comment.