illumos-gcc: remove -j8, so higher-level jobserver gets used
[unleashed-userland.git] / components / library / readline / Makefile
blob6be9d1d048275b5d191b79bb2f049cc878c362ec
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
26 include ../../../make-rules/shared-macros.mk
28 COMPONENT_NAME= readline
29 COMPONENT_VERSION= 6.3
30 COMPONENT_REVISION= 1
31 COMPONENT_PROJECT_URL= http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
32 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
33 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
34 COMPONENT_ARCHIVE_HASH= \
35 sha256:56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43
36 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/readline/$(COMPONENT_ARCHIVE)
37 COMPONENT_BUGDB= library/readline
39 TPNO_V6= 22356
40 TPNO_V5= 9042
42 # For now, we want to continue to provide the libreadline and libhistory so's
43 # (and their links) from readline 5.2.
45 COMPONENT_VERSION_1 = 5.2
46 COMPONENT_SRC_1 = $(COMPONENT_NAME)-$(COMPONENT_VERSION_1)
47 COMPONENT_ARCHIVE_1 = $(COMPONENT_SRC_1).tar.gz
48 COMPONENT_ARCHIVE_HASH_1 = \
49 sha256:12e88d96aee2cd1192500356f0535540db499282ca7f76339fb4228c31249f45
50 COMPONENT_ARCHIVE_URL_1 = http://ftp.gnu.org/gnu/readline/$(COMPONENT_ARCHIVE_1)
51 SOURCE_DIR_1 = $(COMPONENT_DIR)/$(COMPONENT_SRC_1)
53 include $(WS_MAKE_RULES)/prep.mk
54 include $(WS_MAKE_RULES)/configure.mk
55 include $(WS_MAKE_RULES)/ips.mk
57 LINT_FLAGS += -I$(PROTO_DIR)/usr/include
59 CC += $(CC_BITS)
61 # readline likes to use ld directly and this is the easiest
62 # way to get it to add -lc
63 LDFLAGS += -lc
64 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
65 CONFIGURE_OPTIONS += --enable-shared
67 # Build the readline examples as well.
68 COMPONENT_BUILD_TARGETS = everything
70 COMPONENT_TEST_DIR = $(@D)/examples
71 COMPONENT_TEST_CMD = $(CAT) $(SOURCE_DIR)/examples/Inputrc | ./rlcat
72 COMPONENT_TEST_TARGETS =
74 # Master test results are the same for 32-bit and 64-bit, so override
75 # here, rather than create multiple identical master files.
76 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
78 # Needed to build the test program.
79 COMPONENT_PRE_SYSTEM_TEST_ACTION += \
80 (cd $(@D) ; $(GMAKE) libreadline.a ) ;
82 # Build the test program.
83 COMPONENT_PRE_SYSTEM_TEST_ACTION += \
84 (cd $(@D)/examples ; $(GMAKE) rlcat ) ;
86 # Get correct libreadline.so.6 from the proto area.
87 TEST_LIBPATH.32 = $(PROTOUSRLIBDIR)
88 TEST_LIBPATH.64 = $(PROTOUSRLIBDIR64)
89 COMPONENT_TEST_ENV += LD_LIBRARY_PATH=$(TEST_LIBPATH.$(BITS))
91 COMPONENT_SYSTEM_TEST_DIR = $(@D)/examples
92 COMPONENT_SYSTEM_TEST_CMD = $(CAT) $(SOURCE_DIR)/examples/Inputrc | ./rlcat
93 COMPONENT_SYSTEM_TEST_TARGETS =
95 # Macros to configure, build, and install the old version for the time being.
96 BUILD_OLD_DIR_32 = $(COMPONENT_DIR)/build/$(COMPONENT_VERSION_1)-$(MACH32)
97 BUILD_OLD_DIR_64 = $(COMPONENT_DIR)/build/$(COMPONENT_VERSION_1)-$(MACH64)
99 $(BUILD_OLD_DIR_32)/.configured: CONFIGURE_SCRIPT = $(SOURCE_DIR_1)/configure
100 $(BUILD_OLD_DIR_64)/.configured: CONFIGURE_SCRIPT = $(SOURCE_DIR_1)/configure
101 $(BUILD_OLD_DIR_32)/.configured: BITS=32
102 $(BUILD_OLD_DIR_64)/.configured: BITS=64
104 BUILD_32 += $(BUILD_OLD_DIR_32)/.built
105 BUILD_64 += $(BUILD_OLD_DIR_64)/.built
107 INSTALL_32 += $(BUILD_OLD_DIR_32)/.installed
108 INSTALL_64 += $(BUILD_OLD_DIR_64)/.installed
110 # install the old version first
111 $(BUILD_DIR_32)/.installed: $(BUILD_OLD_DIR_32)/.installed
112 $(BUILD_DIR_64)/.installed: $(BUILD_OLD_DIR_64)/.installed
114 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
116 build: $(BUILD_32_and_64)
118 install: $(INSTALL_32_and_64)
120 test: install $(TEST_32_and_64)
122 REQUIRED_PACKAGES += system/library