components/sendmail/Makefile
author John Beck <John.Beck@Oracle.COM>
Fri, 16 Jan 2015 12:38:45 -0800
changeset 3649 4006eaaa7d29
child 3651 1ca146aae014
permissions -rw-r--r--
20355401 add sendmail to Userland 15399081 SUNBT6560957 sendmail should not use SCCS keywords in version info
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3649
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     1
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     3
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     7
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    12
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    18
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    20
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    21
# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    22
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    24
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    25
COMPONENT_NAME=		sendmail
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    26
COMPONENT_VERSION=	8.14.9
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    27
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    28
COMPONENT_PROJECT_URL=	ftp://ftp.sendmail.org/pub/sendmail/
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    29
COMPONENT_ARCHIVE=	$(COMPONENT_NAME).$(COMPONENT_VERSION).tar.gz
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	\
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    31
    sha256:f5a497151abd8f341cca0736c3f9bd703d574d93146b2989689dff6d7a445d75
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)$(COMPONENT_ARCHIVE)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    33
COMPONENT_SIG_URL=	$(COMPONENT_ARCHIVE_URL).sig
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    34
COMPONENT_BUGDB=	utility/sendmail
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    35
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    36
TPNO=			7435
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    37
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    38
include ../../make-rules/prep.mk
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    39
include ../../make-rules/justmake.mk
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    40
include ../../make-rules/ips.mk
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    41
include ../../make-rules/lint-libraries.mk
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    42
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    43
PKG_PROTO_DIRS += $(BUILD_DIR_32)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    44
PKG_PROTO_DIRS += $(BUILD_DIR_32)/obj.SunOS.$(OS_VERSION).$(ARCH)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    45
PKG_PROTO_DIRS += $(COMPONENT_DIR)/files
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    46
PKG_PROTO_DIRS += $(COMPONENT_DIR)/files/man
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    47
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    48
# Userland default includes -mt which links with libthread which we don't need.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    49
studio_MT =
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    50
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    51
# We set ARCH to match sendmail's configure-like script: on x86, it simply
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    52
# uses 'uname -m', but on sparc it shortens "sun4*" into "sun4".
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    53
ARCH	:=	$(shell uname -m)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    54
ifeq ($(findstring sun4,$(ARCH)),sun4)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    55
ARCH	=	sun4
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    56
endif
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    57
FILE_DIR=$(COMPONENT_DIR)/files
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    58
M4_ARG=-DSUN_HIDE_INTERNAL_DETAILS
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    59
SM_BUILD_SUB_DIR=obj.SunOS.$(OS_VERSION).$(ARCH)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    60
SM_BUILD_DIR=$(@D)/$(SM_BUILD_SUB_DIR)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    61
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    62
CLEAN_PATHS += $(FILE_DIR)/aux/mailq
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    63
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    64
# This appends "+Sun" to the version string, which we do for historical
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    65
# reasons.  If we did this via patch, then we would have to revise the patch
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    66
# with every new release, since the version string changes every time.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    67
COMPONENT_PREP_ACTION =	$(GSED) -i -e 's/\(Version\[\] = "8\.[^"]*\)/\1+Sun/' \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    68
    $(COMPONENT_SRC)/sendmail/version.c
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    69
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    70
# libmilter and sendmail must come before include, so appending to the default
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    71
# value of LINT_FLAGS will not work; we must redefine it here.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    72
SM_DEFS=	-DSOLARIS=21200
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    73
SM_INCLUDES=	-I$(SM_BUILD_DIR)/libmilter -I$(SOURCE_DIR)/sendmail \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    74
    -I$(SOURCE_DIR)/include -I$(SOURCE_DIR) -I.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    75
LINT_FLAGS =	-nsvx $(SM_DEFS) $(SM_INCLUDES)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    76
CCOPTS =	-erroff=E_STATEMENT_NOT_REACHED $(CC_BITS)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    77
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    78
COMPONENT_BUILD_ARGS += CC="$(CC)"
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    79
COMPONENT_BUILD_ARGS += CCOPTS="$(CCOPTS)"
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    80
COMPONENT_BUILD_ARGS += CCLINK="$(LD)"
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    81
COMPONENT_BUILD_ARGS += LDOPTS="$(CC_BITS)"
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    82
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    83
COMPONENT_POST_BUILD_ACTION = cd $(FILE_DIR)/aux ; $(GMAKE) build
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    84
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    85
COMPONENT_POST_INSTALL_ACTION += cd $(FILE_DIR)/aux ; $(GMAKE) install ;
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    86
COMPONENT_POST_INSTALL_ACTION += \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    87
    $(CP) $(FILE_DIR)/cf/domain/solaris-generic.m4 $(@D)/cf/domain/ ;
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    88
COMPONENT_POST_INSTALL_ACTION += \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    89
    $(CP) $(FILE_DIR)/cf/cf/sendmail.mc $(@D)/cf/cf/ ;
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    90
COMPONENT_POST_INSTALL_ACTION += \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    91
    cd $(@D)/cf/cf ; \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    92
    $(RM) submit.cf ; \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    93
    m4 $(M4_ARG) ../m4/cf.m4 submit.mc > submit.cf ; \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    94
    m4 $(M4_ARG) ../m4/cf.m4 sendmail.mc > sendmail.cf
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    95
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    96
COMPONENT_TEST_ARGS += CC="$(CC)"
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    97
COMPONENT_TEST_ARGS += CCOPTS="$(CCOPTS)"
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    98
COMPONENT_TEST_ARGS += CCLINK="$(LD)"
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    99
COMPONENT_TEST_ARGS += LDOPTS="$(CC_BITS)"
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   100
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   101
COMPONENT_TEST_ENV +=	PATH=/usr/gnu/bin:/usr/bin
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   102
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   103
COMPONENT_TEST_TRANSFORMS += \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   104
    '-e "s|$(SM_BUILD_SUB_DIR)|\\$$(SM_BUILD_SUB_DIR)|g" ' \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   105
    '-e "s|$(OS_VERSION)|\\$$(OS_VERSION)|g" ' \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   106
    '-e "s|$(ARCH)|\\$$(ARCH)|g" ' \
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   107
    '-e "s|$(CC)|\\$$(CC)|g" '
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   108
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   109
ASLR_MODE = $(ASLR_ENABLE)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   110
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   111
INSTALL_32=
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   112
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   113
# common targets
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   114
build:		$(BUILD_32)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   115
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   116
install:	$(INSTALL_32)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   117
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   118
test:		$(TEST_32)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   119
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   120
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   121
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   122
include ../../make-rules/depend.mk