Date: Mon, 22 Jun 2015 21:34:54 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r390332 - head/Mk Message-ID: <201506222134.t5MLYsle020445@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Mon Jun 22 21:34:53 2015 New Revision: 390332 URL: https://svnweb.freebsd.org/changeset/ports/390332 Log: factorize add-plist-docs and add-plist-examples Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Mon Jun 22 21:19:05 2015 (r390331) +++ head/Mk/bsd.port.mk Mon Jun 22 21:34:53 2015 (r390332) @@ -5089,33 +5089,21 @@ ${TMPPLIST}: ${TMPPLIST_SORT}: ${TMPPLIST} @${SORT} -u ${TMPPLIST} >${TMPPLIST_SORT} -.if !target(add-plist-docs) -.if defined(PORTDOCS) && !defined(NOPORTDOCS) -add-plist-docs: -.for x in ${PORTDOCS} +.for _type in EXAMPLES DOCS +.if !target(add-plist-${_type:tl}) +.if defined(PORT${_type}) && !defined(NOPORT${_type}) +add-plist-${_type:tl}: +.for x in ${PORT${_type}} @if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ - if [ ! -e ${STAGEDIR}${DOCSDIR}/${x} ]; then \ - ${ECHO_CMD} ${DOCSDIR}/${x} >> ${TMPPLIST}; \ + if [ ! -e ${STAGEDIR}${${_type}DIR}/${x} ]; then \ + ${ECHO_CMD} ${${_type}DIR}/${x} >> ${TMPPLIST}; \ fi;fi .endfor - @${FIND} -P ${PORTDOCS:S/^/${STAGEDIR}${DOCSDIR}\//} ! -type d 2>/dev/null | \ + @${FIND} -P ${PORT${_type}:S/^/${STAGEDIR}${${_type}DIR}\//} ! -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} .endif .endif - -.if !target(add-plist-examples) -.if defined(PORTEXAMPLES) && !defined(NOPORTEXAMPLES) -add-plist-examples: -.for x in ${PORTEXAMPLES} - @if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ - if [ ! -e ${STAGEDIR}${EXAMPLESDIR}/${x} ]; then \ - ${ECHO_CMD} ${EXAMPLESDIR}/${x} >> ${TMPPLIST}; \ - fi;fi .endfor - @${FIND} -P ${PORTEXAMPLES:S/^/${STAGEDIR}${EXAMPLESDIR}\//} ! -type d 2>/dev/null | \ - ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} -.endif -.endif .if !target(add-plist-data) .if defined(PORTDATA)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506222134.t5MLYsle020445>