Makefile revision 7243
312N/A#
312N/A# CDDL HEADER START
312N/A#
312N/A# The contents of this file are subject to the terms of the
312N/A# Common Development and Distribution License (the "License").
312N/A# You may not use this file except in compliance with the License.
312N/A#
312N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
312N/A# or http://www.opensolaris.org/os/licensing.
312N/A# See the License for the specific language governing permissions
312N/A# and limitations under the License.
312N/A#
312N/A# When distributing Covered Code, include this CDDL HEADER in each
312N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
312N/A# If applicable, add the following below this CDDL HEADER, with the
312N/A# fields enclosed by brackets "[]" replaced with your own identifying
312N/A# information: Portions Copyright [yyyy] [name of copyright owner]
312N/A#
312N/A# CDDL HEADER END
5680N/A#
312N/A
312N/A#
5680N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
312N/A#
5829N/ABUILD_BITS=64
5680N/A# Currently only builds with gcc
5680N/ACOMPILER= gcc
312N/Ainclude ../../make-rules/shared-macros.mk
312N/A
312N/ACOMPONENT_NAME= cmake
6913N/ACOMPONENT_VERSION= 3.5.2
844N/ACOMPONENT_ARCHIVE_HASH= \
6913N/A sha256:92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a
5829N/ACOMPONENT_ARCHIVE_URL= http://www.cmake.org/files/v3.5/$(COMPONENT_ARCHIVE)
312N/ACOMPONENT_PROJECT_URL= http://www.cmake.org/
312N/A
6913N/ATPNO= 29071
2899N/A
5680N/A# configure in cmake does not accept many of the options set in
5680N/A# configure.mk (CC=, CXX=, --bindir, --libdir, --sbindir).
5680N/ACONFIGURE_DEFAULT_DIRS= no
5680N/A
5680N/A# expected failure for test: CTestTestUpload
5680N/ASYSTEM_TEST_TARGET= build $(SYSTEM_TEST_64)
6913N/A
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
312N/A
5079N/A# Remove undesriable /opt/csw lines from the Modules/*.cmake files.
5079N/ACOMPONENT_PREP_ACTION += \
5079N/A cd $(COMPONENT_SRC)/Modules; $(GNU_GREP) -l '/opt/csw' *.cmake | /usr/bin/xargs -I \{\} $(GSED) -i -e '/^[ ]*\/opt\/csw/d' \{\}
5829N/A
5829N/A# The default -O3 is *MUCH* too aggressive and will break things,
5829N/A# not just in CMake but everywhere.
5829N/A# CMake sets its own Language Standard flags in the Makefile it
5829N/A# generates for itself. The Userland default Language Standard flags
5829N/A# contradict cmake.
5829N/Agcc_OPT = -O2
5829N/A
5829N/AHTTP_PROXY = http://www-proxy.us.oracle.com:80/
5829N/AHTTPS_PROXY = https://www-proxy.us.oracle.com:80/
5079N/A
312N/A# Need to remove this option from LD_OPTIONS (only affects sparc build);
312N/A# it causes a SegFault failure in kwsys/testSystemInformation
312N/A# when testing on sparc
5680N/ALD_MAP_NOEXBSS.sparc=
312N/A
7243N/A# map.noexbss has the side effect of making the heap non executable.
7243N/A# Reflect the setting above explicitly disabling NXHEAP.
7243N/ANXHEAP_MODE = $(NXHEAP_DISABLE)
7243N/A
7243N/A
312N/A# We need these in the environment, although they are already passed
312N/A# as CONFIGURE_OPTIONS; otherwise the correct compilers are not used
5829N/ACONFIGURE_ENV += MAKE="$(GMAKE)"
5829N/ACONFIGURE_ENV += CFLAGS="$(CFLAGS)"
5829N/ACONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
5829N/ACONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
5079N/A
623N/A# Use system-installed third-party libraries, rather than the private
5079N/A# copies in the cmake source.
5829N/ACONFIGURE_OPTIONS =
5829N/ACONFIGURE_OPTIONS += --prefix=$(CONFIGURE_PREFIX)
5829N/ACONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
623N/ACONFIGURE_OPTIONS += --system-curl
623N/ACONFIGURE_OPTIONS += --system-expat
623N/ACONFIGURE_OPTIONS += --system-zlib
623N/ACONFIGURE_OPTIONS += --system-bzip2
5079N/ACONFIGURE_OPTIONS += --system-libarchive
5829N/ACONFIGURE_OPTIONS += --system-liblzma
312N/A
5829N/ACOMPONENT_BUILD_ENV += CC="$(CC)"
5829N/ACOMPONENT_BUILD_ENV += CXX="$(CXX)"
5829N/ACOMPONENT_BUILD_ENV += LDFLAGS="$(LDFLAGS)"
5829N/ACOMPONENT_BUILD_ENV += MAKE="$(GMAKE)"
3814N/ACOMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS)"
3814N/ACOMPONENT_BUILD_ENV += CXXFLAGS="$(CXXFLAGS)"
312N/ACOMPONENT_BUILD_TARGETS = all
312N/A
623N/A# Need C and C++ compiler locations for cmake tests
623N/ACOMPONENT_TEST_ENV += CC="$(CC)"
623N/ACOMPONENT_TEST_ENV += CXX="$(CXX)"
5829N/ACOMPONENT_TEST_ENV += CFLAGS="$(CFLAGS)"
5829N/ACOMPONENT_TEST_ENV += CXXFLAGS="$(CXXFLAGS)"
5829N/ACOMPONENT_TEST_ENV += LDFLAGS="$(LDFLAGS)"
5829N/ACOMPONENT_TEST_ENV += http_proxy="$(HTTP_PROXY)"
5829N/ACOMPONENT_TEST_ENV += https_proxy="$(HTTPS_PROXY)"
5829N/ACOMPONENT_TEST_ENV += HTTP_PROXY="$(HTTP_PROXY)"
5829N/ACOMPONENT_TEST_ENV += HTTPS_PROXY="$(HTTPS_PROXY)"
623N/A
6913N/A# Results output is different on Intel vs. SPARC.
6913N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
6913N/A
312N/ACOMPONENT_TEST_TARGETS = test
312N/A
3814N/ACOMPONENT_TEST_TRANSFORMS += \
3814N/A '-e "s/\s\s*[0-9][0-9]*\.[0-9][0-9]* sec/ SEC sec/"' \
6913N/A '-e "s/\][0-9][0-9]*\.[0-9][0-9]* sec/\]SEC sec/"' \
6913N/A '-e "/bin/ctest/d"' \
6913N/A '-e "/Test project/d"' \
6913N/A '-e "/^[mM]ake/d"' \
6913N/A '-e "s|^make.*: Leaving directory.*$$|XXX_REMOVE_XXX|g" ' \
6913N/A '-e "s|^make.*: Entering directory.*$$|XXX_REMOVE_XXX|g" ' \
6913N/A '-e "/^XXX_REMOVE_XXX$$/d" '
3814N/A
5829N/ACOMPONENT_SYSTEM_TEST_ENV += CC="$(CC)"
5829N/ACOMPONENT_SYSTEM_TEST_ENV += CXX="$(CXX)"
5829N/ACOMPONENT_SYSTEM_TEST_ENV += CFLAGS="$(CFLAGS)"
5829N/ACOMPONENT_SYSTEM_TEST_ENV += CXXFLAGS="$(CXXFLAGS)"
5829N/ACOMPONENT_SYSTEM_TEST_ENV += LDFLAGS="$(LDFLAGS)"
5829N/ACOMPONENT_SYSTEM_TEST_ENV += http_proxy="$(HTTP_PROXY)"
5829N/ACOMPONENT_SYSTEM_TEST_ENV += https_proxy="$(HTTPS_PROXY)"
5829N/ACOMPONENT_SYSTEM_TEST_ENV += HTTP_PROXY="$(HTTP_PROXY)"
5829N/ACOMPONENT_SYSTEM_TEST_ENV += HTTPS_PROXY="$(HTTPS_PROXY)"
5079N/A
5079N/ACOMPONENT_SYSTEM_TEST_TARGETS = test
5079N/A
5829N/A# Install the man pages this way because we do not have Sphinx.
5829N/ACOMPONENT_POST_INSTALL_ACTION += \
5829N/A ( $(MKDIR) -p $(PROTO_DIR)/usr/share ; \
5829N/A $(CP) -r $(COMPONENT_DIR)/files/man1 $(PROTO_DIR)/usr/share/ ; \
5829N/A $(CP) -r $(COMPONENT_DIR)/files/man7 $(PROTO_DIR)/usr/share/ )
5829N/A
5079N/A# Built binaries are moved aside and replaced with
5079N/A# symlinks to the system-installed binaries in /usr/bin,
5079N/A# which will be executed for the system-test target
5079N/ACOMPONENT_PRE_SYSTEM_TEST_ACTION += \
5079N/A $(MV) $(BUILD_DIR_64)/bin $(BUILD_DIR_64)/bin-save; \
5079N/A $(MKDIR) $(BUILD_DIR_64)/bin; cd $(BUILD_DIR_64)/bin; \
5680N/A $(LN) -s $(USRBINDIR)/cmake; $(LN) -s /usr/bin/ctest; \
5680N/A $(LN) -s $(USRBINDIR)/ccmake; $(LN) -s /usr/bin/cpack
5079N/A
5079N/A# Restore the built binaries after system-test is done
5079N/ACOMPONENT_POST_SYSTEM_TEST_ACTION += \
5079N/A $(RM) -r $(BUILD_DIR_64)/bin; \
5079N/A $(MV) $(BUILD_DIR_64)/bin-save $(BUILD_DIR_64)/bin
5079N/A
3817N/AREQUIRED_PACKAGES += compress/bzip2
5079N/AREQUIRED_PACKAGES += compress/xz
3817N/AREQUIRED_PACKAGES += library/expat
5079N/AREQUIRED_PACKAGES += library/libarchive
5079N/AREQUIRED_PACKAGES += library/ncurses
3817N/AREQUIRED_PACKAGES += library/zlib
5079N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
5079N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
3817N/AREQUIRED_PACKAGES += system/library/math
3817N/AREQUIRED_PACKAGES += web/curl