Help with 'exists' in Makefile
Sergey Matveychuk
sem at ciam.ru
Mon Dec 8 00:29:00 PST 2003
Hello!
Take a look at attached Makefile.
Type 'make test'.
Why '.if exists()' always fails?
I've tried it both -STABLE and -CURRENT.
It's a someting magic for me.
--
Sem.
-------------- next part --------------
PORTNAME= some-port
PORTVERSION= 0.1
CATEGORIES= devel
MASTER_SITES=
DISTFILES=
MAINTAINER= sem at ciam.ru
COMMENT= some port
TESTS_COOKIE= ${WRKDIR}/.tests_built
do-fetch:
@${DO_NADA}
do-build:
@${TOUCH} ${TOUCH_FLAGS} ${TESTS_COOKIE}
@${ECHO_MSG} ""
@${ECHO_MSG} "===> Build done."
@${ECHO_MSG} " You can run tests now with \`make test'"
@${ECHO_MSG} ""
test: build
.if exists(${TESTS_COOKIE})
@${ECHO_MSG} "===> Running tests."; \
${ECHO_MSG} "===> Tests done."
.else
@${ECHO_MSG} "===> Tests was not build"; \
${ECHO_MSG} ""
.endif
.include <bsd.port.mk>
More information about the freebsd-ports
mailing list