How useful is %%DATADIR%%, anyway?

Mel Flynn rflynn at
Fri Mar 23 23:49:48 UTC 2012

On 3/24/2012 00:31, Michael Scheidell wrote:
> On 3/23/12 6:27 PM, Chris Rees wrote:
>> Almost.  PORTDOCS=* in the Makefile basically uses find on ${DOCSDIR}
>> and sticks it into TMPPLIST.  The advantage is that we then have one
>> line in the Makefile instead of up to 2000 in pkg-plist.
> thats frekeing magic.. how did it find the source in $WRKDIR/specs?

It doesn't. It looks at ${DOCSDIR}. See add-plist-docs target in

As such the requirement for this to work, is that docs are installed in
${DOCSDIR}. If a port has a valid reason to not install documentation
into ${PREFIX}/share/doc/${PORTNAME} then DOCSDIR should be set in the
port's Makefile.
Same applies to PORTDATA and PORTEXAMPLES and their respective DATADIR

I think even more space can be saved if a PORTWWW is introduced, though
PORTWWW=* should be used more carefully as WWWDIR can be dynamic.


More information about the freebsd-ports mailing list