aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-02-29 22:58:51 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-02-29 22:58:51 +0000
commitdfbaea8347907381409d72496449fdb53a823551 (patch)
tree2af64063549570e0a548bdc894aa9b6e2f75ee88 /Makefile.inc1
parent6b9597aac404104039c95f4fab7201d727338702 (diff)
downloadsrc-dfbaea8347907381409d72496449fdb53a823551.tar.gz
src-dfbaea8347907381409d72496449fdb53a823551.zip
Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp. Note this does *not* disable building and installing gcc, which will still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp. If you want to disable gcc completely, you must use WITHOUT_GCC. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=232322
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc112
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index dcebc1814f08..f7ee6a994295 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1108,6 +1108,10 @@ _aicasm= sys/modules/aic7xxx/aicasm
_share= share/syscons/scrnmaps
.endif
+.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang")
+_gcc_tools= gnu/usr.bin/cc/cc_tools
+.endif
+
.if ${MK_KERBEROS} != "no"
_kerberos5_tools= kerberos5/tools
.endif
@@ -1136,7 +1140,7 @@ build-tools:
${MAKE} DIRPRFX=${_tool}/ build-tools
.endfor
.for _tool in \
- gnu/usr.bin/cc/cc_tools \
+ ${_gcc_tools} \
${_kerberos5_tools}
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \
cd ${.CURDIR}/${_tool}; \
@@ -1166,14 +1170,12 @@ _kgzip= usr.sbin/kgzip
_binutils= gnu/usr.bin/binutils
.endif
-.if ${MK_CLANG} != "no"
-.if ${CC:T:Mclang} == "clang"
+.if ${MK_CLANG} != "no" && (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang")
_clang= usr.bin/clang
_clang_libs= lib/clang
.endif
-.endif
-.if ${MK_GCC} != "no"
+.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang")
_cc= gnu/usr.bin/cc
.endif