2003-02-15 13:36:32 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# grep
|
|
|
|
#
|
|
|
|
#############################################################
|
2004-01-29 00:11:00 +01:00
|
|
|
GNUGREP_SOURCE:=grep_2.5.1.ds1.orig.tar.gz
|
2003-11-03 11:02:53 +01:00
|
|
|
GNUGREP_SITE:=http://ftp.debian.org/debian/pool/main/g/grep/
|
2003-02-15 13:36:32 +01:00
|
|
|
GNUGREP_DIR:=$(BUILD_DIR)/grep-2.5.1
|
2003-11-03 11:02:53 +01: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
|
2004-10-09 23:19:47 +02:00
|
|
|
$(GNUGREP_CAT) $(GNUGREP_DIR).xxx/grep_2.5.1.tar.gz | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2004-01-29 00:11:00 +01:00
|
|
|
rm -rf $(GNUGREP_DIR).xxx
|
2003-02-15 13:36:32 +01:00
|
|
|
touch $(GNUGREP_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(GNUGREP_DIR)/.configured: $(GNUGREP_DIR)/.unpacked
|
|
|
|
(cd $(GNUGREP_DIR); rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2003-11-01 06:34:41 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
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) \
|
2003-02-15 13:36:32 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
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 \
|
2003-02-15 13:36:32 +01:00
|
|
|
);
|
|
|
|
touch $(GNUGREP_DIR)/.configured
|
|
|
|
|
|
|
|
$(GNUGREP_DIR)/$(GNUGREP_BINARY): $(GNUGREP_DIR)/.configured
|
|
|
|
$(MAKE) -C $(GNUGREP_DIR)
|
|
|
|
|
2003-03-06 19:24:00 +01:00
|
|
|
# This stuff is needed to work around GNU make deficiencies
|
|
|
|
grep-target_binary: $(GNUGREP_DIR)/$(GNUGREP_BINARY)
|
|
|
|
@if [ -L $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY) ] ; then \
|
|
|
|
rm -f $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY); fi;
|
2003-12-20 01:22:39 +01:00
|
|
|
@if [ ! -f $(GNUGREP_DIR)/$(GNUGREP_BINARY) -o $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY) -ot \
|
|
|
|
$(GNUGREP_DIR)/$(GNUGREP_BINARY) ] ; then \
|
2003-03-06 19:24:00 +01:00
|
|
|
set -x; \
|
|
|
|
rm -f $(TARGET_DIR)/bin/grep $(TARGET_DIR)/bin/egrep $(TARGET_DIR)/bin/fgrep; \
|
|
|
|
cp -a $(GNUGREP_DIR)/src/grep $(GNUGREP_DIR)/src/egrep \
|
2003-12-20 01:22:39 +01:00
|
|
|
$(GNUGREP_DIR)/src/fgrep $(TARGET_DIR)/bin/; fi
|
2003-02-15 13:36:32 +01:00
|
|
|
|
2003-03-06 19:24:00 +01:00
|
|
|
grep: uclibc grep-target_binary
|
2003-02-15 13:36:32 +01:00
|
|
|
|
|
|
|
grep-clean:
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUGREP_DIR) uninstall
|
|
|
|
-$(MAKE) -C $(GNUGREP_DIR) clean
|
|
|
|
|
|
|
|
grep-dirclean:
|
|
|
|
rm -rf $(GNUGREP_DIR)
|
|
|
|
|