which: convert to Makefile.autotools.in format
authorPeter Korsgaard <jacmet@sunsite.dk>
Tue, 22 Jul 2008 14:11:01 +0000 (14:11 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 22 Jul 2008 14:11:01 +0000 (14:11 -0000)
package/which/which.mk

index 549030537b083314dae3b831ee5a1b4b5ecdce09..0be31c56527d77f5a8f65704226737d92c6d5921 100644 (file)
@@ -6,54 +6,14 @@
 WHICH_VERSION:=2.19
 WHICH_SOURCE:=which-$(WHICH_VERSION).tar.gz
 WHICH_SITE:=http://www.xs4all.nl/~carlo17/which/
-WHICH_DIR:=$(BUILD_DIR)/which-$(WHICH_VERSION)
-WHICH_CAT:=$(ZCAT)
-WHICH_BINARY:=which
-WHICH_TARGET_BINARY:=usr/bin/which
+WHICH_AUTORECONF:=NO
+WHICH_INSTALL_STAGING:=NO
+WHICH_INSTALL_TARGET:=YES
 
-$(DL_DIR)/$(WHICH_SOURCE):
-       $(WGET) -P $(DL_DIR) $(WHICH_SITE)/$(WHICH_SOURCE)
+WHICH_DEPENDENCIES:=uclibc
 
-which-source: $(DL_DIR)/$(WHICH_SOURCE)
+$(eval $(call AUTOTARGETS,package,which))
 
-$(WHICH_DIR)/.unpacked: $(DL_DIR)/$(WHICH_SOURCE)
-       $(WHICH_CAT) $(DL_DIR)/$(WHICH_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-       $(CONFIG_UPDATE) $(WHICH_DIR)
+$(WHICH_HOOK_POST_INSTALL): $(WHICH_TARGET_INSTALL_TARGET)
+       $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/bin/which
        touch $@
-
-$(WHICH_DIR)/.configured: $(WHICH_DIR)/.unpacked
-       (cd $(WHICH_DIR); rm -rf config.cache; \
-               $(TARGET_CONFIGURE_OPTS) \
-               $(TARGET_CONFIGURE_ARGS) \
-               ./configure \
-               --target=$(GNU_TARGET_NAME) \
-               --host=$(GNU_TARGET_NAME) \
-               --build=$(GNU_HOST_NAME) \
-               --prefix=/usr \
-               --sysconfdir=/etc \
-       )
-       touch $@
-
-$(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 $^ $@
-       $(STRIPCMD) $(STRIP_STRIP_ALL) $@
-
-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)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(strip $(BR2_PACKAGE_WHICH)),y)
-TARGETS+=which
-endif