improve clean targets
[buildroot.git] / package / ed / ed.mk
blobaffc8c9f3dd2499a428c4f95eda8d5f7eb76bd18
1 #############################################################
3 # ed
5 #############################################################
6 ED_VERSION:=0.8
7 ED_SOURCE:=ed-$(ED_VERSION).tar.bz2
8 ED_SITE:=$(BR2_GNU_MIRROR)/ed/
9 ED_CAT:=$(BZCAT)
10 ED_DIR:=$(BUILD_DIR)/ed-$(ED_VERSION)
11 ED_BINARY:=ed
12 ED_TARGET_BINARY:=bin/ed
14 $(DL_DIR)/$(ED_SOURCE):
15 $(WGET) -P $(DL_DIR) $(ED_SITE)/$(ED_SOURCE)
17 $(ED_DIR)/.unpacked: $(DL_DIR)/$(ED_SOURCE)
18 $(ED_CAT) $(DL_DIR)/$(ED_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
19 toolchain/patch-kernel.sh $(ED_DIR) package/ed/ ed-\*.patch
20 touch $@
22 $(ED_DIR)/.configured: $(ED_DIR)/.unpacked
23 (cd $(ED_DIR); rm -rf config.cache; \
24 $(TARGET_CONFIGURE_OPTS) \
25 $(TARGET_CONFIGURE_ARGS) \
26 ./configure \
27 --target=$(GNU_TARGET_NAME) \
28 --host=$(GNU_TARGET_NAME) \
29 --build=$(GNU_HOST_NAME) \
30 --prefix=/usr \
31 --exec-prefix=/usr \
33 touch $@
35 $(ED_DIR)/$(ED_BINARY): $(ED_DIR)/.configured
36 $(MAKE) CC=$(TARGET_CC) -C $(ED_DIR)
38 $(TARGET_DIR)/$(ED_TARGET_BINARY): $(ED_DIR)/$(ED_BINARY)
39 $(INSTALL) -D $(ED_DIR)/$(ED_BINARY) $(TARGET_DIR)/$(ED_TARGET_BINARY)
41 ed: uclibc $(TARGET_DIR)/$(ED_TARGET_BINARY)
43 ed-source: $(DL_DIR)/$(ED_SOURCE)
45 ed-clean:
46 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(ED_DIR) uninstall
47 -$(MAKE) -C $(ED_DIR) clean
49 ed-dirclean:
50 rm -rf $(ED_DIR)
52 #############################################################
54 # Toplevel Makefile options
56 #############################################################
57 ifeq ($(BR2_PACKAGE_ED),y)
58 TARGETS+=ed
59 endif