bsd.port.mk 1.508 and PORTDOCS globbing

Sam Lawrance boris at brooknet.com.au
Sun Feb 20 17:40:48 PST 2005


The changes to bsd.port.mk 1.508 don't work as expected with globbing.
PORTDOCS is supposed to allow shell glob patterns. Here's the offending
code, now on line 4796:

+.for x in ${PORTDOCS}
+       @if [ ! -e ${DOCSDIR}/${x} ]; then \
+               @${ECHO_CMD} ${DOCSDIR}/${x} | \
+                       ${SED} -e 's,^${PREFIX}/,,' >> ${TMPPLIST}; \
+       fi
+.endfor

The glob is expanded by the shell, so [ gets too many arguments, leading
to errors like this one:

[: /usr/local/share/doc/pyumlgraph/PyUMLGraph.css: unexpected operator

Perhaps the for-loop needs to be pushed out to the shell?

Cheers
Sam Lawrance






More information about the freebsd-ports mailing list