summaryrefslogtreecommitdiff
path: root/package/x11r7/xutil_makedepend
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-07-18 00:16:48 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2009-07-18 00:16:48 +0200
commitd0f902e82ed70db599325894d3ab58428164ef08 (patch)
tree45a2ca9bab5100f39f65492bfe437e0a9107be7c /package/x11r7/xutil_makedepend
parentadfd17b0bcc43124e13d869e8ffd186e30232b03 (diff)
mesa3d: compile makedepend (and in turn xproto) for the host
The mesa3d build needs makedepend on the host, so compile one in $HOST_DIR. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/x11r7/xutil_makedepend')
-rw-r--r--package/x11r7/xutil_makedepend/xutil_makedepend.mk43
1 files changed, 43 insertions, 0 deletions
diff --git a/package/x11r7/xutil_makedepend/xutil_makedepend.mk b/package/x11r7/xutil_makedepend/xutil_makedepend.mk
index b69878386..f562f5da3 100644
--- a/package/x11r7/xutil_makedepend/xutil_makedepend.mk
+++ b/package/x11r7/xutil_makedepend/xutil_makedepend.mk
@@ -12,3 +12,46 @@ XUTIL_MAKEDEPEND_INSTALL_STAGING = YES
XUTIL_MAKEDEPEND_INSTALL_TARGET = NO
$(eval $(call AUTOTARGETS,package/x11r7,xutil_makedepend))
+
+# makedepend for the host
+MAKEDEPEND_HOST_DIR:=$(BUILD_DIR)/makedepend-$(XUTIL_MAKEDEPEND_VERSION)-host
+
+$(DL_DIR)/$(XUTIL_MAKEDEPEND_SOURCE):
+ $(call DOWNLOAD,$(XUTIL_MAKEDEPEND_SITE),$(XUTIL_MAKEDEPEND_SOURCE))
+
+$(STAMP_DIR)/host_makedepend_unpacked: $(DL_DIR)/$(XUTIL_MAKEDEPEND_SOURCE)
+ mkdir -p $(MAKEDEPEND_HOST_DIR)
+ $(INFLATE$(suffix $(XUTIL_MAKEDEPEND_SOURCE))) $< | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(MAKEDEPEND_HOST_DIR) $(TAR_OPTIONS) -
+ touch $@
+
+$(STAMP_DIR)/host_makedepend_configured: $(STAMP_DIR)/host_makedepend_unpacked $(STAMP_DIR)/host_xproto_xproto_installed
+ (cd $(MAKEDEPEND_HOST_DIR); rm -rf config.cache; \
+ $(HOST_CONFIGURE_OPTS) \
+ CFLAGS="$(HOST_CFLAGS)" \
+ LDFLAGS="$(HOST_LDFLAGS)" \
+ ./configure \
+ --prefix="$(HOST_DIR)/usr" \
+ --sysconfdir="$(HOST_DIR)/etc" \
+ )
+ touch $@
+
+$(STAMP_DIR)/host_makedepend_compiled: $(STAMP_DIR)/host_makedepend_configured
+ $(HOST_MAKE_ENV) $(MAKE) -C $(MAKEDEPEND_HOST_DIR)
+ touch $@
+
+$(STAMP_DIR)/host_makedepend_installed: $(STAMP_DIR)/host_makedepend_compiled
+ $(MAKE) -C $(MAKEDEPEND_HOST_DIR) install
+ touch $@
+
+host-makedepend: $(STAMP_DIR)/host_makedepend_installed
+
+host-makedepend-source: makedepend-source
+
+host-makedepend-clean:
+ rm -f $(addprefix $(STAMP_DIR)/host_makedepend_,unpacked configured compiled installed)
+ -$(MAKE) -C $(MAKEDEPEND_HOST_DIR) uninstall
+ -$(MAKE) -C $(MAKEDEPEND_HOST_DIR) clean
+
+host-makedepend-dirclean:
+ rm -rf $(MAKEDEPEND_HOST_DIR)