summaryrefslogtreecommitdiff
path: root/databases/postgresql/Makefile.getopt
blob: 1c45b7edda0e6f0472ac2679d6956d0fedd87c7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# $NetBSD: Makefile.getopt,v 1.1 2001/05/14 14:52:36 jlam Exp $
#
# This Makefile fragment is included by PostgreSQL packages built from the
# main sources of the PostgreSQL distribution that use getopt_long()
# functionality.

.if exists(/usr/include/getopt.h)
GETOPT_H=	/usr/include/getopt.h
.else
GETOPT_H=	${LOCALBASE}/include/getopt.h
DEPENDS+=	libgetopt>=1.3:../../devel/libgetopt
LIBS+=		-lgetopt
.endif

# This target links the getopt header into ${WRKINCDIR}/include, which is
# searched first by the C preprocessor.
# 
link-getopt-headers:
	${MKDIR} -p ${WRKINCDIR}
	${RM} -f ${WRKINCDIR}/getopt.h
	${LN} -sf ${GETOPT_H} ${WRKINCDIR}