Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/imake.mk
# Provide support for imake based projects | # Provide support for imake based projects | ||||
# | # | ||||
# Feature: imake | # Feature: imake | ||||
# Usage: USES=imake | # Usage: USES=imake | ||||
# Valid ARGS: env: do not define any target | # Valid ARGS: env: do not define any target | ||||
# notall: do not pass -a to xmkmf | # notall: do not pass -a to xmkmf | ||||
# noman: do not add install-man to | # noman: do not add install-man to | ||||
# INSTALL_TARGET | # INSTALL_TARGET | ||||
# | # | ||||
# MAINTAINER: x11@FreeBSD.org | # MAINTAINER: x11@FreeBSD.org | ||||
.if !defined(_INCLUDE_USES_IMAKE_MK) | .if !defined(_INCLUDE_USES_IMAKE_MK) | ||||
_INCLUDE_USES_IMAKE_MK= yes | _INCLUDE_USES_IMAKE_MK= yes | ||||
.if ${imake_ARGS:Nnotall:Nenv:Nnoman} | . if ${imake_ARGS:Nnotall:Nenv:Nnoman} | ||||
IGNORE= USES=imake:${imake_ARGS:S/ /,/g} is not a valid argument | IGNORE= USES=imake:${imake_ARGS:S/ /,/g} is not a valid argument | ||||
.endif | . endif | ||||
BUILD_DEPENDS+= imake:devel/imake | BUILD_DEPENDS+= imake:devel/imake | ||||
.if defined(USE_GCC) | . if defined(USE_GCC) | ||||
IMAKECPP= ${CPP} | IMAKECPP= ${CPP} | ||||
IMAKECPPFLAGS= -DCppCmd=${CPP} -DCcCmd=${CC} -DCplusplusCmd=${CXX} | IMAKECPPFLAGS= -DCppCmd=${CPP} -DCcCmd=${CC} -DCplusplusCmd=${CXX} | ||||
.else | . else | ||||
IMAKECPP= tradcpp | IMAKECPP= tradcpp | ||||
IMAKECPPFLAGS= -DCppCmd=tradcpp -DCcCmd=${CC} -DCplusplusCmd=${CXX} | IMAKECPPFLAGS= -DCppCmd=tradcpp -DCcCmd=${CC} -DCplusplusCmd=${CXX} | ||||
BUILD_DEPENDS+= tradcpp:devel/tradcpp | BUILD_DEPENDS+= tradcpp:devel/tradcpp | ||||
.endif | . endif | ||||
MAKE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}" | MAKE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}" | ||||
CONFIGURE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}" | CONFIGURE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}" | ||||
.if ! ${imake_ARGS:Mnotall} | . if ! ${imake_ARGS:Mnotall} | ||||
XMKMF_ARGS+= -a | XMKMF_ARGS+= -a | ||||
.endif | . endif | ||||
.if ! ${imake_ARGS:Menv} | . if ! ${imake_ARGS:Menv} | ||||
.if !target(do-configure) | . if !target(do-configure) | ||||
do-configure: | do-configure: | ||||
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF} ${XMKMF_ARGS}) | @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF} ${XMKMF_ARGS}) | ||||
.endif | . endif | ||||
.if ! ${imake_ARGS:Mnoman} | . if ! ${imake_ARGS:Mnoman} | ||||
LATE_INSTALL_ARGS= install.man | LATE_INSTALL_ARGS= install.man | ||||
.endif | . endif | ||||
.endif | . endif | ||||
.endif | .endif |