libglib2: convert to autotools infrastructure for host package
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 1 Nov 2009 22:39:44 +0000 (23:39 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 15 Dec 2009 18:57:34 +0000 (19:57 +0100)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libglib2/libglib2.mk

index ea967072a87d6b17f326640e0636e15bf775359b..04e3f2dd9ee1e842cf78c8feaa9607dfa82baa00 100644 (file)
@@ -49,8 +49,16 @@ LIBGLIB2_CONF_ENV =  \
 LIBGLIB2_CONF_OPT = --enable-shared \
                --enable-static
 
+HOST_LIBGLIB2_CONF_OPT = \
+               --enable-shared \
+               --disable-static \
+               --disable-gtk-doc \
+               --enable-debug=no \
+
 LIBGLIB2_DEPENDENCIES = gettext libintl host-pkg-config host-libglib2
 
+HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config
+
 ifneq ($(BR2_ENABLE_LOCALE),y)
 LIBGLIB2_DEPENDENCIES+=libiconv
 endif
@@ -61,51 +69,6 @@ LIBGLIB2_DEPENDENCIES+=libiconv
 endif
 
 $(eval $(call AUTOTARGETS,package,libglib2))
+$(eval $(call AUTOTARGETS,package,libglib2,host))
 
-# libglib2 for the host
-LIBGLIB2_HOST_DIR:=$(BUILD_DIR)/libglib2-$(LIBGLIB2_VERSION)-host
 LIBGLIB2_HOST_BINARY:=$(HOST_DIR)/usr/bin/glib-genmarshal
-
-$(DL_DIR)/$(LIBGLIB2_SOURCE):
-       $(call DOWNLOAD,$(LIBGLIB2_SITE),$(LIBGLIB2_SOURCE))
-
-$(STAMP_DIR)/host_libglib2_unpacked: $(DL_DIR)/$(LIBGLIB2_SOURCE)
-       mkdir -p $(LIBGLIB2_HOST_DIR)
-       $(INFLATE$(suffix $(LIBGLIB2_SOURCE))) $< | \
-               $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LIBGLIB2_HOST_DIR) $(TAR_OPTIONS) -
-       touch $@
-
-$(STAMP_DIR)/host_libglib2_configured: $(STAMP_DIR)/host_libglib2_unpacked $(STAMP_DIR)/host_pkgconfig_installed
-       (cd $(LIBGLIB2_HOST_DIR); rm -rf config.cache; \
-               $(HOST_CONFIGURE_OPTS) \
-               CFLAGS="$(HOST_CFLAGS)" \
-               LDFLAGS="$(HOST_LDFLAGS)" \
-               ./configure $(QUIET) \
-               --prefix="$(HOST_DIR)/usr" \
-               --sysconfdir="$(HOST_DIR)/etc" \
-               --enable-shared \
-               --disable-static \
-               --disable-gtk-doc \
-               --enable-debug=no \
-       )
-       touch $@
-
-$(STAMP_DIR)/host_libglib2_compiled: $(STAMP_DIR)/host_libglib2_configured
-       $(MAKE) -C $(LIBGLIB2_HOST_DIR)
-       touch $@
-
-$(STAMP_DIR)/host_libglib2_installed: $(STAMP_DIR)/host_libglib2_compiled
-       $(HOST_MAKE_ENV) $(MAKE) -C $(LIBGLIB2_HOST_DIR) install
-       touch $@
-
-host-libglib2: $(STAMP_DIR)/host_libglib2_installed
-
-host-libglib2-source: libglib2-source
-
-host-libglib2-clean:
-       rm -f $(addprefix $(STAMP_DIR)/host_libglib2_,unpacked configured compiled installed)
-       -$(MAKE) -C $(LIBGLIB2_HOST_DIR) uninstall
-       -$(MAKE) -C $(LIBGLIB2_HOST_DIR) clean
-
-host-libglib2-dirclean:
-       rm -rf $(LIBGLIB2_HOST_DIR)