Changeset View
Changeset View
Standalone View
Standalone View
lang/python-doc-html/Makefile
Show All 20 Lines | |||||
DOCSDIR= ${PREFIX}/share/doc/${PYTHON_VERSION} | DOCSDIR= ${PREFIX}/share/doc/${PYTHON_VERSION} | ||||
PLIST= ${WRKDIR}/pkg-plist.${DOCFORMAT} | PLIST= ${WRKDIR}/pkg-plist.${DOCFORMAT} | ||||
DOCFORMAT?= html | DOCFORMAT?= html | ||||
.if ${DOCFORMAT} != "html" && ${DOCFORMAT} != "pdf-a4" && ${DOCFORMAT} != "pdf-letter" && ${DOCFORMAT} != "text" | .if ${DOCFORMAT} != "html" && ${DOCFORMAT} != "pdf-a4" && ${DOCFORMAT} != "pdf-letter" && ${DOCFORMAT} != "text" | ||||
IGNORE= invalid value for DOCFORMAT: "${DOCFORMAT}", possible values are: text, html, pdf-a4, pdf-letter | IGNORE= invalid value for DOCFORMAT: "${DOCFORMAT}", possible values are: text, html, pdf-a4, pdf-letter | ||||
.endif | .endif | ||||
matthew: See paste(1) for a shellish way of turning a sequence of lines into a comma separated list… | |||||
.if ${DOCFORMAT} != "html" && ${DOCFORMAT} != "text" | .if ${DOCFORMAT} != "html" && ${DOCFORMAT} != "text" | ||||
WRKSRC= ${WRKDIR}/docs-pdf | WRKSRC= ${WRKDIR}/docs-pdf | ||||
.endif | .endif | ||||
# Create a distinfo that contains all possible DISTFILES | |||||
matthewUnsubmitted Done Inline ActionsHmmm.... the way I've seen this done before is to use something like: .if make(makesum) || defined(FETCH_ALL) ... .endif to override variable settings when rebuilding distinfo. You should support FETCH_ALL as well here given the set of distfiles you'ld download is dependent on the selected options. This should allow you to put all the code into the main Makefile. If you grep for make(makesum) you'll find plenty of examples. matthew: Hmmm.... the way I've seen this done before is to use something like:
```
.if make(makesum) ||… | |||||
leresAuthorUnsubmitted Done Inline ActionsSee new version leres: See new version | |||||
makesum: | |||||
${FILESDIR}/gen-makesum.sh | ${MAKE} -f - | |||||
Done Inline Actionsmake(1) supports reading the makefile from stdin, so I think this could be: ${FILESDIR}/gen-makesum.sh | ${MAKE} -f - tobik: make(1) supports reading the makefile from stdin, so I think this could be:
```
${FILESDIR}/gen… | |||||
Done Inline ActionsOvercome by events leres: Overcome by events | |||||
pre-install: | pre-install: | ||||
@${FIND} ${WRKSRC} -type f | ${SED} -e 's|^${WRKSRC}|%%DOCSDIR%%|' | ${SORT} > ${PLIST} | @${FIND} ${WRKSRC} -type f | ${SED} -e 's|^${WRKSRC}|%%DOCSDIR%%|' | ${SORT} > ${PLIST} | ||||
do-install: | do-install: | ||||
${MKDIR} ${STAGEDIR}${DOCSDIR}/ | ${MKDIR} ${STAGEDIR}${DOCSDIR}/ | ||||
cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} | cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} | ||||
.include <bsd.port.mk> | .include <bsd.port.mk> | ||||
Not Done Inline ActionsI don't think you need the loop over ${DOCFORMATS} when generating all_master_sites -- the results are very repetetive: lucid-nonsense:~...ports/lang/python-doc-html:% make makesum -V MASTER_SITES https://www.python.org/ftp/python/doc/2.7.15/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/2.7.15/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/2.7.15/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/2.7.15/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.6.8/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.6.8/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.6.8/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.6.8/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.7.2/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.7.2/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.7.2/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.7.2/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.5.6/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.5.6/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.5.6/ https://www.python.org/ftp/python/doc/current/ https://www.python.org/ftp/python/doc/3.5.6/ https://www.python.org/ftp/python/doc/current/ matthew: I don't think you need the loop over ${DOCFORMATS} when generating all_master_sites -- the… | |||||
Not Done Inline ActionsRef. your question about array indexing above -- you could just use the value of ${v} as the distfile group tag here. matthew: Ref. your question about array indexing above -- you could just use the value of ${v} as the… |
See paste(1) for a shellish way of turning a sequence of lines into a comma separated list:
The Makefile-ish way of doing this is to use the :ts modifier: