xref: /freebsd/lib/libexpat/Makefile (revision c4ca06b9b37b1e9ef6c4d96ef26e131fe687077c)
14e07a41bSPoul-Henning Kamp# $FreeBSD$
24e07a41bSPoul-Henning Kamp
34e07a41bSPoul-Henning KampEXPAT=		${.CURDIR}/../../contrib/expat
44e07a41bSPoul-Henning Kamp
58a349ed8SPoul-Henning KampLIB=		bsdxml
641d8423fSGordon TetlowSHLIBDIR?=	/lib
7419ecd5dSDaniel EischenSHLIB_MAJOR=	3
88a349ed8SPoul-Henning KampSRCS=		xmlparse.c xmlrole.c xmltok.c
9c4ca06b9SColeman KaneINCS=		bsdxml.h bsdxml_external.h
108a349ed8SPoul-Henning KampMAN=		libbsdxml.3
114e07a41bSPoul-Henning Kamp
124e07a41bSPoul-Henning Kamp.PATH:		${EXPAT}/lib
134e07a41bSPoul-Henning Kamp
14c4ca06b9SColeman KaneCFLAGS+= 	-I${.CURDIR} -DHAVE_EXPAT_CONFIG_H
15c4ca06b9SColeman KaneCLEANFILES=	bsdxml.h bsdxml_external.h
164e07a41bSPoul-Henning Kamp
178a349ed8SPoul-Henning Kamp# OK, so it is not entirely unadultered: we ammend the COPYING
188a349ed8SPoul-Henning Kamp# to point people to the right place, get rid of some VMS stuff
19c4ca06b9SColeman Kane# and use FreeBSD style indempotency #ifndefs. We also want to
20c4ca06b9SColeman Kane# point it at the new bsdxml_external.h rather than the old
21c4ca06b9SColeman Kane# expat_external.h file.
228a349ed8SPoul-Henning Kamp#
238a349ed8SPoul-Henning Kampbsdxml.h: expat.h
248a349ed8SPoul-Henning Kamp	unifdef -U__VMS < ${.ALLSRC} | \
258a349ed8SPoul-Henning Kamp	sed -e 's/XmlParse_INCLUDED/_BSD_XML_H_/' \
268a349ed8SPoul-Henning Kamp	    -e 's/COPYING/src\/contrib\/expat\/COPYING/' \
27c4ca06b9SColeman Kane	    -e 's/expat_external/bsdxml_external/' \
288a349ed8SPoul-Henning Kamp		> ${.TARGET}
294e07a41bSPoul-Henning Kamp
30c4ca06b9SColeman Kanebsdxml_external.h: expat_external.h
31c4ca06b9SColeman Kane	cp ${.ALLSRC} ${.TARGET}
32c4ca06b9SColeman Kane
334e07a41bSPoul-Henning Kamp.include <bsd.lib.mk>
34