Home | History | Annotate | Line # | Download | only in files
      1 #	$NetBSD: Makefile,v 1.4 2024/07/04 07:52:28 mrg Exp $
      2 
      3 # This makefile is used to generate the libxcb xml/python generated files.
      4 # For now it is broken, and these files were copied from a normal libxcb
      5 # build.
      6 
      7 .include <bsd.own.mk>
      8 .include "Makefile.xmlsrcs"
      9 
     10 PYTHON?=	/usr/pkg/bin/python3.11
     11 PYTHONLIB?=	/usr/pkg/lib/python3.11
     12 C_CLIENT?=	${X11SRCDIR.xcb}/src/c_client.py
     13 
     14 .SUFFIXES: .c .xml
     15 
     16 # Set this to a r/w location if using r/o sources.
     17 NEWCONFIGDIR?=  ${.CURDIR}
     18 
     19 # this doesn't work yet - needs properly install "xcbgen".
     20 # these files are copied from a normal build.
     21 .xml.c:
     22 	( \
     23 	cd ${NEWCONFIGDIR}; \
     24 	env PYTHONPATH=${X11SRCDIR.xcb-proto} ${PYTHON} ${C_CLIENT} \
     25 		-c "libxcb 1.15" \
     26 		-l "X Version 11" \
     27 		-s 3 \
     28 		-p ${PYTHONLIB}/site-packages ${.IMPSRC} \
     29 	)
     30 
     31 generate_from_xml: ${XMLSRCS:.xml=.c}
     32 
     33 all: generate_from_xml
     34 
     35 .include <bsd.subdir.mk>
     36 
     37 .PATH: ${X11SRCDIR.xcb-proto}/src
     38