various: no need to link against libsocket
[unleashed-userland.git] / components / shell / bash / Makefile
blob5ca8ff7e677cee64e796c3f3e26c868b49364a8f
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
21 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
23 include ../../../make-rules/shared-macros.mk
25 COMPONENT_NAME= bash
26 COMPONENT_VERSION= 4.3
27 COMPONENT_REVISION= 1
28 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
29 COMPONENT_PROJECT_URL= http://www.gnu.org/software/bash/
30 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
31 COMPONENT_ARCHIVE_HASH = \
32 sha256:afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4
33 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/bash/$(COMPONENT_ARCHIVE)
34 COMPONENT_BUGDB= utility/bash
36 include $(WS_TOP)/make-rules/prep.mk
37 include $(WS_TOP)/make-rules/configure.mk
38 include $(WS_TOP)/make-rules/ips.mk
40 BASH_PATCHLEVEL=$(shell grep -h "define PATCHLEVEL" $(COMPONENT_DIR)/patches/bash* | nawk '{print $$NF}' | sort -n | tail -1)
41 IPS_COMPONENT_VERSION = $(COMPONENT_VERSION).$(BASH_PATCHLEVEL)
42 PATCH_LEVEL = 0
44 PKG_PROTO_DIRS += $(COMPONENT_DIR)/Solaris
46 # Enable C99 mode + -Xc for it's additional warnings.
47 #studio_C99MODE = -Xc $(studio_C99_ENABLE)
49 # Use the maximum number of registers on sparc since we have no libraries
50 studio_XREGS.sparc = -xregs=appl
52 # 8 byte memory alignment + interpretation of non-alignment instead of SIGBUS
53 studio_ALIGN.sparc.32 = -xmemalign=8i
54 studio_ALIGN.sparc.64 = -xmemalign=16i
56 # -xinline=%auto -- we like inlining where appropriate
57 # CFLAGS += -xinline=%auto
59 # -xbuiltin=%none -- builtins have been known to be buggy
60 # CFLAGS += -xbuiltin=%none
62 #CFLAGS += $(XPG6MODE)
63 #CFLAGS += $(CPP_POSIX)
64 #CFLAGS += $(CPP_C99_EXTENDED_MATH)
66 # configure checks for some functions, but doesn't seem to want to link in
67 # the required libraries for them. We avoid linking with libthread.so.1
68 # just because we pass -mt, by explicitly passing -lc.
69 LIBS = -lc -lgen
71 # -z redlocsym -- let's shrink the SHT_SYMTAB as much as we can
72 LDFLAGS = $(LD_Z_REDLOCSYM)
74 # The bash test harness needs the GNU userland utilities
75 TEST_PATH = "PATH=$(BUILD_DIR_32):$(GNUBIN):$(USRBINDIR)"
77 CONFIGURE_ENV += LIBS="$(LIBS)"
78 CONFIGURE_ENV += UNAME_LEGACY=
80 CONFIGURE_OPTIONS += --localstatedir=/var
81 CONFIGURE_OPTIONS += --enable-alias
82 CONFIGURE_OPTIONS += --enable-arith-for-command
83 CONFIGURE_OPTIONS += --enable-array-variables
84 CONFIGURE_OPTIONS += --enable-bang-history
85 CONFIGURE_OPTIONS += --enable-brace-expansion
86 CONFIGURE_OPTIONS += --enable-casemod-attributes
87 CONFIGURE_OPTIONS += --enable-casemod-expansions
88 CONFIGURE_OPTIONS += --enable-command-timing
89 CONFIGURE_OPTIONS += --enable-cond-command
90 CONFIGURE_OPTIONS += --enable-cond-regexp
91 CONFIGURE_OPTIONS += --enable-coprocesses
92 CONFIGURE_OPTIONS += --enable-debugger
93 CONFIGURE_OPTIONS += --enable-directory-stack
94 CONFIGURE_OPTIONS += --enable-disabled-builtins
95 CONFIGURE_OPTIONS += --enable-dparen-arithmetic
96 CONFIGURE_OPTIONS += --enable-extended-glob
97 CONFIGURE_OPTIONS += --enable-help-builtin
98 CONFIGURE_OPTIONS += --enable-history
99 CONFIGURE_OPTIONS += --enable-job-control
100 CONFIGURE_OPTIONS += --enable-multibyte
101 CONFIGURE_OPTIONS += --enable-net-redirections
102 CONFIGURE_OPTIONS += --enable-process-substitution
103 CONFIGURE_OPTIONS += --enable-progcomp
104 CONFIGURE_OPTIONS += --enable-prompt-string-decoding
105 CONFIGURE_OPTIONS += --enable-readline
106 CONFIGURE_OPTIONS += --enable-restricted
107 CONFIGURE_OPTIONS += --enable-select
108 CONFIGURE_OPTIONS += --enable-separate-helpfiles
109 CONFIGURE_OPTIONS += --enable-single-help-strings
110 CONFIGURE_OPTIONS += --disable-strict-posix-default
111 CONFIGURE_OPTIONS += --enable-usg-echo-default=yes
112 CONFIGURE_OPTIONS += --enable-xpg-echo-default=yes
113 CONFIGURE_OPTIONS += --enable-mem-scramble
114 CONFIGURE_OPTIONS += --disable-profiling
115 CONFIGURE_OPTIONS += --enable-static-link
116 CONFIGURE_OPTIONS += --enable-largefile
117 CONFIGURE_OPTIONS += --enable-nls
118 CONFIGURE_OPTIONS += --with-bash-malloc=yes
119 CONFIGURE_OPTIONS += --with-curses
120 CONFIGURE_OPTIONS += --with-installed-readline=no
121 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
123 COMPONENT_TEST_DIR = $(BUILD_DIR_32)
124 COMPONENT_TEST_ENV = - $(TEST_PATH)
126 # The tests use /tmp/xx, and there can only be one user running
127 # the them at a time. Need to remove /tmp/xx after testing to
128 # avoid permission issues for other users running these tests
129 COMPONENT_POST_TEST_ACTION = rm -f /tmp/xx
131 # ASLR_MODE=$(ASLR_ENABLE)
133 build: $(BUILD_32_and_64)
135 install: $(INSTALL_32_and_64)
136 ( cd $(PROTOUSRSHAREDIR)/locale ; \
137 cp -Rp "en@boldquot" en ; \
138 cp -Rp "en@boldquot" en_CA ; \
139 cp -Rp "en@boldquot" en_GB )
141 test: $(TEST_32_and_64)
143 REQUIRED_PACKAGES += library/ncurses
144 REQUIRED_PACKAGES += system/library