Alexandre Julliard : makefiles: Use winegcc to build the crosstests too.
Alexandre Julliard
julliard at winehq.org
Wed Jun 3 09:31:15 CDT 2009
Module: wine
Branch: master
Commit: a2d88ab356dcb6ee71b4ef52416c6b33939bc1b5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a2d88ab356dcb6ee71b4ef52416c6b33939bc1b5
Author: Alexandre Julliard <julliard at winehq.org>
Date: Sat May 30 17:08:06 2009 +0200
makefiles: Use winegcc to build the crosstests too.
---
configure | 47 +++--------------------------------------------
configure.ac | 2 +-
dlls/Maketest.rules.in | 12 +++++-------
3 files changed, 9 insertions(+), 52 deletions(-)
diff --git a/configure b/configure
index 35fb4ac..85f27b7 100755
--- a/configure
+++ b/configure
@@ -693,8 +693,8 @@ X_PRE_LIBS
X_CFLAGS
XMKMF
LIBPTHREAD
+CROSSTARGETFLAGS
CROSSTEST
-CROSSWINDRES
CROSSCC
CARBONLIB
COREAUDIO
@@ -8199,49 +8199,6 @@ fi
done
test -n "$DLLTOOL" || DLLTOOL="false"
- for ac_prog in $host_cpu-pc-mingw32-windres i586-mingw32msvc-windres i386-mingw32msvc-windres i686-mingw32-windres i586-mingw32-windres i486-mingw32-windres i386-mingw32-windres mingw32-windres i686-pc-mingw32-windres mingw-windres
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CROSSWINDRES+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CROSSWINDRES"; then
- ac_cv_prog_CROSSWINDRES="$CROSSWINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CROSSWINDRES="$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CROSSWINDRES=$ac_cv_prog_CROSSWINDRES
-if test -n "$CROSSWINDRES"; then
- { $as_echo "$as_me:$LINENO: result: $CROSSWINDRES" >&5
-$as_echo "$CROSSWINDRES" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CROSSWINDRES" && break
-done
-test -n "$CROSSWINDRES" || CROSSWINDRES="false"
-
for ac_prog in $host_cpu-pc-mingw32-ar i586-mingw32msvc-ar i386-mingw32msvc-ar i686-mingw32-ar i586-mingw32-ar i486-mingw32-ar i386-mingw32-ar mingw32-ar i686-pc-mingw32-ar mingw-ar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -8289,6 +8246,8 @@ test -n "$MINGWAR" || MINGWAR="false"
then
CROSSTEST="\$(CROSSTEST)"
+ CROSSTARGETFLAGS="-b `expr $CROSSCC : '\(.*\)-gcc'`"
+
fi
fi
diff --git a/configure.ac b/configure.ac
index 9fc8936..001c312 100644
--- a/configure.ac
+++ b/configure.ac
@@ -679,11 +679,11 @@ if test "$cross_compiling" = "no" -a "$LIBEXT" != "dll"
then
WINE_CHECK_MINGW_PROG(CROSSCC,gcc,false)
WINE_CHECK_MINGW_PROG(DLLTOOL,dlltool,false)
- WINE_CHECK_MINGW_PROG(CROSSWINDRES,windres,false)
WINE_CHECK_MINGW_PROG(MINGWAR,ar,false)
if test "$CROSSCC" != "false"
then
AC_SUBST(CROSSTEST,"\$(CROSSTEST)")
+ AC_SUBST(CROSSTARGETFLAGS,"-b `expr $CROSSCC : '\(.*\)-gcc'`")
fi
fi
diff --git a/dlls/Maketest.rules.in b/dlls/Maketest.rules.in
index 7ea8372..0ff50d9 100644
--- a/dlls/Maketest.rules.in
+++ b/dlls/Maketest.rules.in
@@ -22,9 +22,8 @@ ALL_LIBS = $(IMPORTS:%=-l%) $(EXTRALIBS) $(LDFLAGS) $(LIBS)
EXTRA_OBJS = testlist.o
CROSSTEST = $(TESTDLL:%.dll=%)_crosstest.exe
-CROSSOBJS = $(C_SRCS:.c=.cross.o) $(RC_SRCS:.rc=.res.cross.o) $(BISON_SRCS:.y=.tab.cross.o) $(LEX_SRCS:.l=.yy.cross.o) $(IDL_GEN_C_SRCS:.c=.cross.o) testlist.cross.o
CROSSCC = @CROSSCC@
-CROSSWINDRES = @CROSSWINDRES@
+CROSSWINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc @CROSSTARGETFLAGS@ -B$(TOOLSDIR)/tools/winebuild --sysroot=$(TOPOBJDIR)
@MAKE_RULES@
@@ -48,18 +47,17 @@ $(TESTRESULTS): $(MODULE)$(DLLEXT) ../$(TESTDLL)$(DLLEXT)
# Rules for cross-compiling tests
-.SUFFIXES: .cross.o .res.cross.o
+CROSSOBJS = $(OBJS:.o=.cross.o) $(RC_SRCS:.rc=.res)
+
+.SUFFIXES: .cross.o
.c.cross.o:
$(CROSSCC) -c $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CFLAGS) -o $@ $<
-.res.res.cross.o:
- $(CROSSWINDRES) -i $< -o $@
-
crosstest:: @CROSSTEST@
$(CROSSTEST): $(CROSSOBJS) Makefile.in
- $(CROSSCC) $(CROSSOBJS) -o $@ -L$(DLLDIR) $(IMPORTS:%=-L$(DLLDIR)/%) $(ALL_LIBS)
+ $(CROSSWINEGCC) $(CROSSOBJS) -o $@ $(ALL_LIBS)
$(CROSSOBJS): $(IDL_GEN_HEADERS)
More information about the wine-cvs
mailing list