Fixing cross-compilation 2/2

Paul Millar paul at astro.gla.ac.uk
Sun Apr 23 11:23:22 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).

As always, feedback appreciated.

Cheers,

Paul.

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	22 Apr 2006 21:56:53 -0000
@@ -50,13 +50,16 @@
 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 based on whether user has run configure with --with-wine-tools option
+TOOLS := $(if @WITH_WINE_TOOLS@,,tools)
+
 all: Make.rules wine
 	@echo "Wine build complete."
 
@@ -92,20 +95,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 +118,7 @@
 $(TESTSUBDIRS:%=%/__test__): wine
 
 crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
-$(TESTSUBDIRS:%=%/__crosstest__): tools include
+$(TESTSUBDIRS:%=%/__crosstest__): $(TOOLS) include
 
 # Misc rules
 
Index: configure
===================================================================
RCS file: /home/wine/wine/configure,v
retrieving revision 1.795
diff -u -r1.795 configure
--- configure	18 Apr 2006 17:13:20 -0000	1.795
+++ configure	22 Apr 2006 21:56:56 -0000
@@ -311,7 +311,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os WIN16_FILES WIN16_INSTALL SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS FONTFORGE PKG_CONFIG PRELINK LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS XML2LIBS XML2INCL XSLTLIBS XSLTINCL HALINCL CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS RESOLVLIBS LCMSLIBS LDAPLIBS FREETYPELIBS FREETYPEINCL ft_devel ft_devel2 FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ESDCONFIG ESDLIBS ESDINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS BUILTINFLAG DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDEXERPATH LDDLLRPATH COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS MAIN_BINARY EXTRA_BINARIES LDD LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os WIN16_FILES WIN16_INSTALL SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR WITH_WINE_TOOLS CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS FONTFORGE PKG_CONFIG PRELINK LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS XML2LIBS XML2INCL XSLTLIBS XSLTINCL HALINCL CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS RESOLVLIBS LCMSLIBS LDAPLIBS FREETYPELIBS FREETYPEINCL ft_devel ft_devel2 FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ESDCONFIG ESDLIBS ESDINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS BUILTINFLAG DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDEXERPATH LDDLLRPATH COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS MAIN_BINARY EXTRA_BINARIES LDD LIBOBJS LTLIBOBJS'
 ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_IMPLIB_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES'
 
 # Initialize some variables set by options.
@@ -2891,6 +2891,8 @@
 echo "${ECHO_T}$wine_cv_toolsdir" >&6
 TOOLSDIR=$wine_cv_toolsdir
 
+WITH_WINE_TOOLS=$with_wine_tools
+
 
 
 ac_ext=c
@@ -20732,6 +20734,7 @@
 s, at CPPBIN@,$CPPBIN,;t t
 s, at ac_ct_CPPBIN@,$ac_ct_CPPBIN,;t t
 s, at TOOLSDIR@,$TOOLSDIR,;t t
+s, at WITH_WINE_TOOLS@,$WITH_WINE_TOOLS,;t t
 s, at CPP@,$CPP,;t t
 s, at X_CFLAGS@,$X_CFLAGS,;t t
 s, at X_PRE_LIBS@,$X_PRE_LIBS,;t t
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	22 Apr 2006 21:56:56 -0000
@@ -74,6 +74,7 @@
      AC_MSG_ERROR([could not find Wine tools in $with_wine_tools.])
    fi])
 AC_SUBST(TOOLSDIR,$wine_cv_toolsdir)
+AC_SUBST(WITH_WINE_TOOLS,$with_wine_tools)
 
 AC_PATH_XTRA
 AC_PROG_LEX




More information about the wine-patches mailing list