mesa3d: compile makedepend (and in turn xproto) for the host
authorPeter Korsgaard <jacmet@sunsite.dk>
Fri, 17 Jul 2009 22:16:48 +0000 (00:16 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Fri, 17 Jul 2009 22:16:48 +0000 (00:16 +0200)
The mesa3d build needs makedepend on the host, so compile one in $HOST_DIR.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/x11r7/mesa3d/mesa3d.mk
package/x11r7/xproto_xproto/xproto_xproto.mk
package/x11r7/xutil_makedepend/xutil_makedepend.mk

index 644c1bcf225b74b0e387fc82d70e4a1db122bdcc..945765f9c798fab4b1956353069d7626e168db04 100644 (file)
@@ -72,7 +72,7 @@ $(MESA3D_DIR)/.installed: $(MESA3D_DIR)/.built
        rm -Rf $(TARGET_DIR)/usr/include/GL
        touch $@
 
-mesa3d-depends: xproto_glproto xproto_xf86vidmodeproto xlib_libXxf86vm xlib_libXmu xlib_libXdamage libdrm xlib_libpciaccess
+mesa3d-depends: xproto_glproto xproto_xf86vidmodeproto xlib_libXxf86vm xlib_libXmu xlib_libXdamage libdrm xlib_libpciaccess host-makedepend
 mesa3d-source: $(DL_DIR)/$(MESA3D_SOURCE)
 mesa3d-configure: $(MESA3D_DIR)/.configured
 mesa3d-build: $(MESA3D_DIR)/.built
index 9d4faf4f66a72fb8514a7689615ace6761c8db86..d46743e09a5225a4c1581b225bded2992b184f40 100644 (file)
@@ -12,3 +12,46 @@ XPROTO_XPROTO_INSTALL_STAGING = YES
 XPROTO_XPROTO_INSTALL_TARGET = NO
 
 $(eval $(call AUTOTARGETS,package/x11r7,xproto_xproto))
+
+# xproto_xproto for the host
+XPROTO_XPROTO_HOST_DIR:=$(BUILD_DIR)/xproto_xproto-$(XPROTO_XPROTO_VERSION)-host
+
+$(DL_DIR)/$(XPROTO_XPROTO_SOURCE):
+       $(call DOWNLOAD,$(XPROTO_XPROTO_SITE),$(XPROTO_XPROTO_SOURCE))
+
+$(STAMP_DIR)/host_xproto_xproto_unpacked: $(DL_DIR)/$(XPROTO_XPROTO_SOURCE)
+       mkdir -p $(XPROTO_XPROTO_HOST_DIR)
+       $(INFLATE$(suffix $(XPROTO_XPROTO_SOURCE))) $< | \
+               $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(XPROTO_XPROTO_HOST_DIR) $(TAR_OPTIONS) -
+       touch $@
+
+$(STAMP_DIR)/host_xproto_xproto_configured: $(STAMP_DIR)/host_xproto_xproto_unpacked
+       (cd $(XPROTO_XPROTO_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_xproto_xproto_compiled: $(STAMP_DIR)/host_xproto_xproto_configured
+       $(HOST_MAKE_ENV) $(MAKE) -C $(XPROTO_XPROTO_HOST_DIR)
+       touch $@
+
+$(STAMP_DIR)/host_xproto_xproto_installed: $(STAMP_DIR)/host_xproto_xproto_compiled
+       $(MAKE) -C $(XPROTO_XPROTO_HOST_DIR) install
+       touch $@
+
+host-xproto_xproto: $(STAMP_DIR)/host_xproto_xproto_installed
+
+host-xproto_xproto-source: xproto_xproto-source
+
+host-xproto_xproto-clean:
+       rm -f $(addprefix $(STAMP_DIR)/host_xproto_xproto_,unpacked configured compiled installed)
+       -$(MAKE) -C $(XPROTO_XPROTO_HOST_DIR) uninstall
+       -$(MAKE) -C $(XPROTO_XPROTO_HOST_DIR) clean
+
+host-xproto_xproto-dirclean:
+       rm -rf $(XPROTO_XPROTO_HOST_DIR)
index b69878386eba0dfca32b692d4f6b63dfd97804b6..f562f5da377d2e287dc3c0d15d7de5e0fe3bd00a 100644 (file)
@@ -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)