Fix a bug when '-f -H' is used and the target already exists. cpdup was
[dragonfly.git] / contrib / sendmail-8.13.8 / libmilter / Makefile.m4
1 dnl $Id: Makefile.m4,v 8.31 2002/06/21 22:01:31 ca Exp $
2 include(confBUILDTOOLSDIR`/M4/switch.m4')
3
4 dnl only required for compilation of EXTRAS
5 define(`confREQUIRE_LIBSM', `true')
6 define(`confMT', `true')
7
8 # sendmail dir
9 SMSRCDIR=       ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
10 PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
11
12 bldPRODUCT_START(`library', `libmilter')
13 define(`bldINSTALLABLE', `true')
14 define(`LIBMILTER_EXTRAS', `errstring.c strl.c')
15 APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')
16 define(`bldSOURCES', `main.c engine.c listener.c handler.c comm.c smfi.c signal.c sm_gethost.c LIBMILTER_EXTRAS ')
17 define(`confBEFORE', `LIBMILTER_EXTRAS')
18 bldPUSH_INSTALL_TARGET(`install-mfapi')
19 bldPRODUCT_END
20
21 PUSHDIVERT(3)
22 errstring.c:
23         ${LN} ${LNOPTS} ${SRCDIR}/libsm/errstring.c .
24
25 strl.c:
26         ${LN} ${LNOPTS} ${SRCDIR}/libsm/strl.c .
27 POPDIVERT
28
29
30 divert(bldTARGETS_SECTION)
31 # Install the API header files
32 MFAPI=  ${SRCDIR}/inc`'lude/libmilter/mfapi.h
33 MFDEF=  ${SRCDIR}/inc`'lude/libmilter/mfdef.h
34 install-mfapi: ${MFAPI}
35         if [ ! -d ${DESTDIR}${INCLUDEDIR}/libmilter ]; then mkdir -p ${DESTDIR}${INCLUDEDIR}/libmilter; else :; fi
36         ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFAPI} ${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h
37         ${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFDEF} ${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h
38 divert(0)
39
40 bldFINISH