Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jan 2014 14:09:01 +0400
From:      Lev Serebryakov <lev@FreeBSD.org>
To:        ports@FreeBSD.org
Subject:   How to use ${WRKDIR}, ${PREFIX} and other variables in target names?
Message-ID:  <788996080.20140119140901@serebryakov.spb.ru>

next in thread | raw e-mail | index | archive | help
Hello, Ports.

I want to write something like this in port's Makefile

===============================
SOME_FILE=${WRKDIR}/name

some-target: ${SOME_FILE}

${SOME_FILE}: ${WRKDIR}/${DISTNAME}
    # Some commands to generate ${SOME_FILE}
===============================

 But it doesn't work. make complains, that

"I don't know how to make /distname"

 Of course, ${WRKDIR}/${DISTNAME} exists (it is directory with unpacked
sources).

 It looks like WRKDIR is not defined when target/prerequisites names are
expanded.

 I've tried to use bsd.port.pre.mk/bsd.port.post.mk, but it doesn't help
at all.

-- 
// Black Lion AKA Lev Serebryakov <lev@FreeBSD.org>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?788996080.20140119140901>