xref: /titanic_51/usr/src/cmd/sendmail/cf/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate#
23*7c478bd9Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate#
26*7c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
27*7c478bd9Sstevel@tonic-gate#
28*7c478bd9Sstevel@tonic-gate# cmd/sendmail/cf/Makefile
29*7c478bd9Sstevel@tonic-gate#
30*7c478bd9Sstevel@tonic-gate
31*7c478bd9Sstevel@tonic-gateinclude		../../Makefile.cmd
32*7c478bd9Sstevel@tonic-gate
33*7c478bd9Sstevel@tonic-gateCFS=		sendmail.cf submit.cf
34*7c478bd9Sstevel@tonic-gate
35*7c478bd9Sstevel@tonic-gateSUBCFS=		cf/sendmail.cf cf/submit.cf
36*7c478bd9Sstevel@tonic-gate
37*7c478bd9Sstevel@tonic-gateCOMMONM4FILES=	m4/version.m4 m4/cf.m4 m4/cfhead.m4 m4/proto.m4 \
38*7c478bd9Sstevel@tonic-gate		ostype/solaris8.m4 domain/solaris-generic.m4 \
39*7c478bd9Sstevel@tonic-gate		mailer/local.m4 mailer/smtp.m4
40*7c478bd9Sstevel@tonic-gate
41*7c478bd9Sstevel@tonic-gateROOTETCMAIL = $(ROOTETC)/mail
42*7c478bd9Sstevel@tonic-gate
43*7c478bd9Sstevel@tonic-gateROOTETCMAILFILES=$(CFS:%=$(ROOTETCMAIL)/%)
44*7c478bd9Sstevel@tonic-gate
45*7c478bd9Sstevel@tonic-gateROOTETCMAILCF =	$(ROOTETCMAIL)/cf
46*7c478bd9Sstevel@tonic-gate
47*7c478bd9Sstevel@tonic-gateBUILDPARTS =	$(ROOTETCMAILCF)/README \
48*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/cf/Makefile \
49*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/cf/sendmail.cf \
50*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/cf/sendmail.mc \
51*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/cf/submit.cf \
52*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/cf/submit.mc \
53*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/domain/generic.m4 \
54*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/domain/solaris-antispam.m4 \
55*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/domain/solaris-generic.m4 \
56*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/accept_unqualified_senders.m4 \
57*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/accept_unresolvable_domains.m4 \
58*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/access_db.m4 \
59*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/allmasquerade.m4 \
60*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/always_add_domain.m4 \
61*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/bestmx_is_local.m4 \
62*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/bitdomain.m4 \
63*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/blacklist_recipients.m4 \
64*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/compat_check.m4 \
65*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/conncontrol.m4 \
66*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/delay_checks.m4 \
67*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/dnsbl.m4 \
68*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/domaintable.m4 \
69*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/enhdnsbl.m4 \
70*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/generics_entire_domain.m4 \
71*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/genericstable.m4 \
72*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/greet_pause.m4 \
73*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/ldap_routing.m4 \
74*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/limited_masquerade.m4 \
75*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/local_lmtp.m4 \
76*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/local_no_masquerade.m4 \
77*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/local_procmail.m4 \
78*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/lookupdotdomain.m4 \
79*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/loose_relay_check.m4 \
80*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/mailertable.m4 \
81*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/masquerade_entire_domain.m4 \
82*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/masquerade_envelope.m4 \
83*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/msp.m4 \
84*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/mtamark.m4 \
85*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/no_default_msa.m4 \
86*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/nocanonify.m4 \
87*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/notsticky.m4 \
88*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/nouucp.m4 \
89*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/nullclient.m4 \
90*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/preserve_local_plus_detail.m4 \
91*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/preserve_luser_host.m4 \
92*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/promiscuous_relay.m4 \
93*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/queuegroup.m4 \
94*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/ratecontrol.m4 \
95*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/redirect.m4 \
96*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/relay_based_on_MX.m4 \
97*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/relay_entire_domain.m4 \
98*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/relay_hosts_only.m4 \
99*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/relay_local_from.m4 \
100*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/relay_mail_from.m4 \
101*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/smrsh.m4 \
102*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/stickyhost.m4 \
103*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/use_client_ptr.m4 \
104*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/use_ct_file.m4 \
105*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/use_cw_file.m4 \
106*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/uucpdomain.m4 \
107*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/virtuser_entire_domain.m4 \
108*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/virtusertable.m4 \
109*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/m4/cf.m4 \
110*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/m4/cfhead.m4 \
111*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/m4/proto.m4 \
112*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/m4/version.m4 \
113*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/mailer/local.m4 \
114*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/mailer/procmail.m4 \
115*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/mailer/smtp.m4 \
116*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/mailer/uucp.m4 \
117*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/ostype/solaris2.m4 \
118*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/ostype/solaris2.ml.m4 \
119*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/ostype/solaris2.pre5.m4 \
120*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/ostype/solaris8.m4 \
121*7c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/sh/makeinfo.sh
122*7c478bd9Sstevel@tonic-gate
123*7c478bd9Sstevel@tonic-gateSCRIPTS=	$(ROOTUSRSBIN)/check-hostname \
124*7c478bd9Sstevel@tonic-gate		$(ROOTUSRSBIN)/check-permissions
125*7c478bd9Sstevel@tonic-gate
126*7c478bd9Sstevel@tonic-gate.PARALLEL:	$(BUILDPARTS) $(CFS)
127*7c478bd9Sstevel@tonic-gate
128*7c478bd9Sstevel@tonic-gateFILEMODE=	444
129*7c478bd9Sstevel@tonic-gateM4FLAGS=	-DSUN_HIDE_INTERNAL_DETAILS
130*7c478bd9Sstevel@tonic-gate
131*7c478bd9Sstevel@tonic-gate$(BUILDPARTS) := OWNER=root
132*7c478bd9Sstevel@tonic-gate$(BUILDPARTS) := GROUP=mail
133*7c478bd9Sstevel@tonic-gate
134*7c478bd9Sstevel@tonic-gate.KEEP_STATE:
135*7c478bd9Sstevel@tonic-gate
136*7c478bd9Sstevel@tonic-gateall:		$(CFS)
137*7c478bd9Sstevel@tonic-gate
138*7c478bd9Sstevel@tonic-gate%.cf:	cf/%.cf
139*7c478bd9Sstevel@tonic-gate	$(CP) $< $@
140*7c478bd9Sstevel@tonic-gate
141*7c478bd9Sstevel@tonic-gatecf/%.cf:	cf/%.mc $(COMMONM4FILES)
142*7c478bd9Sstevel@tonic-gate	cd cf; pwd; $(M4) $(M4FLAGS) ../m4/cf.m4 $(<F) > $(@F)
143*7c478bd9Sstevel@tonic-gate
144*7c478bd9Sstevel@tonic-gateinstall:	all $(ROOTETCMAILFILES) $(BUILDPARTS) $(SCRIPTS) .WAIT links
145*7c478bd9Sstevel@tonic-gate
146*7c478bd9Sstevel@tonic-gateclean:
147*7c478bd9Sstevel@tonic-gate	$(RM) $(CFS) $(SUBCFS)
148*7c478bd9Sstevel@tonic-gate
149*7c478bd9Sstevel@tonic-gateclobber: 	clean
150*7c478bd9Sstevel@tonic-gate
151*7c478bd9Sstevel@tonic-gatelint:
152*7c478bd9Sstevel@tonic-gate
153*7c478bd9Sstevel@tonic-gate$(ROOTETCMAIL)/%.cf: %.cf
154*7c478bd9Sstevel@tonic-gate	$(INS.file)
155*7c478bd9Sstevel@tonic-gate
156*7c478bd9Sstevel@tonic-gate$(ROOTETCMAILCF)/%:	%
157*7c478bd9Sstevel@tonic-gate	$(INS.file)
158*7c478bd9Sstevel@tonic-gate
159*7c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN)/check-%:	sh/check-%.sh
160*7c478bd9Sstevel@tonic-gate	$(INS.rename)
161*7c478bd9Sstevel@tonic-gate	$(CHMOD) +x $@
162*7c478bd9Sstevel@tonic-gate
163*7c478bd9Sstevel@tonic-gatelinks:
164*7c478bd9Sstevel@tonic-gate	$(RM) $(ROOTLIB)/mail
165*7c478bd9Sstevel@tonic-gate	$(SYMLINK) ../../etc/mail/cf $(ROOTLIB)/mail
166*7c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/sh/check-hostname
167*7c478bd9Sstevel@tonic-gate	$(SYMLINK) ../../../../usr/sbin/check-hostname $(ROOTETCMAILCF)/sh/check-hostname
168*7c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/sh/check-permissions
169*7c478bd9Sstevel@tonic-gate	$(SYMLINK) ../../../../usr/sbin/check-permissions $(ROOTETCMAILCF)/sh/check-permissions
170*7c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAIL)/main.cf
171*7c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.cf $(ROOTETCMAIL)/main.cf
172*7c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAIL)/subsidiary.cf
173*7c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.cf $(ROOTETCMAIL)/subsidiary.cf
174*7c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/cf/main.cf
175*7c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.cf $(ROOTETCMAILCF)/cf/main.cf
176*7c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/cf/main.mc
177*7c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.mc $(ROOTETCMAILCF)/cf/main.mc
178*7c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/cf/subsidiary.cf
179*7c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.cf $(ROOTETCMAILCF)/cf/subsidiary.cf
180*7c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/cf/subsidiary.mc
181*7c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.mc $(ROOTETCMAILCF)/cf/subsidiary.mc
182