author | Shawn Walker-Salas <shawn.walker@oracle.com> |
Wed, 30 Mar 2016 13:33:31 -0700 | |
changeset 5682 | 94c0ca64c022 |
parent 5391 | 5aa4a8c4577f |
child 5909 | 65108c8937a8 |
permissions | -rw-r--r-- |
80
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
1 |
# |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
2 |
# CDDL HEADER START |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
3 |
# |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
4 |
# The contents of this file are subject to the terms of the |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
5 |
# Common Development and Distribution License (the "License"). |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
6 |
# You may not use this file except in compliance with the License. |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
7 |
# |
7f8350e3f91a
7017244 move ggrep 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 |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
9 |
# or http://www.opensolaris.org/os/licensing. |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
10 |
# See the License for the specific language governing permissions |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
11 |
# and limitations under the License. |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
12 |
# |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
18 |
# |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
19 |
# CDDL HEADER END |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
20 |
# |
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5391
diff
changeset
|
21 |
|
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5391
diff
changeset
|
22 |
# |
5391
5aa4a8c4577f
22536285 update ggrep to 2.22
April Chin <april.chin@oracle.com>
parents:
5125
diff
changeset
|
23 |
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
80
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
24 |
# |
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5391
diff
changeset
|
25 |
BUILD_BITS= 64 |
80
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
26 |
include ../../make-rules/shared-macros.mk |
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
27 |
|
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
28 |
COMPONENT_NAME= grep |
5391
5aa4a8c4577f
22536285 update ggrep to 2.22
April Chin <april.chin@oracle.com>
parents:
5125
diff
changeset
|
29 |
COMPONENT_VERSION= 2.22 |
1181
17dcb14c2b1e
16059697 problem in UTILITY/GGREP
April Chin <april.chin@oracle.com>
parents:
1058
diff
changeset
|
30 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz |
800
2ad056ed89ec
7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
666
diff
changeset
|
31 |
COMPONENT_ARCHIVE_HASH= \ |
5391
5aa4a8c4577f
22536285 update ggrep to 2.22
April Chin <april.chin@oracle.com>
parents:
5125
diff
changeset
|
32 |
sha256:ca91d22f017bfcb503d4bc3b44295491c89a33a3df0c3d8b8614f2d3831836eb |
1058
34d7aaa03423
15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents:
800
diff
changeset
|
33 |
COMPONENT_BUGDB= utility/ggrep |
34d7aaa03423
15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents:
800
diff
changeset
|
34 |
|
5391
5aa4a8c4577f
22536285 update ggrep to 2.22
April Chin <april.chin@oracle.com>
parents:
5125
diff
changeset
|
35 |
TPNO= 26437 |
1948
2d1537e7942d
18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents:
1181
diff
changeset
|
36 |
|
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5391
diff
changeset
|
37 |
SYSTEM_TEST_TARGET= $(SOURCE_DIR)/.system-test-patched configure $(SYSTEM_TEST_64) |
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5391
diff
changeset
|
38 |
include $(WS_MAKE_RULES)/gnu-component.mk |
80
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
39 |
|
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
83
diff
changeset
|
40 |
# We need to be able to return from void functions |
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5391
diff
changeset
|
41 |
CFLAGS += $(studio_FEATURES_EXTENSIONS) |
80
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
42 |
|
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5391
diff
changeset
|
43 |
CONFIGURE_PREFIX = $(USRGNUDIR) |
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5391
diff
changeset
|
44 |
CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) |
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5391
diff
changeset
|
45 |
CONFIGURE_OPTIONS += --localedir=$(USRSHARELOCALEDIR) |
80
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
46 |
|
1181
17dcb14c2b1e
16059697 problem in UTILITY/GGREP
April Chin <april.chin@oracle.com>
parents:
1058
diff
changeset
|
47 |
# Needed for "gmake test" to work. |
17dcb14c2b1e
16059697 problem in UTILITY/GGREP
April Chin <april.chin@oracle.com>
parents:
1058
diff
changeset
|
48 |
# SHELLOPTS is exported via make-rules/shared-macros.mk, |
17dcb14c2b1e
16059697 problem in UTILITY/GGREP
April Chin <april.chin@oracle.com>
parents:
1058
diff
changeset
|
49 |
# causing the braceexpand option to be set. |
17dcb14c2b1e
16059697 problem in UTILITY/GGREP
April Chin <april.chin@oracle.com>
parents:
1058
diff
changeset
|
50 |
# This option causes "$1: unbound variable" errors during the check-TESTS, |
17dcb14c2b1e
16059697 problem in UTILITY/GGREP
April Chin <april.chin@oracle.com>
parents:
1058
diff
changeset
|
51 |
# and the gnulib-tests don't even run at all. |
17dcb14c2b1e
16059697 problem in UTILITY/GGREP
April Chin <april.chin@oracle.com>
parents:
1058
diff
changeset
|
52 |
# Note that the below unexports SHELLOPTS, even for targets |
17dcb14c2b1e
16059697 problem in UTILITY/GGREP
April Chin <april.chin@oracle.com>
parents:
1058
diff
changeset
|
53 |
# other than "test." |
17dcb14c2b1e
16059697 problem in UTILITY/GGREP
April Chin <april.chin@oracle.com>
parents:
1058
diff
changeset
|
54 |
unexport SHELLOPTS |
80
7f8350e3f91a
7017244 move ggrep to userland
April Chin <april.chin@oracle.com>
parents:
diff
changeset
|
55 |
|
4795
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
56 |
# Test transforms retain only relevant results output. |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
57 |
COMPONENT_TEST_TRANSFORMS += \ |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
58 |
'-n ' \ |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
59 |
'-e "/TOTAL/p" ' \ |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
60 |
'-e "/SKIP/p" ' \ |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
61 |
'-e "/PASS/p" ' \ |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
62 |
'-e "/FAIL/p" ' \ |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
63 |
'-e "/ERROR/p" ' |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
64 |
|
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
65 |
# Putting GNU on path first prevents some tests from being skipped, |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
66 |
# which also keeps the test and system-test results consistent. |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
67 |
# With the test target, the path to the just-built commands is |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
68 |
# prepended to PATH. With the system-test target, we patch |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
69 |
# to prevent the PATH from being prepended. |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
70 |
COMPONENT_TEST_ENV += "PATH=$(GNUBIN):$(PATH)" |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
71 |
COMPONENT_SYSTEM_TEST_ENV += "PATH=$(GNUBIN):$(PATH)" |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
72 |
|
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
73 |
# Patch to change test path so it tests grep commands from /usr/gnu/bin |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
74 |
# installed on the test system. If we patch, we must re-configure the |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
75 |
# tests. |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
76 |
$(SOURCE_DIR)/.system-test-patched: $(SOURCE_DIR)/.prep |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
77 |
$(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $(COMPONENT_DIR)/system-test-patches/systest.patch |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
78 |
$(TOUCH) $(@) |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
79 |
|
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
80 |
# if we previously patched the source for the system-test target, |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
81 |
# ensure we rebuild without that patch |
5682
94c0ca64c022
15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
5391
diff
changeset
|
82 |
COMPONENT_PRE_TEST_ACTION += \ |
4795
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
83 |
if [ -e $(SOURCE_DIR)/.system-test-patched ]; then \ |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
84 |
cd $(COMPONENT_DIR); \ |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
85 |
$(GMAKE) clean build; \ |
17cca748f778
21571335 Enable system-test target for ggrep
April Chin <april.chin@oracle.com>
parents:
4402
diff
changeset
|
86 |
fi |
4402
b7cd2462c58f
20460412 GGREP should have some master test results to compare against
James Chang <james.c.chang@Oracle.COM>
parents:
4339
diff
changeset
|
87 |
|
3817
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
88 |
REQUIRED_PACKAGES += library/pcre |
30b42c38bbc4
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2225
diff
changeset
|
89 |
REQUIRED_PACKAGES += shell/bash |