1104352Sphk# $FreeBSD: stable/11/lib/libexpat/Makefile 313538 2017-02-10 07:32:40Z ngie $
2104352Sphk
3298107SgjbPACKAGE=lib${LIB}
4313538SngieEXPAT=		${SRCTOP}/contrib/expat
5104352Sphk
6104461SruLIB=		bsdxml
7284421SbaptSHLIBDIR?=	/lib
8195767SkensmithSHLIB_MAJOR=	4
9104453SphkSRCS=		xmlparse.c xmlrole.c xmltok.c
10178852ScokaneINCS=		bsdxml.h bsdxml_external.h
11104453SphkMAN=		libbsdxml.3
12104352Sphk
13104453Sphk.PATH:		${EXPAT}/lib
14104352Sphk
15178852ScokaneCFLAGS+= 	-I${.CURDIR} -DHAVE_EXPAT_CONFIG_H
16178852ScokaneCLEANFILES=	bsdxml.h bsdxml_external.h
17104352Sphk
18201381SedWARNS?=		2
19201381Sed
20274436Sdes# OK, so it is not entirely unadulterated: we amend the COPYING to
21274436Sdes# point people to the right place, get rid of some VMS stuff and use
22274436Sdes# FreeBSD-style include guards.  We also want to point it at the new
23274436Sdes# bsdxml_external.h rather than the old expat_external.h file.
24104461Srubsdxml.h: expat.h
25104453Sphk	unifdef -U__VMS < ${.ALLSRC} | \
26104453Sphk	sed -e 's/XmlParse_INCLUDED/_BSD_XML_H_/' \
27104453Sphk	    -e 's/COPYING/src\/contrib\/expat\/COPYING/' \
28178852Scokane	    -e 's/expat_external/bsdxml_external/' \
29104453Sphk		> ${.TARGET}
30104352Sphk
31178852Scokanebsdxml_external.h: expat_external.h
32277273Swill	${CP} ${.ALLSRC} ${.TARGET}
33178852Scokane
34104453Sphk.include <bsd.lib.mk>
35