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