freebsd-ports/devel/py-pathtools/Makefile
Nicola Vitale 8e81938fc0 Fix build when DOCS option is off.
The build failed if py-sphinx was not installed as it always ran
post-build and post-install targets.

This patch also moves OPTIONS_DEFINE further down (as suggested by portlint).

PR:		246643
Submitted by:	Robert Kruus <robert.kruus@utoronto.ca>
2020-05-26 21:21:27 +00:00

33 lines
690 B
Makefile

# $FreeBSD$
PORTNAME= pathtools
PORTVERSION= 0.1.2
PORTREVISION= 5
CATEGORIES= devel
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= nivit@FreeBSD.org
COMMENT= File system general utilities for Python
LICENSE= MIT
USES= python
USE_PYTHON= distutils autoplist
OPTIONS_DEFINE= DOCS
DOCS_BUILD_DEPENDS= ${PY_SPHINX}
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
PORTDOCS= *
post-build-DOCS-on:
@(cd ${WRKSRC}/docs ; ${MAKE} SPHINXBUILD=sphinx-build-${PYTHON_VER} html)
post-install-DOCS-on:
@(cd ${WRKSRC}/docs/build/html ; ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \
"! -name .buildinfo -and ! -name objects.inv")
.include <bsd.port.mk>