pkgconfig: install into HOST_DIR
authorPeter Korsgaard <jacmet@sunsite.dk>
Wed, 18 Mar 2009 19:18:40 +0000 (19:18 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 18 Mar 2009 19:18:40 +0000 (19:18 -0000)
package/Makefile.in
package/pkgconfig/pkgconfig.mk

index a6a0f21c6d70c65d36392c85cf6f1a14d0926d37..f5b8c216fbc8d9df5434a6aae63e424439ab7d75 100644 (file)
@@ -251,7 +251,7 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
                DEFAULT_ASSEMBLER="$(TARGET_AS)" \
                DEFAULT_LINKER="$(TARGET_LD)" \
                PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
-               PKG_CONFIG="$(STAGING_DIR)/usr/bin/pkg-config" \
+               PKG_CONFIG="$(PKGCONFIG_HOST_BINARY)" \
                PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \
                STAGING_DIR="$(STAGING_DIR)"
 
@@ -296,7 +296,7 @@ HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
                ORIGINAL_LD_FOR_TARGET="$(TARGET_LD)" \
                ORIGINAL_NM_FOR_TARGET="$(TARGET_NM)" \
                ORIGINAL_OBJDUMP_FOR_TARGET="$(TARGET_OBJDUMP)" \
-               PKG_CONFIG="$(STAGING_DIR)/usr/bin/pkg-config" \
+               PKG_CONFIG="$(PKGCONFIG_HOST_BINARY)" \
                PKG_CONFIG_PATH="$(HOST_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)"
 
 HOST_MAKE_ENV=PATH=$(HOST_PATH)
index 19148f0919590f7bd13a9692c348266b5bf81b3c..c6e0fff01c6415fa1242513f0f5c62eccf0efb03 100644 (file)
@@ -9,7 +9,7 @@ PKGCONFIG_SITE:=http://pkgconfig.freedesktop.org/releases/
 PKGCONFIG_DIR:=$(BUILD_DIR)/pkg-config-$(PKGCONFIG_VERSION)
 PKGCONFIG_CAT:=$(ZCAT)
 PKGCONFIG_BINARY:=pkg-config
-PKGCONFIG_TARGET_BINARY:=usr/bin/pkg-config
+PKGCONFIG_HOST_BINARY:=$(HOST_DIR)/usr/bin/pkg-config
 
 $(DL_DIR)/$(PKGCONFIG_SOURCE):
         $(call DOWNLOAD,$(PKGCONFIG_SITE),$(PKGCONFIG_SOURCE))
@@ -24,28 +24,27 @@ $(PKGCONFIG_DIR)/.unpacked: $(DL_DIR)/$(PKGCONFIG_SOURCE)
 $(PKGCONFIG_DIR)/.configured: $(PKGCONFIG_DIR)/.unpacked
        (cd $(PKGCONFIG_DIR); rm -rf config.cache; \
                ./configure \
-               --prefix=/usr \
-               --sysconfdir=/etc \
+               --prefix=$(HOST_DIR)/usr \
+               --sysconfdir=$(HOST_DIR)/etc \
                --with-pc-path="$(STAGING_DIR)/usr/lib/pkgconfig" \
-               $(DISABLE_NLS) \
-               $(DISABLE_LARGEFILE) \
+               --disable-static \
        )
        touch $@
 
 $(PKGCONFIG_DIR)/$(PKGCONFIG_BINARY): $(PKGCONFIG_DIR)/.configured
        $(MAKE) -C $(PKGCONFIG_DIR)
 
-$(STAGING_DIR)/$(PKGCONFIG_TARGET_BINARY): $(PKGCONFIG_DIR)/$(PKGCONFIG_BINARY)
-       $(MAKE) DESTDIR=$(STAGING_DIR) -C $(PKGCONFIG_DIR) install
-       rm -rf $(STAGING_DIR)/usr/share/man
+$(PKGCONFIG_HOST_BINARY): $(PKGCONFIG_DIR)/$(PKGCONFIG_BINARY)
+       $(MAKE) -C $(PKGCONFIG_DIR) install
 
-pkgconfig: uclibc $(STAGING_DIR)/$(PKGCONFIG_TARGET_BINARY)
+host-pkgconfig pkgconfig: $(PKGCONFIG_HOST_BINARY)
 
-pkgconfig-clean:
-       -$(MAKE) DESTDIR=$(STAGING_DIR) -C $(PKGCONFIG_DIR) uninstall
+host-pkgconfig-clean pkgconfig-clean:
+       rm -f $(addprefix $(PKGCONFIG_DIR)/,.unpacked .configured .compiled)
+       -$(MAKE) -C $(PKGCONFIG_DIR) uninstall
        -$(MAKE) -C $(PKGCONFIG_DIR) clean
 
-pkgconfig-dirclean:
+host-pkgconfig-dirclean pkgconfig-dirclean:
        rm -rf $(PKGCONFIG_DIR)
 
 #############################################################