2013-06-28 13:51:05 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# Provide support for imake based projects
|
|
|
|
#
|
|
|
|
# Feature: imake
|
|
|
|
# Usage: USES=imake
|
|
|
|
# Valid ARGS: env: do not define any target
|
2013-09-02 15:26:34 +02:00
|
|
|
# notall: do not pass -a to xmkmf
|
2014-08-12 18:24:27 +02:00
|
|
|
# noman: do not add install-man to
|
|
|
|
# INSTALL_TARGET
|
2013-06-28 13:51:05 +02:00
|
|
|
#
|
2014-03-15 11:31:54 +01:00
|
|
|
# MAINTAINER: x11@FreeBSD.org
|
2013-06-28 13:51:05 +02:00
|
|
|
|
|
|
|
.if !defined(_INCLUDE_USES_IMAKE_MK)
|
|
|
|
_INCLUDE_USES_IMAKE_MK= yes
|
|
|
|
|
2014-08-12 18:24:27 +02:00
|
|
|
.if ${imake_ARGS:Nnotall:Nenv:Nnoman}
|
|
|
|
IGNORE= USES=imake:${imake_ARGS:S/ /,/g} is not a valid argument
|
|
|
|
.endif
|
|
|
|
|
2013-06-28 13:51:05 +02:00
|
|
|
BUILD_DEPENDS+= imake:${PORTSDIR}/devel/imake
|
|
|
|
|
|
|
|
.if defined(USE_GCC)
|
|
|
|
IMAKECPP= ${CPP}
|
|
|
|
IMAKECPPFLAGS= -DCppCmd=${CPP} -DCcCmd=${CC} -DCplusplusCmd=${CXX}
|
|
|
|
.else
|
|
|
|
IMAKECPP= tradcpp
|
|
|
|
IMAKECPPFLAGS= -DCppCmd=tradcpp -DCcCmd=${CC} -DCplusplusCmd=${CXX}
|
|
|
|
BUILD_DEPENDS+= tradcpp:${PORTSDIR}/devel/tradcpp
|
|
|
|
.endif
|
|
|
|
MAKE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}"
|
|
|
|
CONFIGURE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}"
|
2013-09-02 15:26:34 +02:00
|
|
|
|
2014-08-12 18:24:27 +02:00
|
|
|
.if ! ${imake_ARGS:Mnotall}
|
2013-09-02 15:26:34 +02:00
|
|
|
XMKMF_ARGS+= -a
|
|
|
|
.endif
|
2013-06-28 13:51:05 +02:00
|
|
|
|
2014-08-12 18:24:27 +02:00
|
|
|
.if ! ${imake_ARGS:Menv}
|
2013-06-28 13:51:05 +02:00
|
|
|
.if !target(do-configure)
|
|
|
|
do-configure:
|
2013-09-02 15:26:34 +02:00
|
|
|
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF} ${XMKMF_ARGS})
|
2013-06-28 13:51:05 +02:00
|
|
|
.endif
|
2013-07-03 21:23:20 +02:00
|
|
|
|
2014-08-12 18:24:27 +02:00
|
|
|
.if ! ${imake_ARGS:Mnoman}
|
2013-07-03 21:23:20 +02:00
|
|
|
LATE_INSTALL_ARGS= install.man
|
|
|
|
.endif
|
|
|
|
|
2013-06-28 13:51:05 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.endif
|