# Port make extract: /usr/ports or /var/ports/usr/ports?



## Bobi B. (Nov 27, 2018)

Greetings, All!

I have access to several FreeBSD machines. I've noticed, that on some hosts doing `make extract` (or `make package`), while current working directory is /usr/ports/foo/bar, will create /usr/ports/foo/bar/work, whereas on other hosts it will use /var/ports/usr/ports/foo/bar. What controls this behaviour? Why it is different amongst different hosts? Is there a document describing this? Thanks!


----------



## VladiBG (Nov 27, 2018)

maybe this will help

#extract - Unpacks ${DISTFILES} into ${WRKDIR}.

${WRKDIR} - A Temporary working directory that gets *clobbered* on clean Default: ${WRKDIRPREFIX}$.{CURDIR}/work

_WRKDIRPREFIX - _The place to root the temporary working directory hierarchy. This path must *not* end in '/' Default: none
https://www.freebsd.org/doc/en/books/porters-handbook/porting-wrkdirprefix.html

ports(7)

_ENVIRONMENT_

_PORTSDIR_       Location of the ports tree.    This is    _/usr/ports_ on FreeBSD
           and OpenBSD,    and _/usr/pkgsrc_    on NetBSD.

_WRKDIRPREFIX_  Where to create any temporary files.     Useful    if _PORTSDIR_ is
           read-only (perhaps mounted from a CD-ROM).


You can check /etc/make.conf if there's any _WRKDIRPREFIX _there_._


----------

