fe837ee6c6
- Loop over USES twice, once to define all *_ARGS variables and once to include Uses/*.mk. This allows all Uses/*.mk to examine arguments given to other USES entries. - Always define *_ARGS (possibly empty) and replace commas with spaces. Similar for _USES_POST. Adjust all Uses/*.mk: - defined(u_ARGS) becomes !empty(u_ARGS) - Eliminate helper variables like _*_ARGS=${*_ARGS:C/,/ /g} - Some Uses/*.mk used ":" as argument separator instead of ",", but no port used this form - Uses/cran.mk: remove unused variable VALID_ARGS and USES+=fortran which has no effect - Uses/twisted.mk: simplify handling of the case where neither "build" nor "run" arguments have been specified PR: 193931 Exp-run by: antoine Approved by: portmgr (antoine)
50 lines
1.1 KiB
Makefile
50 lines
1.1 KiB
Makefile
# $FreeBSD$
|
|
#
|
|
# Provide support for imake based projects
|
|
#
|
|
# Feature: imake
|
|
# Usage: USES=imake
|
|
# Valid ARGS: env: do not define any target
|
|
# notall: do not pass -a to xmkmf
|
|
# noman: do not add install-man to
|
|
# INSTALL_TARGET
|
|
#
|
|
# MAINTAINER: x11@FreeBSD.org
|
|
|
|
.if !defined(_INCLUDE_USES_IMAKE_MK)
|
|
_INCLUDE_USES_IMAKE_MK= yes
|
|
|
|
.if ${imake_ARGS:Nnotall:Nenv:Nnoman}
|
|
IGNORE= USES=imake:${imake_ARGS:S/ /,/g} is not a valid argument
|
|
.endif
|
|
|
|
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}"
|
|
|
|
.if ! ${imake_ARGS:Mnotall}
|
|
XMKMF_ARGS+= -a
|
|
.endif
|
|
|
|
.if ! ${imake_ARGS:Menv}
|
|
.if !target(do-configure)
|
|
do-configure:
|
|
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF} ${XMKMF_ARGS})
|
|
.endif
|
|
|
|
.if ! ${imake_ARGS:Mnoman}
|
|
LATE_INSTALL_ARGS= install.man
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.endif
|