kumquat-buildroot/package/which/which.mk
Eric Andersen 732d94d25f fixup a whole steaming pile of insanity. When packages are configured,
they should be configured with --prefix=/usr and we then need to use
make DESTDIR=$(STAGING_DIR) install to get things installed into the
staging directory.  The current situation for many packages, which use
--prefix=$(STAGING_DIR) results in the staging_dir paths getting compiled
into the binary itself.

This also adds in a pile of libtool fixups.  Between broken pkgconfig,
broken libtool handling, and broken --prefix settings, its a wonder
things have worked as well as they have up till now.
 -Erik
2007-01-14 03:52:21 +00:00

57 lines
1.5 KiB
Makefile

#############################################################
#
# 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-source: $(DL_DIR)/$(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) \
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)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_WHICH)),y)
TARGETS+=which
endif