Makefile revision 5323
3960N/A#
3960N/A# CDDL HEADER START
3960N/A#
3960N/A# The contents of this file are subject to the terms of the
3960N/A# Common Development and Distribution License (the "License").
3960N/A# You may not use this file except in compliance with the License.
3960N/A#
3960N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3960N/A# or http://www.opensolaris.org/os/licensing.
3960N/A# See the License for the specific language governing permissions
3960N/A# and limitations under the License.
3960N/A#
3960N/A# When distributing Covered Code, include this CDDL HEADER in each
3960N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3960N/A# If applicable, add the following below this CDDL HEADER, with the
3960N/A# fields enclosed by brackets "[]" replaced with your own identifying
3960N/A# information: Portions Copyright [yyyy] [name of copyright owner]
3960N/A#
3960N/A# CDDL HEADER END
3960N/A#
3960N/A
3960N/A#
3960N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3960N/A#
3960N/A
3960N/Ainclude ../../make-rules/shared-macros.mk
3960N/A
3960N/ACOMPONENT_NAME= readline
4248N/ACOMPONENT_VERSION= 6.3
3960N/ACOMPONENT_PROJECT_URL= http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
3960N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
4248N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
3960N/ACOMPONENT_ARCHIVE_HASH= \
3960N/A sha256:56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43
3960N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/readline/$(COMPONENT_ARCHIVE)
4248N/ACOMPONENT_BUGDB= library/readline
3960N/A
4603N/ATPNO_V6= 22356
4603N/ATPNO_V5= 9042
4603N/A
3960N/A# For now, we want to continue to provide the libreadline and libhistory so's
3960N/A# (and their links) from readline 5.2.
3960N/A#
3960N/ACOMPONENT_VERSION_1 = 5.2
3960N/ACOMPONENT_SRC_1 = $(COMPONENT_NAME)-$(COMPONENT_VERSION_1)
3960N/ACOMPONENT_ARCHIVE_1 = $(COMPONENT_SRC_1).tar.gz
3960N/ACOMPONENT_ARCHIVE_HASH_1 = \
3960N/A sha256:12e88d96aee2cd1192500356f0535540db499282ca7f76339fb4228c31249f45
3960N/ACOMPONENT_ARCHIVE_URL_1 = http://ftp.gnu.org/gnu/readline/$(COMPONENT_ARCHIVE_1)
3960N/ASOURCE_DIR_1 = $(COMPONENT_DIR)/$(COMPONENT_SRC_1)
3960N/A
3960N/Ainclude $(WS_MAKE_RULES)/prep.mk
3960N/Ainclude $(WS_MAKE_RULES)/configure.mk
3960N/Ainclude $(WS_MAKE_RULES)/ips.mk
3960N/Ainclude $(WS_MAKE_RULES)/lint-libraries.mk
3960N/A
4603N/ALINT_FLAGS += -I$(PROTO_DIR)/usr/include
3960N/A
3960N/ACC += $(CC_BITS)
3960N/A
3960N/A# readline likes to use ld directly and this is the easiest
3960N/A# way to get it to add -lc
3960N/ALDFLAGS += -lc
3960N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
3960N/ACONFIGURE_OPTIONS += --enable-shared
3960N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
3960N/ACONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
3960N/A
3960N/A# Build the readline examples as well.
3960N/ACOMPONENT_BUILD_TARGETS = everything
3960N/A
3960N/ACOMPONENT_TEST_DIR = $(@D)/examples
3960N/ACOMPONENT_TEST_CMD = $(CAT) $(SOURCE_DIR)/examples/Inputrc | ./rlcat
4603N/ACOMPONENT_TEST_TARGETS =
4603N/A
4603N/A# Master test results are the same for 32-bit and 64-bit, so override
3960N/A# here, rather than create multiple identical master files.
3960N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
3960N/A
4603N/A# Needed to build the test program.
4603N/ACOMPONENT_PRE_SYSTEM_TEST_ACTION += \
4603N/A (cd $(@D) ; $(GMAKE) libreadline.a ) ;
4603N/A
4603N/A# Build the test program.
3960N/ACOMPONENT_PRE_SYSTEM_TEST_ACTION += \
3960N/A (cd $(@D)/examples ; $(GMAKE) rlcat ) ;
3960N/A
3960N/A# Get correct libreadline.so.6 from the proto area.
4603N/ATEST_LIBPATH.32 = $(PROTOUSRLIBDIR)
4603N/ATEST_LIBPATH.64 = $(PROTOUSRLIBDIR64)
4603N/ACOMPONENT_TEST_ENV += LD_LIBRARY_PATH=$(TEST_LIBPATH.$(BITS))
3960N/A
3960N/ACOMPONENT_SYSTEM_TEST_DIR = $(@D)/examples
3960N/ACOMPONENT_SYSTEM_TEST_CMD = $(CAT) $(SOURCE_DIR)/examples/Inputrc | ./rlcat
3960N/ACOMPONENT_SYSTEM_TEST_TARGETS =
3960N/A
3960N/A# Macros to configure, build, and install the old version for the time being.
3960N/ABUILD_OLD_DIR_32 = $(COMPONENT_DIR)/build/$(COMPONENT_VERSION_1)-$(MACH32)
3960N/ABUILD_OLD_DIR_64 = $(COMPONENT_DIR)/build/$(COMPONENT_VERSION_1)-$(MACH64)
4337N/A
4337N/A$(BUILD_OLD_DIR_32)/.configured: CONFIGURE_SCRIPT = $(SOURCE_DIR_1)/configure
3960N/A$(BUILD_OLD_DIR_64)/.configured: CONFIGURE_SCRIPT = $(SOURCE_DIR_1)/configure
3960N/A$(BUILD_OLD_DIR_32)/.configured: BITS=32
3960N/A$(BUILD_OLD_DIR_64)/.configured: BITS=64
3960N/A
3960N/ABUILD_32 += $(BUILD_OLD_DIR_32)/.built
3960N/ABUILD_64 += $(BUILD_OLD_DIR_64)/.built
3960N/A
3960N/AINSTALL_32 += $(BUILD_OLD_DIR_32)/.installed
3960N/AINSTALL_64 += $(BUILD_OLD_DIR_64)/.installed
3960N/A
3960N/A# install the old version first
4603N/A$(BUILD_DIR_32)/.installed: $(BUILD_OLD_DIR_32)/.installed
$(BUILD_DIR_64)/.installed: $(BUILD_OLD_DIR_64)/.installed
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
configure: $(CONFIGURE_32_and_64)
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
test: install $(TEST_32_and_64)
system-test: configure $(SYSTEM_TEST_32_and_64)
REQUIRED_PACKAGES += system/library