summaryrefslogtreecommitdiff
path: root/external/bsd/openldap/Makefile
blob: a7f2a05505a1976247b7f0120e262b23706b2d5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#	$NetBSD: Makefile,v 1.4 2020/08/11 13:15:33 christos Exp $

.include "openldap.mk"

.include <bsd.hostinit.mk>

SUBDIR=		include

SUBDIR+=	lib .WAIT

SUBDIR+=	bin


#
#	maintainer rules
#	----------------
#
#	configure	run configure and create various files for target build.
#	update-include	make configure, then update ./include/ appropriately
#	update-man	make configure, then update ./man/ appropriately
#

#
#	Run configure to create various files.
#	This should only be necessary after updating ./dist/
#

CONFIGURE_ARGS+=	--prefix=${LDAP_PREFIX}
CONFIGURE_ARGS+=	--sysconfdir=${LDAP_ETCDIR}
CONFIGURE_ARGS+=	--localstatedir=${LDAP_RUNDIR}

CONFIGURE_ARGS+=	--enable-dynamic
CONFIGURE_ARGS+=	--disable-bdb
CONFIGURE_ARGS+=	--disable-hdb
CONFIGURE_ARGS+=	--disable-slapd
CONFIGURE_ARGS+=	--with-tls=openssl
CONFIGURE_ARGS+=	--with-threads
CONFIGURE_ARGS+=	--without-cyrus-sasl

configure: work/config.status .PHONY 

work/config.status: ${LDAP_DISTDIR}/configure Makefile openldap.mk
	mkdir -p work
	(cd work \
	    && ${CONFIGURE_ENV} sh ${LDAP_DISTDIR}/configure ${CONFIGURE_ARGS} \
	    || false)

update-include: work/config.status .PHONY
	(cd work/include \
	    && ${MAKE} ldap_config.h \
	    || false)
	@for wf in `find work/include -name '*.h'`; do \
		tf=${LDAP_SRCDIR}/include/$${wf##*/}; \
		tf=$${tf%.tmp} ; \
		cmp -s $${wf} $${tf} > /dev/null 2>&1 || ( \
			rm -f $${tf} && \
			cp $${wf} $${tf} && \
			echo "Updated $${tf}" ; \
		) ; \
	done

update-man: work/config.status .PHONY
	(cd work/doc/man \
	    && ${MAKE} \
	    || false)
	@for wf in `find work/doc/man -name '*.[0-9].tmp'` ; do \
		tf=${LDAP_SRCDIR}/man/$${wf##*/}; \
		tf=$${tf%.tmp} ; \
		cmp -s $${wf} $${tf} > /dev/null 2>&1 || ( \
			rm -f $${tf} && \
			cp $${wf} $${tf} && \
			echo "Updated $${tf}" ; \
		) ; \
	done


.PHONY: clean.work

clean: clean.work
clean.work:
	-rm -f -r work


.include <bsd.hostprog.mk>
.include <bsd.subdir.mk>