xref: /illumos-gate/usr/src/cmd/sendmail/cf/Makefile (revision 24fe0b3b)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
50ea5e3a5Sjjj# Common Development and Distribution License (the "License").
60ea5e3a5Sjjj# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
21058561cbSjbeck
227c478bd9Sstevel@tonic-gate#
23*24fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate# cmd/sendmail/cf/Makefile
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateinclude		../../Makefile.cmd
307c478bd9Sstevel@tonic-gate
31d4660949SjbeckCFS=		sendmail.cf submit.cf
327c478bd9Sstevel@tonic-gate
33d4660949SjbeckSUBCFS=		cf/sendmail.cf cf/submit.cf
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateCOMMONM4FILES=	m4/version.m4 m4/cf.m4 m4/cfhead.m4 m4/proto.m4 \
367c478bd9Sstevel@tonic-gate		ostype/solaris8.m4 domain/solaris-generic.m4 \
377c478bd9Sstevel@tonic-gate		mailer/local.m4 mailer/smtp.m4
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateROOTETCMAIL = $(ROOTETC)/mail
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gateROOTETCMAILFILES=$(CFS:%=$(ROOTETCMAIL)/%)
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gateROOTETCMAILCF =	$(ROOTETCMAIL)/cf
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gateBUILDPARTS =	$(ROOTETCMAILCF)/README \
467c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/cf/Makefile \
477c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/cf/sendmail.cf \
487c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/cf/sendmail.mc \
497c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/cf/submit.cf \
507c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/cf/submit.mc \
517c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/domain/generic.m4 \
527c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/domain/solaris-antispam.m4 \
537c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/domain/solaris-generic.m4 \
547c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/accept_unqualified_senders.m4 \
557c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/accept_unresolvable_domains.m4 \
567c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/access_db.m4 \
577c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/allmasquerade.m4 \
587c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/always_add_domain.m4 \
59058561cbSjbeck		$(ROOTETCMAILCF)/feature/badmx.m4 \
607c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/bestmx_is_local.m4 \
617c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/bitdomain.m4 \
627c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/blacklist_recipients.m4 \
63058561cbSjbeck		$(ROOTETCMAILCF)/feature/block_bad_helo.m4 \
647c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/compat_check.m4 \
657c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/conncontrol.m4 \
667c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/delay_checks.m4 \
677c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/dnsbl.m4 \
687c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/domaintable.m4 \
697c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/enhdnsbl.m4 \
707c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/generics_entire_domain.m4 \
717c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/genericstable.m4 \
727c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/greet_pause.m4 \
737c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/ldap_routing.m4 \
747c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/limited_masquerade.m4 \
757c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/local_lmtp.m4 \
767c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/local_no_masquerade.m4 \
777c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/local_procmail.m4 \
787c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/lookupdotdomain.m4 \
797c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/loose_relay_check.m4 \
807c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/mailertable.m4 \
817c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/masquerade_entire_domain.m4 \
827c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/masquerade_envelope.m4 \
837c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/msp.m4 \
847c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/mtamark.m4 \
857c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/no_default_msa.m4 \
867c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/nocanonify.m4 \
877c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/notsticky.m4 \
887c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/nouucp.m4 \
897c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/nullclient.m4 \
907c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/preserve_local_plus_detail.m4 \
917c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/preserve_luser_host.m4 \
927c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/promiscuous_relay.m4 \
937c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/queuegroup.m4 \
947c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/ratecontrol.m4 \
957c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/redirect.m4 \
967c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/relay_based_on_MX.m4 \
977c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/relay_entire_domain.m4 \
987c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/relay_hosts_only.m4 \
997c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/relay_local_from.m4 \
1007c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/relay_mail_from.m4 \
101058561cbSjbeck		$(ROOTETCMAILCF)/feature/require_rdns.m4 \
1027c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/smrsh.m4 \
1037c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/stickyhost.m4 \
1047c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/use_client_ptr.m4 \
1057c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/use_ct_file.m4 \
1067c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/use_cw_file.m4 \
1077c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/uucpdomain.m4 \
1087c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/virtuser_entire_domain.m4 \
1097c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/feature/virtusertable.m4 \
1107c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/m4/cf.m4 \
1117c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/m4/cfhead.m4 \
1127c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/m4/proto.m4 \
1137c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/m4/version.m4 \
1147c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/mailer/local.m4 \
1157c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/mailer/procmail.m4 \
1167c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/mailer/smtp.m4 \
1177c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/mailer/uucp.m4 \
1187c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/ostype/solaris2.m4 \
1197c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/ostype/solaris2.ml.m4 \
1207c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/ostype/solaris2.pre5.m4 \
1217c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/ostype/solaris8.m4 \
1227c478bd9Sstevel@tonic-gate		$(ROOTETCMAILCF)/sh/makeinfo.sh
1237c478bd9Sstevel@tonic-gate
1247c478bd9Sstevel@tonic-gateSCRIPTS=	$(ROOTUSRSBIN)/check-hostname \
1257c478bd9Sstevel@tonic-gate		$(ROOTUSRSBIN)/check-permissions
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gate.PARALLEL:	$(BUILDPARTS) $(CFS)
1287c478bd9Sstevel@tonic-gate
1297c478bd9Sstevel@tonic-gateFILEMODE=	444
1307c478bd9Sstevel@tonic-gateM4FLAGS=	-DSUN_HIDE_INTERNAL_DETAILS
1317c478bd9Sstevel@tonic-gate
1327c478bd9Sstevel@tonic-gate.KEEP_STATE:
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gateall:		$(CFS)
1357c478bd9Sstevel@tonic-gate
1367c478bd9Sstevel@tonic-gate%.cf:	cf/%.cf
1377c478bd9Sstevel@tonic-gate	$(CP) $< $@
1387c478bd9Sstevel@tonic-gate
1397c478bd9Sstevel@tonic-gatecf/%.cf:	cf/%.mc $(COMMONM4FILES)
1407c478bd9Sstevel@tonic-gate	cd cf; pwd; $(M4) $(M4FLAGS) ../m4/cf.m4 $(<F) > $(@F)
1417c478bd9Sstevel@tonic-gate
1427c478bd9Sstevel@tonic-gateinstall:	all $(ROOTETCMAILFILES) $(BUILDPARTS) $(SCRIPTS) .WAIT links
1437c478bd9Sstevel@tonic-gate
1447c478bd9Sstevel@tonic-gateclean:
1457c478bd9Sstevel@tonic-gate	$(RM) $(CFS) $(SUBCFS)
1467c478bd9Sstevel@tonic-gate
1477c478bd9Sstevel@tonic-gateclobber: 	clean
1487c478bd9Sstevel@tonic-gate
1497c478bd9Sstevel@tonic-gatelint:
1507c478bd9Sstevel@tonic-gate
1517c478bd9Sstevel@tonic-gate$(ROOTETCMAIL)/%.cf: %.cf
1527c478bd9Sstevel@tonic-gate	$(INS.file)
1537c478bd9Sstevel@tonic-gate
1547c478bd9Sstevel@tonic-gate$(ROOTETCMAILCF)/%:	%
1557c478bd9Sstevel@tonic-gate	$(INS.file)
1567c478bd9Sstevel@tonic-gate
1577c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN)/check-%:	sh/check-%.sh
1587c478bd9Sstevel@tonic-gate	$(INS.rename)
1597c478bd9Sstevel@tonic-gate	$(CHMOD) +x $@
1607c478bd9Sstevel@tonic-gate
1617c478bd9Sstevel@tonic-gatelinks:
1627c478bd9Sstevel@tonic-gate	$(RM) $(ROOTLIB)/mail
1637c478bd9Sstevel@tonic-gate	$(SYMLINK) ../../etc/mail/cf $(ROOTLIB)/mail
1647c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/sh/check-hostname
1657c478bd9Sstevel@tonic-gate	$(SYMLINK) ../../../../usr/sbin/check-hostname $(ROOTETCMAILCF)/sh/check-hostname
1667c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/sh/check-permissions
1677c478bd9Sstevel@tonic-gate	$(SYMLINK) ../../../../usr/sbin/check-permissions $(ROOTETCMAILCF)/sh/check-permissions
1687c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAIL)/main.cf
1697c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.cf $(ROOTETCMAIL)/main.cf
1707c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAIL)/subsidiary.cf
1717c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.cf $(ROOTETCMAIL)/subsidiary.cf
1727c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/cf/main.cf
1737c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.cf $(ROOTETCMAILCF)/cf/main.cf
1747c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/cf/main.mc
1757c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.mc $(ROOTETCMAILCF)/cf/main.mc
1767c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/cf/subsidiary.cf
1777c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.cf $(ROOTETCMAILCF)/cf/subsidiary.cf
1787c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETCMAILCF)/cf/subsidiary.mc
1797c478bd9Sstevel@tonic-gate	$(SYMLINK) sendmail.mc $(ROOTETCMAILCF)/cf/subsidiary.mc
180