components/cmake/Makefile
author naoki.tanaka@oracle.com <naoki.tanaka@oracle.com>
Thu, 03 Sep 2015 09:24:16 -0700
changeset 4837 5c4d5a9885cc
parent 4339 6501cf9c29f9
child 5066 7e7b4d607ab6
permissions -rw-r--r--
21757228 libmd.so check in sudo Makefile fails 19859344 The sudo test: target in the component Makefile could do a standard "gmake test" 20461166 SUDO should have some master test results to compare against
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     1
#
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     3
#
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     7
#
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    12
#
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    18
#
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    20
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    21
#
3814
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    22
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    23
#
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    24
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    25
include ../../make-rules/shared-macros.mk
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    26
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    27
COMPONENT_NAME=		cmake
614
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    28
COMPONENT_VERSION=	2.8.6
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    29
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    30
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    31
COMPONENT_ARCHIVE_HASH=	\
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    32
    sha256:e6999b81ac367d85ffb0f69b6c4a0ef96f95dc154efd3592f9cfebacdf75728e
614
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    33
COMPONENT_ARCHIVE_URL=	http://www.cmake.org/files/v2.8/$(COMPONENT_ARCHIVE)
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    34
COMPONENT_PROJECT_URL=  http://www.cmake.org/
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    35
COMPONENT_BUGDB=	utility/cmake
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    36
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1352
diff changeset
    37
TPNO=			6581
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1352
diff changeset
    38
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3814
diff changeset
    39
include $(WS_MAKE_RULES)/prep.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3814
diff changeset
    40
include $(WS_MAKE_RULES)/configure.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3814
diff changeset
    41
include $(WS_MAKE_RULES)/ips.mk
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    42
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    43
# Need to remove this option from LD_OPTIONS (only affects sparc build);
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    44
# it causes a SegFault failure in kwsys/testSystemInformation
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    45
# when testing on sparc
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    46
LD_MAP_NOEXBSS=
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    47
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    48
LDFLAGS +=	$($(COMPILER)_NORUNPATH)
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    49
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    50
# We need these in the environment, although they are already passed
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    51
# as CONFIGURE_OPTIONS; otherwise the correct compilers are not used
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    52
CONFIGURE_ENV +=	CC="$(CC)"	
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    53
CONFIGURE_ENV +=	CXX="$(CXX)"	
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    54
CONFIGURE_ENV +=	LDFLAGS="$(LDFLAGS)"	
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    55
CONFIGURE_ENV +=	MAKE="$(GMAKE)"	
3814
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    56
CONFIGURE_ENV +=	CFLAGS="$(CFLAGS)"
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    57
CONFIGURE_ENV +=	CXXFLAGS="$(CXXFLAGS)"
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    58
614
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    59
# Use system-installed third-party libraries, rather than the private
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    60
# copies in the cmake source.  Only libarchive will come from the cmake
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    61
# source, since it is not currently part of Solaris.
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    62
CONFIGURE_OPTIONS +=	--system-curl
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    63
CONFIGURE_OPTIONS +=	--system-expat
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    64
CONFIGURE_OPTIONS +=	--system-zlib
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    65
CONFIGURE_OPTIONS +=	--system-bzip2
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    66
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    67
COMPONENT_BUILD_ENV +=	CC="$(CC)"	
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    68
COMPONENT_BUILD_ENV +=	CXX="$(CXX)"	
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    69
COMPONENT_BUILD_ENV +=	LDFLAGS="$(LDFLAGS)"	
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    70
COMPONENT_BUILD_ENV +=	MAKE="$(GMAKE)"	
3814
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    71
COMPONENT_BUILD_ENV +=	CFLAGS="$(CFLAGS)"
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    72
COMPONENT_BUILD_ENV +=	CXXFLAGS="$(CXXFLAGS)"
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    73
COMPONENT_BUILD_TARGETS =	all
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    74
1282
16201bef295c 16659836 enable ASLR for cmake, libmemcached, pconsole, pcre, php-5_2, php-5_3, ruby 1.8
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    75
ASLR_MODE = $(ASLR_ENABLE)
16201bef295c 16659836 enable ASLR for cmake, libmemcached, pconsole, pcre, php-5_2, php-5_3, ruby 1.8
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
    76
614
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    77
# Need C and C++ compiler locations for cmake tests
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    78
COMPONENT_TEST_ENV += CC="$(CC)"
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    79
COMPONENT_TEST_ENV += CXX="$(CXX)"
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    80
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    81
COMPONENT_TEST_TARGETS =	test
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    82
3814
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    83
COMPONENT_TEST_TRANSFORMS += \
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    84
	'-e "s/\s\s*[0-9][0-9]*\.[0-9][0-9]* sec/ SEC sec/"' \
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    85
	'-e "s/\][0-9][0-9]*\.[0-9][0-9]* sec/\]SEC sec/"'
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    86
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    87
# common targets
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    88
3814
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    89
configure:	$(CONFIGURE_64)
2225
f064d3d3190d 20078677 Userland Makefiles should support a configure: target
John Beck <John.Beck@Oracle.COM>
parents: 2204
diff changeset
    90
3814
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    91
build:		$(BUILD_64)
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    92
3814
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    93
install:	$(INSTALL_64)
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    94
614
db6c0cd206dd 6892526 cmake upgrade to v2.8.6
April Chin <april.chin@oracle.com>
parents: 312
diff changeset
    95
# expected failure: CTestTestUpload
3814
60344306d223 20548104 cmake should deliver 64-bit executables
April Chin <april.chin@oracle.com>
parents: 2225
diff changeset
    96
test:		$(TEST_64)
312
6ca02fd5a199 7053567 Move cmake from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    97
4339
6501cf9c29f9 21116842 add system-test targets to each component Makefile and to top-level Makefiles
Stacy Yeh <stacy.yeh@oracle.com>
parents: 3817
diff changeset
    98
system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
6501cf9c29f9 21116842 add system-test targets to each component Makefile and to top-level Makefiles
Stacy Yeh <stacy.yeh@oracle.com>
parents: 3817
diff changeset
    99
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3814
diff changeset
   100
REQUIRED_PACKAGES += compress/bzip2
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3814
diff changeset
   101
REQUIRED_PACKAGES += library/expat
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3814
diff changeset
   102
REQUIRED_PACKAGES += library/zlib
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3814
diff changeset
   103
REQUIRED_PACKAGES += system/library
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3814
diff changeset
   104
REQUIRED_PACKAGES += system/library/c++-runtime
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3814
diff changeset
   105
REQUIRED_PACKAGES += system/library/math
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3814
diff changeset
   106
REQUIRED_PACKAGES += system/linker
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 3814
diff changeset
   107
REQUIRED_PACKAGES += web/curl