components/ggrep/Makefile
changeset 5682 94c0ca64c022
parent 5391 5aa4a8c4577f
child 5909 65108c8937a8
equal deleted inserted replaced
5681:b8fe51f35344 5682:94c0ca64c022
    16 # fields enclosed by brackets "[]" replaced with your own identifying
    16 # fields enclosed by brackets "[]" replaced with your own identifying
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    18 #
    18 #
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
       
    21 
       
    22 #
    21 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
    22 #
    24 #
    23 BITS=64
    25 BUILD_BITS= 64
    24 include ../../make-rules/shared-macros.mk
    26 include ../../make-rules/shared-macros.mk
    25 
    27 
    26 COMPONENT_NAME=		grep
    28 COMPONENT_NAME=		grep
    27 COMPONENT_VERSION=	2.22
    29 COMPONENT_VERSION=	2.22
    28 COMPONENT_PROJECT_URL=	http://gnu.org/software/grep/
       
    29 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    30 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
    30 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
    31 
       
    32 COMPONENT_ARCHIVE_HASH=	\
    31 COMPONENT_ARCHIVE_HASH=	\
    33     sha256:ca91d22f017bfcb503d4bc3b44295491c89a33a3df0c3d8b8614f2d3831836eb
    32     sha256:ca91d22f017bfcb503d4bc3b44295491c89a33a3df0c3d8b8614f2d3831836eb
    34 COMPONENT_ARCHIVE_URL=	http://ftp.gnu.org/gnu/grep/$(COMPONENT_ARCHIVE)
       
    35 
       
    36 COMPONENT_BUGDB=	utility/ggrep
    33 COMPONENT_BUGDB=	utility/ggrep
    37 
    34 
    38 TPNO=			26437
    35 TPNO=			26437
    39 
    36 
    40 include $(WS_MAKE_RULES)/prep.mk
    37 SYSTEM_TEST_TARGET= $(SOURCE_DIR)/.system-test-patched configure $(SYSTEM_TEST_64)
    41 include $(WS_MAKE_RULES)/configure.mk
    38 include $(WS_MAKE_RULES)/gnu-component.mk
    42 include $(WS_MAKE_RULES)/ips.mk
       
    43 
    39 
    44 # We need to be able to return from void functions
    40 # We need to be able to return from void functions
    45 CFLAGS	+=			$(studio_FEATURES_EXTENSIONS)
    41 CFLAGS += $(studio_FEATURES_EXTENSIONS)
    46 
    42 
    47 # 64-bit only components are delivered to the "32-bit" locations since we don't
    43 CONFIGURE_PREFIX   = $(USRGNUDIR)
    48 # need both versions.
    44 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
    49 CONFIGURE_BINDIR.32 = $(CONFIGURE_PREFIX)/gnu/bin
    45 CONFIGURE_OPTIONS += --localedir=$(USRSHARELOCALEDIR)
    50 
       
    51 CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
       
    52 
       
    53 # Enable aslr for this component
       
    54 ASLR_MODE = $(ASLR_ENABLE)
       
    55 
    46 
    56 # Needed for "gmake test" to work.
    47 # Needed for "gmake test" to work.
    57 # SHELLOPTS is exported via make-rules/shared-macros.mk,
    48 # SHELLOPTS is exported via make-rules/shared-macros.mk,
    58 # causing the braceexpand option to be set.
    49 # causing the braceexpand option to be set.
    59 # This option causes "$1: unbound variable" errors during the check-TESTS,
    50 # This option causes "$1: unbound variable" errors during the check-TESTS,
    86 	$(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $(COMPONENT_DIR)/system-test-patches/systest.patch
    77 	$(GPATCH) -d $(@D) $(GPATCH_FLAGS) < $(COMPONENT_DIR)/system-test-patches/systest.patch
    87 	$(TOUCH) $(@)
    78 	$(TOUCH) $(@)
    88 
    79 
    89 # if we previously patched the source for the system-test target,
    80 # if we previously patched the source for the system-test target,
    90 # ensure we rebuild without that patch
    81 # ensure we rebuild without that patch
    91 test-check:
    82 COMPONENT_PRE_TEST_ACTION += \
    92 	if [ -e $(SOURCE_DIR)/.system-test-patched ]; then \
    83 	if [ -e $(SOURCE_DIR)/.system-test-patched ]; then \
    93 	   cd $(COMPONENT_DIR); \
    84 	   cd $(COMPONENT_DIR); \
    94 	   $(GMAKE) clean build; \
    85 	   $(GMAKE) clean build; \
    95 	fi
    86 	fi
    96 
    87 
    97 # common targets
       
    98 configure:	$(CONFIGURE_64)
       
    99 
       
   100 build:		$(BUILD_64)
       
   101 
       
   102 install:	$(INSTALL_64)
       
   103 
       
   104 test:		test-check $(TEST_64)
       
   105 
       
   106 system-test:    $(SOURCE_DIR)/.system-test-patched configure $(SYSTEM_TEST_64)
       
   107 
       
   108 
       
   109 REQUIRED_PACKAGES += library/pcre
    88 REQUIRED_PACKAGES += library/pcre
   110 REQUIRED_PACKAGES += shell/bash
    89 REQUIRED_PACKAGES += shell/bash
   111 REQUIRED_PACKAGES += system/library