Changeset View
Standalone View
Mk/bsd.gcc.mk
Context not available. | |||||
# do so by specifying USE_GCC=X.Y+ which requests at least GCC version | # do so by specifying USE_GCC=X.Y+ which requests at least GCC version | ||||
# X.Y. To request a specific version omit the trailing + sign. | # X.Y. To request a specific version omit the trailing + sign. | ||||
# | # | ||||
# Optional comma-separated arguments may be specified after the version | |||||
# specifier. The following arguments are supported: | |||||
# build add gcc to BUILD_DEPENDS | |||||
# run add gcc to RUN_DEPENDS | |||||
# test add gcc to TEST_DEPENDS | |||||
# if no arguments are specified, gcc is added to BUILD_DEPENDS, RUN_DEPENDS and | |||||
# TEST_DEPENDS. | |||||
# | |||||
# USE_GCC=build, USE_GCC=run and USE_GCC=test are aliases to yes:build, yes:run | |||||
# and yes:test, respectively. | |||||
# | |||||
# Examples: | # Examples: | ||||
# USE_GCC= yes # port requires a current version of GCC | # USE_GCC= yes # port requires a current version of GCC | ||||
# # as defined in bsd.default-versions.mk. | # # as defined in bsd.default-versions.mk. | ||||
Context not available. | |||||
# USE_GCC= any # port requires GCC 4.2 or later. | # USE_GCC= any # port requires GCC 4.2 or later. | ||||
# USE_GCC= 4.9+ # port requires GCC 4.9 or later. | # USE_GCC= 4.9+ # port requires GCC 4.9 or later. | ||||
# USE_GCC= 4.9 # port requires GCC 4.9. | # USE_GCC= 4.9 # port requires GCC 4.9. | ||||
# | # USE_GCC= 4.9:build # port requires GCC 4.9 at build-time only. | ||||
# USE_GCC= build # port requires a current version of GCC at | |||||
# # build-time only. | |||||
# | |||||
# If you are wondering what your port exactly does, use "make test-gcc" | # If you are wondering what your port exactly does, use "make test-gcc" | ||||
# to see some debugging. | # to see some debugging. | ||||
# | # | ||||
Context not available. | |||||
# No configurable parts below this. #################################### | # No configurable parts below this. #################################### | ||||
# | # | ||||
# Alias {build,run,test} -> yes:{build,run,test} | |||||
.if ${USE_GCC} == build || ${USE_GCC} == run || ${USE_GCC} == test | |||||
USE_GCC:= yes:${USE_GCC} | |||||
.endif | |||||
# Split args | |||||
.if defined(USE_GCC) | |||||
__USE_GCC:= ${USE_GCC:C/\:.*//} | |||||
_USE_GCC_ARGS:= ${USE_GCC:C/^[^\:]*(\:|\$)//:S/,/ /g} | |||||
USE_GCC= ${__USE_GCC} | |||||
.endif # defined(USE_GCC) | |||||
# Make sure that no dependency or some other environment variable | |||||
# pollutes the build/run dependency detection | |||||
tobik: Maybe start it with `has` or any other verb so that it does not read weird like
```
===> ipxe… | |||||
.undef _USE_GCC_BUILD_DEP | |||||
.undef _USE_GCC_RUN_DEP | |||||
.undef _USE_GCC_TEST_DEP | |||||
.if ${_USE_GCC_ARGS:Mbuild} | |||||
_USE_GCC_BUILD_DEP= yes | |||||
.endif | |||||
.if ${_USE_GCC_ARGS:Mrun} | |||||
Done Inline ActionsThis should probably use IGNORE=. tobik: This should probably use `IGNORE=`. | |||||
Done Inline ActionsPlease, please, please. Use of .error breaks metadata sweeps (such as when you build INDEX). linimon: Please, please, please. Use of .error breaks metadata sweeps (such as when you build INDEX). | |||||
Done Inline ActionsYep, changed. gerald: Yep, changed. | |||||
_USE_GCC_RUN_DEP= yes | |||||
.endif | |||||
.if ${_USE_GCC_ARGS:Mtest} | |||||
_USE_GCC_TEST_DEP= yes | |||||
.endif | |||||
# The port does not specify a build, run or test dependency, assume all are | |||||
# required. | |||||
.if !defined(_USE_GCC_BUILD_DEP) && !defined(_USE_GCC_RUN_DEP) && \ | |||||
!defined(_USE_GCC_TEST_DEP) && !defined(USE_GCC_NO_DEPENDS) | |||||
_USE_GCC_BUILD_DEP= yes | |||||
_USE_GCC_RUN_DEP= yes | |||||
_USE_GCC_TEST_DEP= yes | |||||
.endif | |||||
.if defined(USE_GCC) && ${USE_GCC} == yes | .if defined(USE_GCC) && ${USE_GCC} == yes | ||||
USE_GCC= ${GCC_DEFAULT}+ | USE_GCC= ${GCC_DEFAULT}+ | ||||
.endif | .endif | ||||
Context not available. | |||||
.undef V | .undef V | ||||
.if defined(_GCC_PORT_DEPENDS) | .if defined(_GCC_PORT_DEPENDS) | ||||
. if defined(_USE_GCC_BUILD_DEP) | |||||
BUILD_DEPENDS+= ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} | BUILD_DEPENDS+= ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} | ||||
. endif | |||||
. if defined(_USE_GCC_RUN_DEP) | |||||
RUN_DEPENDS+= ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} | RUN_DEPENDS+= ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} | ||||
. endif | |||||
. if defined(_USE_GCC_TEST_DEP) | |||||
TEST_DEPENDS+= ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} | |||||
. endif | |||||
# Later GCC ports already depend on binutils; make sure whatever we | # Later GCC ports already depend on binutils; make sure whatever we | ||||
# build leverages this as well. | # build leverages this as well. | ||||
USE_BINUTILS= yes | USE_BINUTILS= yes | ||||
Context not available. | |||||
@echo "IGNORE: ${IGNORE}" | @echo "IGNORE: ${IGNORE}" | ||||
.else | .else | ||||
.if defined(USE_GCC) | .if defined(USE_GCC) | ||||
.if defined(_USE_GCC_ARGS) | |||||
@echo "ARGS: ${_USE_GCC_ARGS}" | |||||
.endif | |||||
Done Inline ActionsThis looks like debugging info, it should be removed. mat: This looks like debugging info, it should be removed. | |||||
Done Inline ActionsI guess I should have added some more context. This is indeed debug info, but it's part of the test-gcc target, which has the explicit purpose of printing debug information. fabian.freyer_physik.tu-berlin.de: I guess I should have added some more context. This is indeed debug info, but it's part of the… | |||||
Done Inline ActionsAh, well, you're not using arcanist to upload the diff, so unless you use svn diff --diff-cmd=diff -x -U9999 the review will not get more context and we can't really know what this is all about :-) mat: Ah, well, you're not using arcanist to upload the diff, so unless you use `svn diff --diff… | |||||
.if defined(_GCC_ORLATER) | .if defined(_GCC_ORLATER) | ||||
@echo Port can use later versions. | @echo Port can use later versions. | ||||
.else | .else | ||||
@echo Port cannot use later versions. | @echo Port cannot use later versions. | ||||
.endif | .endif | ||||
.if defined(_USE_GCC_BUILD_DEP) | |||||
@echo ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} will be added to BUILD_DEPENDS. | |||||
.endif | |||||
.if defined(_USE_GCC_RUN_DEP) | |||||
@echo ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} will be added to RUN_DEPENDS. | |||||
.endif | |||||
.if defined(_USE_GCC_TEST_DEP) | |||||
@echo ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} will be added to TEST_DEPENDS. | |||||
.endif | |||||
Done Inline ActionsThis too, debugging. One can see it by running make -V BUILD_DEPENDS, for instance. mat: This too, debugging. One can see it by running `make -V BUILD_DEPENDS`, for instance. | |||||
Done Inline Actionssee above. fabian.freyer_physik.tu-berlin.de: see above. | |||||
Done Inline ActionsI agree with Mat, though it's even stronger: note how just a few lines gerald: I agree with Mat, though it's even stronger: note how just a few lines
below the already… | |||||
.for v in ${GCCVERSIONS} | .for v in ${GCCVERSIONS} | ||||
@echo -n "GCC version: ${_GCCVERSION_${v}_V} " | @echo -n "GCC version: ${_GCCVERSION_${v}_V} " | ||||
.if defined(_GCC_FOUND${v}) | .if defined(_GCC_FOUND${v}) | ||||
Context not available. |
Maybe start it with has or any other verb so that it does not read weird like
Though the framework is hardly consistent here.