Fix cross compiling 2/2 [take #2]

Paul Millar paul at astro.gla.ac.uk
Sat Apr 29 08:59:01 CDT 2006


Hi,

This patch makes the "tools" dependency disappear if the user specifies
a --with-wine-tools option when configuring wine.

The current behaviour is broken as, when cross-compiling, make traverses into
the tools directory and tries to build the various programs.  This is wrong
because the tools in in the --with-wine-tools directory are used, not those
tools that are cross-compiled, so there is no dependency.

There is a separate activity: building the tools natively for Windows users.
I'm not sure how useful this would be, but it is still supported if someone
does "make tools" within a cross-build-configured directory (subject to
someone fixing the fchmod problem).

This version of the patch avoids non-portable Makefile operations.

ChangeLog:
  Remove the tools build dependency when the user configures with
  the --with-wine-tools option.

Index: Makefile.in
===================================================================
RCS file: /home/wine/wine/Makefile.in,v
retrieving revision 1.169
diff -u -r1.169 Makefile.in
--- Makefile.in	11 Apr 2006 12:43:58 -0000	1.169
+++ Makefile.in	29 Apr 2006 10:19:36 -0000
@@ -50,13 +50,18 @@
 INSTALLDEVSUBDIRS = include
 
 # Sub-directories to install for both install-lib and install-dev
-INSTALLBOTHSUBDIRS = dlls libs tools
+INSTALLBOTHSUBDIRS = dlls libs $(TOOLS)
 
 INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
 
 # Sub-directories to run make test into
 TESTSUBDIRS = dlls
 
+
+# Variable dependency, is "tools" if user has not run configure with --with-wine-tools.
+TOOLS = @TOOLS_DEPENDENCY@
+
+
 all: Make.rules wine
 	@echo "Wine build complete."
 
@@ -92,20 +97,20 @@
 # Dependencies between directories
 
 all: $(INSTALLSUBDIRS) $(INSTALLBOTHSUBDIRS)
-dlls: include libs tools
-fonts loader server: libs tools
-programs: dlls include libs tools
-include: libs tools
+dlls: include libs $(TOOLS)
+fonts loader server: libs $(TOOLS)
+programs: dlls include libs $(TOOLS)
+include: libs $(TOOLS)
 tools: libs
 
-dlls/__install-lib__ dlls/__install-dev__: libs tools include
-include/__install__: include libs tools
+dlls/__install-lib__ dlls/__install-dev__: libs $(TOOLS) include
+include/__install__: include libs $(TOOLS)
 libs/__install-lib__ libs/__install-dev__: libs
-fonts/__install__ loader/__install__ server/__install__: libs tools
-programs/__install__: libs tools include dlls/__install-lib__
+fonts/__install__ loader/__install__ server/__install__: libs $(TOOLS)
+programs/__install__: libs $(TOOLS) include dlls/__install-lib__
 tools/__install-lib__ tools/__install-dev__: tools
 
-$(SUBDIRS:%=%/__depend__): tools include
+$(SUBDIRS:%=%/__depend__): $(TOOLS) include
 
 # Test rules
 
@@ -115,7 +120,7 @@
 $(TESTSUBDIRS:%=%/__test__): wine
 
 crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
-$(TESTSUBDIRS:%=%/__crosstest__): tools include
+$(TESTSUBDIRS:%=%/__crosstest__): $(TOOLS) include
 
 # Misc rules
 
Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.481
diff -u -r1.481 configure.ac
--- configure.ac	18 Apr 2006 17:13:20 -0000	1.481
+++ configure.ac	29 Apr 2006 10:19:37 -0000
@@ -65,15 +65,18 @@
      else
        wine_cv_toolsdir="\$(TOPOBJDIR)"
      fi
+     tools_dependency=tools
    elif test -d "$with_wine_tools/tools/winebuild"; then
      case $with_wine_tools in
        /*) wine_cv_toolsdir="$with_wine_tools" ;;
        *)  wine_cv_toolsdir="\$(TOPOBJDIR)/$with_wine_tools" ;;
      esac
+     dnl No tools_dependency as we assume user has already compiled with_wine_tools dir.
    else
      AC_MSG_ERROR([could not find Wine tools in $with_wine_tools.])
    fi])
 AC_SUBST(TOOLSDIR,$wine_cv_toolsdir)
+AC_SUBST(TOOLS_DEPENDENCY,$tools_dependency)
 
 AC_PATH_XTRA
 AC_PROG_LEX
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060429/bcbea3d2/attachment.pgp


More information about the wine-patches mailing list