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

Revision 13553, 2.6 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.14    (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# include directories
23INCDIRS=-I${SRCDIR} confINCDIRS
24
25# loader options
26LDOPTS= ifdef(`confLDOPTS', `confLDOPTS')
27
28# library directories
29LIBDIRS=confLIBDIRS
30
31# libraries required on your system
32LIBS=   ifdef(`confLIBS', `confLIBS')
33
34# location of smrsh binary (usually /usr/libexec or /usr/etc)
35EBINDIR=${DESTDIR}ifdef(`confEBINDIR', `confEBINDIR', `/usr/libexec')
36ATHEBINDIR=athEBINDIR
37
38# additional .o files needed
39OBJADD= ifdef(`confOBJADD', `confOBJADD')
40
41undivert(1)
42
43###################  end of user configuration flags  ######################
44
45BUILDBIN=confBUILDBIN
46COPTS=  -I. ${INCDIRS} ${ENVDEF}
47CFLAGS= $O ${COPTS}
48
49BEFORE= confBEFORE
50OBJS=   smrsh.o ${OBJADD}
51
52# Which *roff program has -mandoc support
53NROFF=  ifdef(`confNROFF', `confNROFF', `groff -Tascii')
54MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc')
55
56INSTALL=ifdef(`confINSTALL', `confINSTALL', `install')
57BINOWN= ifdef(`confUBINOWN', `confUBINOWN', `bin')
58BINGRP= ifdef(`confUBINGRP', `confUBINGRP', `bin')
59BINMODE=ifdef(`confUBINMODE', `confUBINMODE', `555')
60
61MANOWN= ifdef(`confMANOWN', `confMANOWN', `bin')
62MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin')
63MANMODE=ifdef(`confMANMODE', `confMANMODE', `444')
64
65MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat')
66MAN8=   ${MANROOT}ifdef(`confMAN8', `confMAN8', `8')
67MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8')
68MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0')
69
70ALL=    smrsh smrsh.${MAN8SRC}
71
72all: ${ALL}
73
74smrsh: ${BEFORE} ${OBJS}
75        ${CC} -o smrsh ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS}
76
77undivert(3)
78
79smrsh.${MAN8SRC}: smrsh.8
80        ${NROFF} ${MANDOC} smrsh.8 > smrsh.${MAN8SRC}
81
82install: install-smrsh install-docs
83
84install-smrsh: smrsh
85        mkdir -p ${DESTDIR}${ATHEBINDIR}
86        mkdir -p ${EBINDIR}
87        ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} smrsh ${DESTDIR}${ATHEBINDIR}
88        rm -f ${EBINDIR}/smrsh
89        ln -s ${ATHEBINDIR}/smrsh ${EBINDIR}/smrsh
90
91install-docs: smrsh.${MAN8SRC}
92ifdef(`confNO_MAN_INSTALL', `dnl',
93`       mkdir -p ${MAN8}
94        ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} smrsh.${MAN8SRC} ${MAN8}/smrsh.${MAN8EXT}')
95
96clean:
97        rm -f ${OBJS} smrsh
98
99################  Dependency scripts
100include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE',
101`generic').m4)dnl
102################  End of dependency scripts
Note: See TracBrowser for help on using the repository browser.