diff options
author | bapt <bapt@FreeBSD.org> | 2015-06-23 05:34:53 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-06-23 05:34:53 +0800 |
commit | c1829560418f6634520e6c24e561fb8008d1d7d9 (patch) | |
tree | b05e15bf6acba88cd56bd31254a032b80196fc8f /Mk/bsd.port.mk | |
parent | a4c495d3ef0d33413083eb04a14a1436c82dbf71 (diff) | |
download | freebsd-ports-gnome-c1829560418f6634520e6c24e561fb8008d1d7d9.tar.gz freebsd-ports-gnome-c1829560418f6634520e6c24e561fb8008d1d7d9.tar.zst freebsd-ports-gnome-c1829560418f6634520e6c24e561fb8008d1d7d9.zip |
factorize add-plist-docs and add-plist-examples
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r-- | Mk/bsd.port.mk | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index b86ade95675e..818c8fa257bc 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -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) |