2003-02-15 13:36:32 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# grep
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
GNUGREP_VERSION:=2.5.1
|
|
|
|
GNUGREP_SOURCE:=grep_$(GNUGREP_VERSION).ds1.orig.tar.gz
|
2007-12-27 13:00:12 +01:00
|
|
|
GNUGREP_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/g/grep/
|
2007-07-11 16:06:06 +02:00
|
|
|
GNUGREP_DIR:=$(BUILD_DIR)/grep-$(GNUGREP_VERSION)
|
2006-10-01 17:17:52 +02:00
|
|
|
GNUGREP_CAT:=$(ZCAT)
|
2003-02-15 13:36:32 +01:00
|
|
|
GNUGREP_BINARY:=src/grep
|
|
|
|
GNUGREP_TARGET_BINARY:=bin/grep
|
|
|
|
|
|
|
|
$(DL_DIR)/$(GNUGREP_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(GNUGREP_SITE)/$(GNUGREP_SOURCE)
|
|
|
|
|
|
|
|
grep-source: $(DL_DIR)/$(GNUGREP_SOURCE)
|
|
|
|
|
|
|
|
$(GNUGREP_DIR)/.unpacked: $(DL_DIR)/$(GNUGREP_SOURCE)
|
2004-01-29 00:11:00 +01:00
|
|
|
rm -rf $(GNUGREP_DIR).xxx
|
2004-10-09 23:19:47 +02:00
|
|
|
$(GNUGREP_CAT) $(DL_DIR)/$(GNUGREP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2004-01-29 00:11:00 +01:00
|
|
|
mv $(GNUGREP_DIR) $(GNUGREP_DIR).xxx
|
2007-07-11 16:06:06 +02:00
|
|
|
$(GNUGREP_CAT) $(GNUGREP_DIR).xxx/grep_$(GNUGREP_VERSION).tar.gz | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2004-01-29 00:11:00 +01:00
|
|
|
rm -rf $(GNUGREP_DIR).xxx
|
2008-02-12 01:35:03 +01:00
|
|
|
$(CONFIG_UPDATE) $(GNUGREP_DIR)
|
2008-03-06 19:11:51 +01:00
|
|
|
touch $@
|
2003-02-15 13:36:32 +01:00
|
|
|
|
|
|
|
$(GNUGREP_DIR)/.configured: $(GNUGREP_DIR)/.unpacked
|
|
|
|
(cd $(GNUGREP_DIR); rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2003-02-15 13:36:32 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2008-07-23 12:35:59 +02:00
|
|
|
--prefix=/ \
|
2003-09-03 09:18:18 +02:00
|
|
|
$(DISABLE_NLS) \
|
2003-11-17 02:31:38 +01:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2003-02-17 02:21:33 +01:00
|
|
|
--disable-perl-regexp \
|
2003-03-04 20:16:19 +01:00
|
|
|
--without-included-regex \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2008-03-06 19:11:51 +01:00
|
|
|
touch $@
|
2003-02-15 13:36:32 +01:00
|
|
|
|
|
|
|
$(GNUGREP_DIR)/$(GNUGREP_BINARY): $(GNUGREP_DIR)/.configured
|
|
|
|
$(MAKE) -C $(GNUGREP_DIR)
|
|
|
|
|
2008-07-23 12:35:56 +02:00
|
|
|
$(TARGET_DIR)/$(GNUGREP_TARGET_BINARY): $(GNUGREP_DIR)/$(GNUGREP_BINARY)
|
|
|
|
for i in egrep fgrep grep; do \
|
|
|
|
$(INSTALL) $(GNUGREP_DIR)/src/$$i $(@D); \
|
|
|
|
done
|
|
|
|
$(STRIPCMD) $(STRIP_STRIP_ALL) $@
|
2003-02-15 13:36:32 +01:00
|
|
|
|
2008-07-23 14:08:53 +02:00
|
|
|
grep: uclibc $(if $(BR2_ENABLE_LOCALE),gettext libintl) \
|
|
|
|
$(TARGET_DIR)/$(GNUGREP_TARGET_BINARY)
|
|
|
|
echo deps: $^
|
2003-02-15 13:36:32 +01:00
|
|
|
grep-clean:
|
2008-07-23 12:35:56 +02:00
|
|
|
rm -f $(addprefix $(TARGET_DIR)/bin/,egrep fgrep grep)
|
2003-02-15 13:36:32 +01:00
|
|
|
-$(MAKE) -C $(GNUGREP_DIR) clean
|
|
|
|
|
|
|
|
grep-dirclean:
|
|
|
|
rm -rf $(GNUGREP_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_GREP)),y)
|
|
|
|
TARGETS+=grep
|
|
|
|
endif
|