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