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

Revision 13553, 5.2 KB checked in by ghudson, 25 years ago (diff)
Create install directories.
Line 
1#
2#  This Makefile is designed to work on any reasonably current version of
3#  "make" program.
4#
5#       @(#)Makefile.m4 8.26 (Berkeley) 1/23/1999
6#
7
8# C compiler
9CC=     confCC
10
11# Shell
12SHELL=  confSHELL
13
14# use O=-O (usual) or O=-g (debugging)
15O=      ifdef(`confOPTIMIZE', `confOPTIMIZE', `-O')
16
17# location of sendmail source directory
18SRCDIR= .
19
20# define the database mechanisms available for map & alias lookups:
21#       -DNDBM -- use new DBM
22#       -DNEWDB -- use new Berkeley DB
23#       -DNIS -- include NIS support
24# The really old (V7) DBM library is no longer supported.
25# See README for a description of how these flags interact.
26#
27MAPDEF= ifdef(`confMAPDEF', `confMAPDEF')
28
29# environment definitions (e.g., -D_AIX3)
30ENVDEF= ifdef(`confENVDEF', `confENVDEF')
31
32# see also conf.h for additional compilation flags
33
34# include directories
35INCDIRS=confINCDIRS
36
37# loader options
38LDOPTS= ifdef(`confLDOPTS', `confLDOPTS')
39
40# library directories
41LIBDIRS=confLIBDIRS
42
43# libraries required on your system
44#  delete -l44bsd if you are not running BIND 4.9.x
45LIBS=   ifdef(`confLIBS', `confLIBS') -lwrap
46
47# location of sendmail binary (usually /usr/sbin or /usr/lib)
48BINDIR= ${DESTDIR}ifdef(`confMBINDIR', `confMBINDIR', `/usr/sbin')
49
50# BINDIR for symlink purposes (no DESTDIR)
51LNBINDIR= ifdef(`confMBINDIR', `confMBINDIR', `/usr/sbin')
52
53# location of "user" binaries (usually /usr/bin or /usr/ucb)
54UBINDIR=${DESTDIR}ifdef(`confUBINDIR', `confUBINDIR', `/usr/bin')
55
56# location of sendmail.st file (usually /var/log or /usr/lib)
57STDIR=  ${DESTDIR}ifdef(`confSTDIR', `confSTDIR', `/var/log')
58
59# location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
60HFDIR=  ${DESTDIR}ifdef(`confHFDIR', `confHFDIR', `/usr/share/misc')
61
62# additional .o files needed
63OBJADD= ifdef(`confOBJADD', `confOBJADD') ifdef(`confSMOBJADD', `confSMOBJADD')
64
65undivert(1)
66
67###################  end of user configuration flags  ######################
68
69BUILDBIN=confBUILDBIN
70COPTS=  -I. ${INCDIRS} ${MAPDEF} ${ENVDEF}
71CFLAGS= $O ${COPTS}
72
73BEFORE= confBEFORE
74OBJS=   alias.o arpadate.o clock.o collect.o conf.o control.o convtime.o \
75        daemon.o deliver.o domain.o envelope.o err.o headers.o macro.o \
76        main.o map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
77        safefile.o savemail.o snprintf.o srvrsmtp.o stab.o stats.o \
78        sysexits.o trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
79
80LINKS=  ifdef(`confLINKS', `confLINKS',
81        `${UBINDIR}/newaliases \
82        ${UBINDIR}/mailq \
83        ${UBINDIR}/hoststat \
84        ${UBINDIR}/purgestat')
85
86NROFF=  ifdef(`confNROFF', `confNROFF', `groff -Tascii')
87MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc')
88
89INSTALL=ifdef(`confINSTALL', `confINSTALL', `install')
90BINOWN= ifdef(`confSBINOWN', `confSBINOWN', `root')
91BINGRP= ifdef(`confSBINGRP', `confSBINGRP', `kmem')
92BINMODE=ifdef(`confSBINMODE', `confSBINMODE', `4555')
93
94MANOWN= ifdef(`confMANOWN', `confMANOWN', `bin')
95MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin')
96MANMODE=ifdef(`confMANMODE', `confMANMODE', `444')
97
98MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat')
99MAN1=   ${MANROOT}ifdef(`confMAN1', `confMAN1', `1')
100MAN1EXT=ifdef(`confMAN1EXT', `confMAN1EXT', `1')
101MAN1SRC=ifdef(`confMAN1SRC', `confMAN1SRC', `0')
102MAN5=   ${MANROOT}ifdef(`confMAN5', `confMAN5', `5')
103MAN5EXT=ifdef(`confMAN5EXT', `confMAN5EXT', `5')
104MAN5SRC=ifdef(`confMAN5SRC', `confMAN5SRC', `0')
105MAN8=   ${MANROOT}ifdef(`confMAN8', `confMAN8', `8')
106MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8')
107MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0')
108
109ALL=    sendmail sendmail.st aliases.${MAN5SRC} mailq.${MAN1SRC} newaliases.${MAN1SRC} sendmail.${MAN8SRC}
110
111all: ${ALL}
112
113sendmail: ${BEFORE} ${OBJS}
114        ${CC} -o sendmail ${LDOPTS} ${LIBDIRS} ${OBJS} ${LIBS}
115
116undivert(3)
117
118sendmail.st:
119        cp /dev/null sendmail.st
120
121aliases.${MAN5SRC}: aliases.5
122        ${NROFF} ${MANDOC} aliases.5 > aliases.${MAN5SRC}
123
124mailq.${MAN1SRC}: mailq.1
125        ${NROFF} ${MANDOC} mailq.1 > mailq.${MAN1SRC}
126
127newaliases.${MAN1SRC}: newaliases.1
128        ${NROFF} ${MANDOC} newaliases.1 > newaliases.${MAN1SRC}
129
130sendmail.${MAN8SRC}: sendmail.8
131        ${NROFF} ${MANDOC} sendmail.8 > sendmail.${MAN8SRC}
132
133install: install-sendmail install-docs
134
135install-sendmail: sendmail
136        mkdir -p ${BINDIR}
137        mkdir -p ${UBINDIR}
138        mkdir -p ${HFDIR}
139        mkdir -p ${STDIR}
140        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
141        for i in ${LINKS}; do rm -f $$i; ln -s ${LNBINDIR}/sendmail $$i; done
142        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf \
143            ${HFDIR}/sendmail.hf
144        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 sendmail.st \
145            ${STDIR}/sendmail.st
146
147install-docs: aliases.${MAN5SRC} mailq.${MAN1SRC} newaliases.${MAN1SRC} sendmail.${MAN8SRC}
148ifdef(`confNO_MAN_INSTALL', `dnl',
149`       mkdir -p ${MAN1}
150        mkdir -p ${MAN5}
151        mkdir -p ${MAN8}
152        ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} sendmail.${MAN8SRC} ${MAN8}/sendmail.${MAN8EXT}
153        ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} aliases.${MAN5SRC} ${MAN5}/aliases.${MAN5EXT}
154        ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} mailq.${MAN1SRC} ${MAN1}/mailq.${MAN1EXT}
155        ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} newaliases.${MAN1SRC} ${MAN1}/newaliases.${MAN1EXT}')
156
157clean:
158        rm -f ${OBJS} sendmail
159
160################  Dependency scripts
161include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', `generic').m4)dnl
162################  End of dependency scripts
Note: See TracBrowser for help on using the repository browser.