Makefile revision 3916
f743002678eb67b99bbc29fee116b65d9530fec0wrowe#
80833bb9a1bf25dcf19e814438a4b311d2e1f4cffuankg# CDDL HEADER START
6736c640e65e06990ef33af71ee81fac4df4ff5fjim#
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton# The contents of this file are subject to the terms of the
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton# Common Development and Distribution License (the "License").
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton# You may not use this file except in compliance with the License.
00f53c09b10014571b639d5e9df993fb188220a6sf#
00f53c09b10014571b639d5e9df993fb188220a6sf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
00f53c09b10014571b639d5e9df993fb188220a6sf# or http://www.opensolaris.org/os/licensing.
00f53c09b10014571b639d5e9df993fb188220a6sf# See the License for the specific language governing permissions
459eaf0826f995b73a0dc066f59ea10d2824e72dsf# and limitations under the License.
459eaf0826f995b73a0dc066f59ea10d2824e72dsf#
459eaf0826f995b73a0dc066f59ea10d2824e72dsf# When distributing Covered Code, include this CDDL HEADER in each
459eaf0826f995b73a0dc066f59ea10d2824e72dsf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6d6cd31bddca0b7d9cf9d18e46cd2361530e24f3sf# If applicable, add the following below this CDDL HEADER, with the
6d6cd31bddca0b7d9cf9d18e46cd2361530e24f3sf# fields enclosed by brackets "[]" replaced with your own identifying
6d6cd31bddca0b7d9cf9d18e46cd2361530e24f3sf# information: Portions Copyright [yyyy] [name of copyright owner]
53e9b27aba029b18be814df40bcf6f0428771d1efuankg#
53e9b27aba029b18be814df40bcf6f0428771d1efuankg# CDDL HEADER END
53e9b27aba029b18be814df40bcf6f0428771d1efuankg#
53e9b27aba029b18be814df40bcf6f0428771d1efuankg# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
53e9b27aba029b18be814df40bcf6f0428771d1efuankg#
347074f011eae59e518ddf8d8474d35e029a2056sfinclude ../../make-rules/shared-macros.mk
fe2e0971201136f2dbc6b000ad5c006a1a6ff672sf
fe2e0971201136f2dbc6b000ad5c006a1a6ff672sfCOMPONENT_NAME= sendmail
347074f011eae59e518ddf8d8474d35e029a2056sfCOMPONENT_VERSION= 8.15.1
21da42a6b8f551ef603bd06356d3bf71d6d0c21dsfCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
21da42a6b8f551ef603bd06356d3bf71d6d0c21dsfCOMPONENT_PROJECT_URL= ftp://ftp.sendmail.org/pub/sendmail/
21da42a6b8f551ef603bd06356d3bf71d6d0c21dsfCOMPONENT_ARCHIVE= $(COMPONENT_NAME).$(COMPONENT_VERSION).tar.gz
2876a591f17b0c6ed0cf28da929643965e67c953sfCOMPONENT_ARCHIVE_HASH= \
2876a591f17b0c6ed0cf28da929643965e67c953sf sha256:ed1f9e0f2a1a58c9ff94950264a2fc186d6fd237bac66b175d79a2b89a950746
2876a591f17b0c6ed0cf28da929643965e67c953sfCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)$(COMPONENT_ARCHIVE)
2876a591f17b0c6ed0cf28da929643965e67c953sfCOMPONENT_SIG_URL= $(COMPONENT_ARCHIVE_URL).sig
38eb64d29a17648e108852de42f23335aecaa8f8sfCOMPONENT_BUGDB= utility/sendmail
976f49eaf81ffe917272e4f1834115dec06962b0sf
38eb64d29a17648e108852de42f23335aecaa8f8sfTPNO= 21799
5a1f28ac93914b4bae892c69ac4b3e670bc10da8nd
5a1f28ac93914b4bae892c69ac4b3e670bc10da8ndinclude $(WS_MAKE_RULES)/prep.mk
5a1f28ac93914b4bae892c69ac4b3e670bc10da8ndinclude $(WS_MAKE_RULES)/justmake.mk
0361488d59792d052a9f8024c0e5a1ef909252e6rplueminclude $(WS_MAKE_RULES)/ips.mk
0361488d59792d052a9f8024c0e5a1ef909252e6rplueminclude $(WS_MAKE_RULES)/lint-libraries.mk
0361488d59792d052a9f8024c0e5a1ef909252e6rpluem
6135cc8178d75a52828ad225b1d568cd1e97799erpluem# Although we build 32_and_64, everything except libmilter just wants 64,
6135cc8178d75a52828ad225b1d568cd1e97799erpluem# which is why the macros just below only have values for 64. libmilter
6135cc8178d75a52828ad225b1d568cd1e97799erpluem# is dealt with further below.
44761f3e3072cf78a4997a88bb9a515ca101a1f4covenerPKG_PROTO_DIRS += $(BUILD_DIR_64)
44761f3e3072cf78a4997a88bb9a515ca101a1f4covenerPKG_PROTO_DIRS += $(BUILD_DIR_64)/obj.SunOS.$(OS_VERSION).$(ARCH)
44761f3e3072cf78a4997a88bb9a515ca101a1f4covenerPKG_PROTO_DIRS += $(COMPONENT_DIR)/files
2ba1586475aa4ec972ca7c19b06d53bf76f0ee7efuankgPKG_PROTO_DIRS += $(COMPONENT_DIR)/files/man
2ba1586475aa4ec972ca7c19b06d53bf76f0ee7efuankg
c7502880be24058c7fc03771fda61f95bc238339sf# Userland default includes -mt which links with libthread which we don't need.
c7502880be24058c7fc03771fda61f95bc238339sfstudio_MT =
c7502880be24058c7fc03771fda61f95bc238339sf
ca61ccd0c306c2c72df153688ba1b49f3eceed80sf# We set ARCH to match sendmail's configure-like script: on x86, it simply
ca61ccd0c306c2c72df153688ba1b49f3eceed80sf# uses 'uname -m', but on sparc it shortens "sun4*" into "sun4".
ca61ccd0c306c2c72df153688ba1b49f3eceed80sfARCH := $(shell uname -m)
6bb524f1895f30265a1431afc460977d391cb36bsfifeq ($(findstring sun4,$(ARCH)),sun4)
6bb524f1895f30265a1431afc460977d391cb36bsfARCH = sun4
ca61ccd0c306c2c72df153688ba1b49f3eceed80sfendif
6bb524f1895f30265a1431afc460977d391cb36bsfFILE_DIR=$(COMPONENT_DIR)/files
8233250a7f6c06225752db92bf32117bd9648c1dsfM4_ARG=-DSUN_HIDE_INTERNAL_DETAILS
8233250a7f6c06225752db92bf32117bd9648c1dsfSM_BUILD_SUB_DIR=obj.SunOS.$(OS_VERSION).$(ARCH)
8233250a7f6c06225752db92bf32117bd9648c1dsfSM_BUILD_DIR=$(@D)/$(SM_BUILD_SUB_DIR)
b40bfdb714672f972887f9f1f1e154e00125bb68covener
b40bfdb714672f972887f9f1f1e154e00125bb68covener# libmilter is built 32- and 64-bit, but its Makefile installs into a common
b40bfdb714672f972887f9f1f1e154e00125bb68covener# location, so we use the macro below in its manifest to distinguish between
b40bfdb714672f972887f9f1f1e154e00125bb68covener# the different built objects.
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrinPKG_MACROS += LIBMILTER_BUILD_DIR=$(SM_BUILD_SUB_DIR)
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrinCLEAN_PATHS += $(FILE_DIR)/aux/mailq
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin# This appends "+Sun" to the version string, which we do for historical
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin# reasons. If we did this via patch, then we would have to revise the patch
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin# with every new release, since the version string changes every time.
23f1535d6a60817d2846bac0aea230ea475d7dccminfrinCOMPONENT_PREP_ACTION = $(GSED) -i -e 's/\(Version\[\] = "8\.[^"]*\)/\1+Sun/' \
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung $(COMPONENT_SRC)/sendmail/version.c
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung# libmilter and sendmail must come before include, so appending to the default
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung# value of LINT_FLAGS will not work; we must redefine it here.
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjungSM_DEFS= -DSOLARIS=21200
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjungSM_INCLUDES= -I$(SM_BUILD_DIR)/libmilter -I$(SOURCE_DIR)/sendmail \
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung -I$(SOURCE_DIR)/include -I$(SOURCE_DIR) -I.
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjungLINT_FLAGS = -nsvx $(SM_DEFS) $(SM_INCLUDES)
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjungCCOPTS = -erroff=E_STATEMENT_NOT_REACHED $(CC_BITS)
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung
6249dfa569d3b4f1f539665b979a80c6e335d93etrawickCOMPONENT_BUILD_ARGS += CC="$(CC)"
6249dfa569d3b4f1f539665b979a80c6e335d93etrawickCOMPONENT_BUILD_ARGS += CCOPTS="$(CCOPTS)"
0827cb14e550f6f65018431c22c2c913631c8f25kbrandCOMPONENT_BUILD_ARGS += CCLINK="$(CC)"
6249dfa569d3b4f1f539665b979a80c6e335d93etrawickCOMPONENT_BUILD_ARGS += CC_PIC="$(CC_PIC)"
ae600ca541efc686b34f8b1f21bd3d0741d37674covenerCOMPONENT_BUILD_ARGS += LDOPTS="$(CC_BITS)"
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick
cfa64348224b66dd1c9979b809406c4d15b1c137fielding# mailq's Makefile doesn't grok the 32- and 64-bit build. We just want 64.
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim# So we clean before we build, and the last build (64) wins, which is what
cfa64348224b66dd1c9979b809406c4d15b1c137fielding# we want.
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajimCOMPONENT_POST_BUILD_ACTION = cd $(FILE_DIR)/aux ; \
cfa64348224b66dd1c9979b809406c4d15b1c137fielding $(GMAKE) BITS=$(BITS) clean build
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim
cfa64348224b66dd1c9979b809406c4d15b1c137fieldingCOMPONENT_POST_INSTALL_ACTION += cd $(FILE_DIR)/aux ; $(GMAKE) install ;
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajimCOMPONENT_POST_INSTALL_ACTION += \
cfa64348224b66dd1c9979b809406c4d15b1c137fielding $(CP) $(FILE_DIR)/cf/domain/solaris-generic.m4 $(@D)/cf/domain/ ;
COMPONENT_POST_INSTALL_ACTION += \
$(CP) $(FILE_DIR)/cf/cf/sendmail.mc $(@D)/cf/cf/ ;
# Without the two $(CP)s below we would pick up the version of submit.cf
# from under $(COMPONENT_SRC), which is not what we want because it contains
# information (user, hostname, date, build path) from the upstream machine
# where the distro was created. So we build our own version here, using
# $(M4_ARG), which suppresses the inclusion of all that information.
# Then we copy it to $(PROTO_DIR)/cf/cf instead of the more intuitive
# $(PROTOETCDIR)/mail/cf/cf to match the transform in the manifest that
# picks up everything under etc/mail/cf/ from cf/ instead.
COMPONENT_POST_INSTALL_ACTION += \
cd $(@D)/cf/cf ; \
$(RM) submit.cf ; \
m4 $(M4_ARG) ../m4/cf.m4 submit.mc > submit.cf ; \
$(CP) submit.cf $(PROTOETCDIR)/mail ; \
$(MKDIR) $(PROTO_DIR)/cf/cf ; \
$(CP) submit.cf $(PROTO_DIR)/cf/cf ; \
m4 $(M4_ARG) ../m4/cf.m4 sendmail.mc > sendmail.cf
COMPONENT_TEST_ARGS += CC="$(CC)"
COMPONENT_TEST_ARGS += CCOPTS="$(CCOPTS)"
COMPONENT_TEST_ARGS += CCLINK="$(CC)"
COMPONENT_TEST_ARGS += CC_PIC="$(CC_PIC)"
COMPONENT_TEST_ARGS += LDOPTS="$(CC_BITS)"
COMPONENT_TEST_ENV += PATH=/usr/gnu/bin:/usr/bin
# The transforms below abstract out the 32- or 64-bit specific parts of
# the results, so we can use a common "all" master file.
COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
COMPONENT_TEST_TRANSFORMS += \
'-e "s|$(SM_BUILD_SUB_DIR)|\\$$(SM_BUILD_SUB_DIR)|g" ' \
'-e "s|$(OS_VERSION)|\\$$(OS_VERSION)|g" ' \
'-e "s|$(ARCH)|\\$$(ARCH)|g" ' \
'-e "s|^$(CC).*$$|XXX_CC_XXX|g" ' \
'-e "/^XXX_CC_XXX\\$$/d" '
ASLR_MODE = $(ASLR_ENABLE)
INSTALL_64=
# common targets
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
test: $(TEST_32_and_64)
REQUIRED_PACKAGES += database/berkeleydb-5
REQUIRED_PACKAGES += library/libmilter
REQUIRED_PACKAGES += library/openldap
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += runtime/perl-512
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/core-os
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/network