source: trunk/third/sendmail/mailstats/Makefile.m4 @ 13553

Revision 13553, 2.7 KB checked in by ghudson, 25 years ago (diff)
Create install directories.
Line 
1#
2#  This Makefile is designed to work on the old "make" program.
3#
4#       @(#)Makefile.m4 8.15    (Berkeley)      7/12/1998
5#
6
7# C compiler
8CC=     confCC
9
10# Shell
11SHELL=  confSHELL
12
13# use O=-O (usual) or O=-g (debugging)
14O=      ifdef(`confOPTIMIZE', `confOPTIMIZE', `-O')
15
16# location of sendmail source directory
17SRCDIR= ifdef(`confSRCDIR', `confSRCDIR', `../../src')
18
19# environment definitions (e.g., -D_AIX3)
20ENVDEF= ifdef(`confENVDEF', `confENVDEF')
21
22# see also conf.h for additional compilation flags
23
24# include directories
25INCDIRS=-I${SRCDIR} confINCDIRS
26
27# loader options
28LDOPTS= ifdef(`confLDOPTS', `confLDOPTS')
29
30# library directories
31LIBDIRS=confLIBDIRS
32
33# libraries required on your system
34LIBS=   ifdef(`confLIBS', `confLIBS')
35
36# location of mailstats binary (usually /usr/sbin or /usr/etc)
37SBINDIR=${DESTDIR}ifdef(`confSBINDIR', `confSBINDIR', `/usr/sbin')
38ATHSBINDIR=athSBINDIR
39
40# additional .o files needed
41OBJADD= ifdef(`confOBJADD', `confOBJADD')
42
43undivert(1)
44
45###################  end of user configuration flags  ######################
46
47BUILDBIN=confBUILDBIN
48COPTS=  -I. ${INCDIRS} ${ENVDEF}
49CFLAGS= $O ${COPTS}
50
51BEFORE= confBEFORE
52OBJS=   mailstats.o ${OBJADD}
53
54NROFF=  ifdef(`confNROFF', `confNROFF', `groff -Tascii')
55MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc')
56
57INSTALL=ifdef(`confINSTALL', `confINSTALL', `install')
58BINOWN= ifdef(`confUBINOWN', `confUBINOWN', `bin')
59BINGRP= ifdef(`confUBINGRP', `confUBINGRP', `bin')
60BINMODE=ifdef(`confUBINMODE', `confUBINMODE', `555')
61
62MANOWN= ifdef(`confMANOWN', `confMANOWN', `bin')
63MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin')
64MANMODE=ifdef(`confMANMODE', `confMANMODE', `444')
65
66MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat')
67MAN8=   ${MANROOT}ifdef(`confMAN8', `confMAN8', `8')
68MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8')
69MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0')
70
71ALL=    mailstats mailstats.${MAN8SRC}
72
73all: ${ALL}
74
75mailstats: ${BEFORE} ${OBJS}
76        ${CC} -o mailstats ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
77
78undivert(3)
79
80mailstats.${MAN8SRC}: mailstats.8
81        ${NROFF} ${MANDOC} mailstats.8 > mailstats.${MAN8SRC}
82
83install: install-mailstats install-docs
84
85install-mailstats: mailstats
86        mkdir -p ${DESTDIR}${ATHSBINDIR}
87        mkdir -p ${SBINDIR}
88        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} mailstats ${DESTDIR}${ATHSBINDIR}
89        rm -f ${SBINDIR}/mailstats
90        ln -s ${ATHSBINDIR}/mailstats ${SBINDIR}/mailstats
91
92install-docs: mailstats.${MAN8SRC}
93ifdef(`confNO_MAN_INSTALL', `dnl',
94`       mkdir -p ${MAN8}
95        ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} mailstats.${MAN8SRC} ${MAN8}/mailstats.${MAN8EXT}')
96
97clean:
98        rm -f ${OBJS} mailstats
99
100################  Dependency scripts
101include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE',
102`generic').m4)dnl
103################  End of dependency scripts
Note: See TracBrowser for help on using the repository browser.