pass ARCH down to uClibc
[buildroot.git] / package / dash / dash.mk
blob08ec11d0d490566f0b2a0419d928061d2279c6cc
1 #############################################################
3 # dash
5 #############################################################
6 DASH_VERSION:=0.5.3
7 DASH_SOURCE:=dash_$(DASH_VERSION).orig.tar.gz
8 DASH_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/d/dash
9 DASH_CAT:=$(ZCAT)
10 DASH_DIR:=$(BUILD_DIR)/dash-$(DASH_VERSION)
11 DASH_PATCH1:=dash_$(DASH_VERSION)-7.diff.gz
12 DASH_BINARY:=src/dash
13 DASH_TARGET_BINARY:=bin/dash
15 $(DL_DIR)/$(DASH_SOURCE):
16 $(WGET) -P $(DL_DIR) $(DASH_SITE)/$(DASH_SOURCE)
18 $(DL_DIR)/$(DASH_PATCH1):
19 $(WGET) -P $(DL_DIR) $(DASH_SITE)/$(DASH_PATCH1)
21 $(DASH_DIR)/.unpacked: $(DL_DIR)/$(DASH_SOURCE) $(DL_DIR)/$(DASH_PATCH1)
22 $(DASH_CAT) $(DL_DIR)/$(DASH_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
23 $(ZCAT) $(DL_DIR)/$(DASH_PATCH1) | patch -p1 -d $(DASH_DIR)
24 touch $(DASH_DIR)/.unpacked
26 $(DASH_DIR)/.configured: $(DASH_DIR)/.unpacked
27 (cd $(DASH_DIR); rm -rf config.cache; \
28 $(TARGET_CONFIGURE_OPTS) \
29 $(TARGET_CONFIGURE_ARGS) \
30 ./configure \
31 --target=$(GNU_TARGET_NAME) \
32 --host=$(GNU_TARGET_NAME) \
33 --build=$(GNU_HOST_NAME) \
34 --prefix=/usr \
35 --exec-prefix=/usr \
36 --bindir=/usr/bin \
37 --sbindir=/usr/sbin \
38 --libexecdir=/usr/lib \
39 --sysconfdir=/etc \
40 --datadir=/usr/share \
41 --localstatedir=/var \
42 --mandir=/usr/man \
43 --infodir=/usr/info \
45 touch $(DASH_DIR)/.configured
47 $(DASH_DIR)/$(DASH_BINARY): $(DASH_DIR)/.configured
48 $(MAKE1) CC=$(TARGET_CC) CC_FOR_BUILD="$(HOSTCC)" -C $(DASH_DIR)
49 touch -c $(DASH_DIR)/$(DASH_BINARY)
51 $(TARGET_DIR)/$(DASH_TARGET_BINARY): $(DASH_DIR)/$(DASH_BINARY)
52 cp -a $(DASH_DIR)/$(DASH_BINARY) $(TARGET_DIR)/$(DASH_TARGET_BINARY)
53 touch -c $(TARGET_DIR)/$(DASH_TARGET_BINARY)
55 dash: $(TARGET_DIR)/$(DASH_TARGET_BINARY)
57 dash-source: $(DL_DIR)/$(DASH_SOURCE) $(DL_DIR)/$(DASH_PATCH1)
59 dash-clean:
60 $(MAKE1) CC=$(TARGET_CC) -C $(DASH_DIR) clean
61 rm -f $(TARGET_DIR)/$(DASH_TARGET_BINARY)
63 dash-dirclean:
64 rm -rf $(DASH_DIR)
66 #############################################################
68 # Toplevel Makefile options
70 #############################################################
71 ifeq ($(BR2_PACKAGE_DASH),y)
72 TARGETS+=dash
73 endif