Home | History | Annotate | Line # | Download | only in openldap
      1 #	$NetBSD: Makefile,v 1.5 2025/09/05 21:16:13 christos Exp $
      2 
      3 .include "openldap.mk"
      4 
      5 .include <bsd.hostinit.mk>
      6 
      7 SUBDIR=		include
      8 
      9 SUBDIR+=	lib .WAIT
     10 
     11 SUBDIR+=	bin
     12 
     13 
     14 #
     15 #	maintainer rules
     16 #	----------------
     17 #
     18 #	configure	run configure and create various files for target build.
     19 #	update-include	make configure, then update ./include/ appropriately
     20 #	update-man	make configure, then update ./man/ appropriately
     21 #
     22 
     23 #
     24 #	Run configure to create various files.
     25 #	This should only be necessary after updating ./dist/
     26 #
     27 
     28 CONFIGURE_ARGS+=	--prefix=${LDAP_PREFIX}
     29 CONFIGURE_ARGS+=	--sysconfdir=${LDAP_ETCDIR}
     30 CONFIGURE_ARGS+=	--localstatedir=${LDAP_RUNDIR}
     31 
     32 CONFIGURE_ARGS+=	--enable-dynamic
     33 #CONFIGURE_ARGS+=	--disable-bdb
     34 #CONFIGURE_ARGS+=	--disable-hdb
     35 CONFIGURE_ARGS+=	--disable-slapd
     36 CONFIGURE_ARGS+=	--with-tls=openssl
     37 CONFIGURE_ARGS+=	--with-threads
     38 CONFIGURE_ARGS+=	--without-cyrus-sasl
     39 
     40 configure: work/config.status .PHONY 
     41 
     42 work/config.status: ${LDAP_BUILDDIR}/configure Makefile openldap.mk
     43 	mkdir -p work
     44 	(cd work \
     45 	    && ${CONFIGURE_ENV} sh ${LDAP_BUILDDIR}/configure ${CONFIGURE_ARGS} \
     46 	    || false)
     47 
     48 update-include: work/config.status .PHONY
     49 	(cd work/include \
     50 	    && ${MAKE} ldap_config.h \
     51 	    || false)
     52 	@for wf in `find work/include -name '*.h'`; do \
     53 		tf=${LDAP_SRCDIR}/include/$${wf##*/}; \
     54 		tf=$${tf%.tmp} ; \
     55 		cmp -s $${wf} $${tf} > /dev/null 2>&1 || ( \
     56 			rm -f $${tf} && \
     57 			cp $${wf} $${tf} && \
     58 			echo "Updated $${tf}" ; \
     59 		) ; \
     60 	done
     61 
     62 update-man: work/config.status .PHONY
     63 	(cd work/doc/man \
     64 	    && ${MAKE} \
     65 	    || false)
     66 	@for wf in `find work/doc/man -name '*.[0-9].tmp'` ; do \
     67 		tf=${LDAP_SRCDIR}/man/$${wf##*/}; \
     68 		tf=$${tf%.tmp} ; \
     69 		cmp -s $${wf} $${tf} > /dev/null 2>&1 || ( \
     70 			rm -f $${tf} && \
     71 			cp $${wf} $${tf} && \
     72 			echo "Updated $${tf}" ; \
     73 		) ; \
     74 	done
     75 
     76 
     77 .PHONY: clean.work
     78 
     79 clean: clean.work
     80 clean.work:
     81 	-rm -f -r work
     82 
     83 
     84 .include <bsd.hostprog.mk>
     85 .include <bsd.subdir.mk>
     86