aboutsummaryrefslogtreecommitdiff
path: root/package/which
diff options
context:
space:
mode:
authorGravatar Mike Frysinger <vapier@gentoo.org>2004-11-11 14:28:17 +0000
committerGravatar Mike Frysinger <vapier@gentoo.org>2004-11-11 14:28:17 +0000
commit52c9508f27c765c893f73b0ece1724c8d7bfd5e4 (patch)
treed4675465115ec6b1f5d15ec1bb4dc547a2cd8874 /package/which
parentdb13d321d6566c8937a7dbf872d4b4410a9d79ae (diff)
downloadbuildroot-52c9508f27c765c893f73b0ece1724c8d7bfd5e4.tar.gz
buildroot-52c9508f27c765c893f73b0ece1724c8d7bfd5e4.tar.bz2
add which
Diffstat (limited to 'package/which')
-rw-r--r--package/which/Config.in7
-rw-r--r--package/which/Makefile.in3
-rw-r--r--package/which/which.mk46
3 files changed, 56 insertions, 0 deletions
diff --git a/package/which/Config.in b/package/which/Config.in
new file mode 100644
index 0000000000..73f2591790
--- /dev/null
+++ b/package/which/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_WHICH
+ bool "which"
+ default n
+ help
+ The standard 'which' utility.
+
+ http://www.xs4all.nl/~carlo17/which/
diff --git a/package/which/Makefile.in b/package/which/Makefile.in
new file mode 100644
index 0000000000..b115ce31f6
--- /dev/null
+++ b/package/which/Makefile.in
@@ -0,0 +1,3 @@
+ifeq ($(strip $(BR2_PACKAGE_WHICH)),y)
+TARGETS+=which
+endif
diff --git a/package/which/which.mk b/package/which/which.mk
new file mode 100644
index 0000000000..0450cc11f6
--- /dev/null
+++ b/package/which/which.mk
@@ -0,0 +1,46 @@
+#############################################################
+#
+# which
+#
+#############################################################
+WHICH_VER:=2.16
+WHICH_SOURCE:=which-$(WHICH_VER).tar.gz
+WHICH_SITE:=http://www.xs4all.nl/~carlo17/which/
+WHICH_DIR:=$(BUILD_DIR)/which-$(WHICH_VER)
+WHICH_CAT:=zcat
+WHICH_BINARY:=which
+WHICH_TARGET_BINARY:=bin/which
+
+$(DL_DIR)/$(WHICH_SOURCE):
+ $(WGET) -P $(DL_DIR) $(WHICH_SITE)/$(WHICH_SOURCE)
+
+$(WHICH_DIR)/.unpacked: $(DL_DIR)/$(WHICH_SOURCE)
+ $(WHICH_CAT) $(DL_DIR)/$(WHICH_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $(WHICH_DIR)/.unpacked
+
+$(WHICH_DIR)/.configured: $(WHICH_DIR)/.unpacked
+ (cd $(WHICH_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/ \
+ );
+ touch $(WHICH_DIR)/.configured
+
+$(WHICH_DIR)/$(WHICH_BINARY): $(WHICH_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(WHICH_DIR)
+
+$(TARGET_DIR)/$(WHICH_TARGET_BINARY): $(WHICH_DIR)/$(WHICH_BINARY)
+ install -D $(WHICH_DIR)/$(WHICH_BINARY) $(TARGET_DIR)/$(WHICH_TARGET_BINARY)
+
+which: uclibc $(TARGET_DIR)/$(WHICH_TARGET_BINARY)
+
+which-clean:
+ rm -f $(TARGET_DIR)/$(WHICH_TARGET_BINARY)
+ -$(MAKE) -C $(WHICH_DIR) clean
+
+which-dirclean:
+ rm -rf $(WHICH_DIR)