diff options
author | rillig <rillig> | 2006-07-20 16:44:01 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-07-20 16:44:01 +0000 |
commit | b613b1f3a00df5d3a888452c8b1b6766dac13644 (patch) | |
tree | 565b718534b94b3d26079d7ec364849b63b98464 /mk/compiler.mk | |
parent | c7a91f2cad7ffe66528fc77571819323dcf69579 (diff) | |
download | pkgsrc-b613b1f3a00df5d3a888452c8b1b6766dac13644.tar.gz |
Up to now, the language "c" has always been enabled, no matter if the
package said USE_LANGUAGES=#none or USE_LANGUAGES=fortran. Added a
c-fail-wrapper that works like the other fail-wrappers. The default
value for USE_LANGUAGES is still "c". Some problems are expected with
packages that say USE_LANGUAGES+=c++ or with packages containing GNU
configure scripts and setting USE_LANGUAGES=c++, as those scripts always
need a working C compiler.
Diffstat (limited to 'mk/compiler.mk')
-rw-r--r-- | mk/compiler.mk | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk index 42b51c75e76..59247c2223c 100644 --- a/mk/compiler.mk +++ b/mk/compiler.mk @@ -1,4 +1,4 @@ -# $NetBSD: compiler.mk,v 1.52 2006/07/02 23:09:19 rillig Exp $ +# $NetBSD: compiler.mk,v 1.53 2006/07/20 16:44:01 rillig Exp $ # # This Makefile fragment implements handling for supported C/C++/Fortran # compilers. @@ -70,11 +70,8 @@ BSD_COMPILER_MK= defined .include "../../mk/bsd.prefs.mk" -# Always require a C compiler for proper compiler detection. +# Since most packages need a C compiler, this is the default value. USE_LANGUAGES?= c -.if empty(USE_LANGUAGES:Mc) -USE_LANGUAGES:= c ${USE_LANGUAGES} -.endif # For environments where there is an external gcc too, but pkgsrc # should use the pkgsrc one for consistency. @@ -150,9 +147,11 @@ _WRAP_EXTRA_ARGS.LD+= ${_LINKER_ABI_FLAG.${ABI}} # If the languages are not requested, force them not to be available # in the generated wrappers. # +_FAIL_WRAPPER.CC= ${WRKDIR}/.compiler/bin/c-fail-wrapper _FAIL_WRAPPER.CXX= ${WRKDIR}/.compiler/bin/c++-fail-wrapper _FAIL_WRAPPER.FC= ${WRKDIR}/.compiler/bin/fortran-fail-wrapper +${_FAIL_WRAPPER.CC}: fail-wrapper ${_FAIL_WRAPPER.CXX}: fail-wrapper ${_FAIL_WRAPPER.FC}: fail-wrapper @@ -168,6 +167,11 @@ fail-wrapper: .USE ${ECHO} 'exit 1' ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} +.if empty(USE_LANGUAGES:Mc) +PKG_CC:= ${_FAIL_WRAPPER.CC} +ALL_ENV+= CPP=${CPP:Q} +override-tools: ${_FAIL_WRAPPER.CC} +.endif .if empty(USE_LANGUAGES:Mc++) PKG_CXX:= ${_FAIL_WRAPPER.CXX} ALL_ENV+= CXXCPP=${CPP:Q} # to make some Autoconf scripts happy |