summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2009-11-03 00:10:24 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2009-12-15 19:57:36 +0100
commita02cf75e19732ee1a5d99498a19ea85cc7bf2750 (patch)
tree8b4665bfddf79981e06b257bd49dad2a3f9c805e
parentfc1163d22d905db1a6813d3493a19885f5e97ace (diff)
libxml2: convert to autotools infrastructure for host package
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/libxml2/libxml2.mk52
1 files changed, 8 insertions, 44 deletions
diff --git a/package/libxml2/libxml2.mk b/package/libxml2/libxml2.mk
index ceabcd905..a5542266e 100644
--- a/package/libxml2/libxml2.mk
+++ b/package/libxml2/libxml2.mk
@@ -20,7 +20,14 @@ LIBXML2_CONF_OPT = --with-gnu-ld --enable-shared \
--without-debugging --without-python \
--without-threads
+HOST_LIBXML2_DEPENDENCIES = host-pkg-config
+
+HOST_LIBXML2_CONF_OPT = \
+ --enable-shared --without-debugging --without-python \
+ --without-threads
+
$(eval $(call AUTOTARGETS,package,libxml2))
+$(eval $(call AUTOTARGETS,package,libxml2,host))
$(LIBXML2_HOOK_POST_INSTALL):
$(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" $(STAGING_DIR)/usr/bin/xml2-config
@@ -31,47 +38,4 @@ $(LIBXML2_HOOK_POST_INSTALL):
touch $@
# libxml2 for the host
-LIBXML2_HOST_DIR:=$(BUILD_DIR)/libxml2-$(LIBXML2_VERSION)-host
-LIBXML2_HOST_BINARY:=$(HOST_DIR)/usr/bin/xmllint
-
-$(DL_DIR)/$(LIBXML2_SOURCE):
- $(call DOWNLOAD,$(LIBXML2_SITE),$(LIBXML2_SOURCE))
-
-$(STAMP_DIR)/host_libxml2_unpacked: $(DL_DIR)/$(LIBXML2_SOURCE)
- mkdir -p $(LIBXML2_HOST_DIR)
- $(INFLATE$(suffix $(LIBXML2_SOURCE))) $< | \
- $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LIBXML2_HOST_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(STAMP_DIR)/host_libxml2_configured: $(STAMP_DIR)/host_libxml2_unpacked $(STAMP_DIR)/host_pkgconfig_installed
- (cd $(LIBXML2_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 --without-debugging --without-python \
- --without-threads \
- )
- touch $@
-
-$(STAMP_DIR)/host_libxml2_compiled: $(STAMP_DIR)/host_libxml2_configured
- $(MAKE) -C $(LIBXML2_HOST_DIR)
- touch $@
-
-$(STAMP_DIR)/host_libxml2_installed: $(STAMP_DIR)/host_libxml2_compiled
- $(HOST_MAKE_ENV) $(MAKE) -C $(LIBXML2_HOST_DIR) install
- touch $@
-
-host-libxml2: $(STAMP_DIR)/host_libxml2_installed
-
-host-libxml2-source: libxml2-source
-
-host-libxml2-clean:
- rm -f $(addprefix $(STAMP_DIR)/host_libxml2_,unpacked configured compiled installed)
- -$(MAKE) -C $(LIBXML2_HOST_DIR) uninstall
- -$(MAKE) -C $(LIBXML2_HOST_DIR) clean
-
-host-libxml2-dirclean:
- rm -rf $(LIBXML2_HOST_DIR)
+LIBXML2_HOST_BINARY:=$(HOST_DIR)/usr/bin/xmllint \ No newline at end of file