diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-05-22 20:29:07 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-05-22 20:29:07 +0000 |
commit | fb626923f916a9743d803101b3c6fe88f8ee6356 (patch) | |
tree | ef5795269176f7363a245888a5bb127db87e0aeb /proto/xcb-proto/Makefile | |
parent | 800a551306f8f5a498cfec16a6ca3afd918d1120 (diff) |
add code to conditionnally install the xcbgen python module.
Diffstat (limited to 'proto/xcb-proto/Makefile')
-rw-r--r-- | proto/xcb-proto/Makefile | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/proto/xcb-proto/Makefile b/proto/xcb-proto/Makefile index 9c50c450f..6e91df322 100644 --- a/proto/xcb-proto/Makefile +++ b/proto/xcb-proto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2009/05/22 16:06:29 matthieu Exp $ +# $OpenBSD: Makefile,v 1.2 2009/05/22 20:29:06 matthieu Exp $ PKGCONFIG= xcb-proto.pc @@ -31,6 +31,7 @@ FILES= \ xvmc.xml XCBDATADIR= ${X11BASE}/share/xcb +PYTHONDIR= ${X11BASE}/lib/python${PYTHON_VERSION}/site-packages EXTRA_PKGCONFIG_SUBST= '-e s,@xcbincludedir@,$${datadir}/xcb,g' \ '-e s,@pythondir@,$${prefix}/lib/python${PYTHON_VERSION}/site-packages,g' @@ -44,4 +45,27 @@ realinstall: eval "$$j"; \ done +.if defined(XENOCARA_REBUILD_XCB) && ${XENOCARA_REBUILD_XCB:L} == "yes" + +XCBGEN_SRCS= \ + __init__.py \ + error.py \ + expr.py \ + matcher.py \ + state.py \ + xtypes.py + +install-py: + mkdir -p ${DESTDIR}${PYTHONDIR}/xcbgen + cd ${.CURDIR}/xcbgen ; for i in ${XCBGEN_SRCS}; do \ + ${INSTALL_DATA} $$i ${DESTDIR}${PYTHONDIR}/xcbgen; \ + done + cd ${DESTDIR}${PYTHONDIR}/xcbgen; \ + env PYTHON=python${PYTHON_VERSION} ${SHELL} ${.CURDIR}/py-compile \ + --basedir ${PYTHONDIR}/xcbgen ${XCBGEN_SRCS} + +realinstall: install-py + +.endif + .include <bsd.xorg.mk> |