2004-10-09 09:06:03 +08:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# sed
|
|
|
|
#
|
|
|
|
#############################################################
|
2010-05-10 04:52:10 +08:00
|
|
|
SED_VERSION:=4.2.1
|
2007-07-11 22:06:06 +08:00
|
|
|
SED_SOURCE:=sed-$(SED_VERSION).tar.gz
|
2008-03-26 11:28:09 +08:00
|
|
|
SED_SITE:=$(BR2_GNU_MIRROR)/sed
|
2006-10-01 23:17:52 +08:00
|
|
|
SED_CAT:=$(ZCAT)
|
2007-07-11 22:06:06 +08:00
|
|
|
SED_DIR2:=$(BUILD_DIR)/sed-$(SED_VERSION)
|
2004-10-09 09:06:03 +08:00
|
|
|
SED_BINARY:=sed/sed
|
|
|
|
SED_TARGET_BINARY:=bin/sed
|
2008-12-08 16:15:27 +08:00
|
|
|
ifeq ($(BR2_LARGEFILE),y)
|
2004-10-09 09:06:03 +08:00
|
|
|
SED_CPPFLAGS=-D_FILE_OFFSET_BITS=64
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(DL_DIR)/$(SED_SOURCE):
|
|
|
|
mkdir -p $(DL_DIR)
|
2009-01-16 19:42:52 +08:00
|
|
|
$(call DOWNLOAD,$(SED_SITE),$(SED_SOURCE))
|
2004-10-09 09:06:03 +08:00
|
|
|
|
|
|
|
sed-source: $(DL_DIR)/$(SED_SOURCE)
|
|
|
|
|
2004-10-09 10:49:33 +08:00
|
|
|
$(SED_DIR2)/.unpacked: $(DL_DIR)/$(SED_SOURCE)
|
2004-10-10 05:19:47 +08:00
|
|
|
$(SED_CAT) $(DL_DIR)/$(SED_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2010-05-10 04:52:10 +08:00
|
|
|
$(CONFIG_UPDATE) $(SED_DIR2)/build-aux
|
2008-03-07 02:24:27 +08:00
|
|
|
touch $@
|
2004-10-09 09:06:03 +08:00
|
|
|
|
2004-10-09 10:49:33 +08:00
|
|
|
$(SED_DIR2)/.configured: $(SED_DIR2)/.unpacked
|
|
|
|
(cd $(SED_DIR2); rm -rf config.cache; \
|
2004-10-09 09:06:03 +08:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 20:01:27 +08:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2008-08-05 03:04:05 +08:00
|
|
|
CPPFLAGS="$(SED_CPPFLAGS)" \
|
2009-10-02 03:24:42 +08:00
|
|
|
./configure $(QUIET) \
|
2004-10-09 09:06:03 +08:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 11:52:21 +08:00
|
|
|
--libdir=/lib \
|
2004-10-09 09:06:03 +08:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
2007-09-20 04:13:08 +08:00
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
2007-07-17 20:12:12 +08:00
|
|
|
--include=$(STAGING_DIR)/usr/include \
|
2004-10-09 09:06:03 +08:00
|
|
|
$(DISABLE_NLS) \
|
2007-08-22 03:20:18 +08:00
|
|
|
)
|
2007-08-22 03:35:08 +08:00
|
|
|
touch $@
|
2004-10-09 09:06:03 +08:00
|
|
|
|
2004-10-09 10:49:33 +08:00
|
|
|
$(SED_DIR2)/$(SED_BINARY): $(SED_DIR2)/.configured
|
2009-08-05 03:42:48 +08:00
|
|
|
$(MAKE) -C $(SED_DIR2)
|
2004-10-09 09:06:03 +08:00
|
|
|
|
|
|
|
# This stuff is needed to work around GNU make deficiencies
|
2004-10-09 10:49:33 +08:00
|
|
|
sed-target_binary: $(SED_DIR2)/$(SED_BINARY)
|
2007-08-22 03:35:08 +08:00
|
|
|
@if [ -L $(TARGET_DIR)/$(SED_TARGET_BINARY) ]; then \
|
|
|
|
rm -f $(TARGET_DIR)/$(SED_TARGET_BINARY); \
|
|
|
|
fi
|
2004-10-09 09:06:03 +08:00
|
|
|
|
2007-09-20 04:13:08 +08:00
|
|
|
@if [ ! -f $(SED_DIR2)/$(SED_BINARY) \
|
|
|
|
-o $(TARGET_DIR)/$(SED_TARGET_BINARY) \
|
|
|
|
-ot $(SED_DIR2)/$(SED_BINARY) ]; then \
|
|
|
|
set -x; \
|
2010-07-06 15:27:32 +08:00
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(SED_DIR2) install; \
|
2007-09-20 04:13:08 +08:00
|
|
|
mv $(TARGET_DIR)/usr/bin/sed $(TARGET_DIR)/bin/; \
|
|
|
|
rm -rf $(TARGET_DIR)/share/locale; \
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/doc; \
|
2007-08-22 03:35:08 +08:00
|
|
|
fi
|
2004-10-09 09:06:03 +08:00
|
|
|
|
2009-09-02 23:02:02 +08:00
|
|
|
sed: sed-target_binary
|
2004-10-09 09:06:03 +08:00
|
|
|
|
|
|
|
sed-clean:
|
2010-07-06 15:27:32 +08:00
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(SED_DIR2) uninstall
|
2004-10-09 10:49:33 +08:00
|
|
|
-$(MAKE) -C $(SED_DIR2) clean
|
2004-10-09 09:06:03 +08:00
|
|
|
|
|
|
|
sed-dirclean:
|
2004-10-09 10:49:33 +08:00
|
|
|
rm -rf $(SED_DIR2)
|
2004-10-09 09:06:03 +08:00
|
|
|
|
|
|
|
|
2005-02-10 11:06:39 +08:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 16:15:27 +08:00
|
|
|
ifeq ($(BR2_PACKAGE_SED),y)
|
2005-02-10 11:06:39 +08:00
|
|
|
TARGETS+=sed
|
|
|
|
endif
|