makefiles: Create test resource files directly from the test build directory.

This commit is contained in:
Alexandre Julliard 2011-05-24 11:11:22 +02:00
parent be23f5a7a6
commit 9b99cd1d31
8 changed files with 22 additions and 122 deletions

3
.gitignore vendored
View File

@ -1,11 +1,11 @@
# Automatically generated by make_makefiles; DO NOT EDIT!!
*.[oa]
*.exe
*.fake
*.man
*.ok
*.res
*.so
*/*/tests/*crosstest.exe
*/*/tests/testlist.c
/Make.rules
/Maketest.rules
@ -264,7 +264,6 @@ programs/services/svcctl_s.c
programs/winedbg/dbg.tab.c
programs/winedbg/dbg.tab.h
programs/winedbg/debug.yy.c
programs/winetest/*_test.exe
programs/winetest/build.nfo
programs/winetest/build.rc
programs/winhlp32/macro.lex.yy.c

View File

@ -41,7 +41,6 @@ DLLWRAP = @DLLWRAP@
AR = @AR@
ARFLAGS = @ARFLAGS@
RANLIB = @RANLIB@
STRIP = @STRIP@
LN_S = @LN_S@
TOOLSDIR = @TOOLSDIR@
LDFLAGS = @LDFLAGS@

View File

@ -15,6 +15,8 @@ DEFS = -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION $(EXTRADEFS
MODULE = $(TESTDLL:%.dll=%)_test.exe
TESTRESULTS = $(C_SRCS:.c=.ok)
TESTPROGRAM = $(MODULE)$(DLLEXT)
WINETEST_EXE = $(TESTDLL:%.dll=%)_test-stripped.exe$(DLLEXT)
WINETEST_RES = $(top_builddir)/programs/winetest/$(TESTDLL:%.dll=%)_test.res
RUNTESTFLAGS = -q -P wine -M $(TESTDLL) -T $(top_builddir) -p $(TESTPROGRAM)
ALL_LIBS = $(IMPORTS:%=-l%) $(EXTRALIBS) $(LDFLAGS) $(LIBS)
@ -25,11 +27,17 @@ MAKEDEPFLAGS = -xo -xcross.o
@MAKE_RULES@
all: $(TESTPROGRAM)
all: $(TESTPROGRAM) $(WINETEST_RES)
$(MODULE) $(MODULE).so: $(OBJS) Makefile.in
$(WINEGCC) $(APPMODE) $(OBJS) -o $@ $(LIBPORT) $(ALL_LIBS)
$(WINETEST_EXE): $(OBJS) Makefile.in
$(WINEGCC) -s $(APPMODE) $(OBJS) -o $@ $(LIBPORT) $(ALL_LIBS)
$(WINETEST_RES): $(WINETEST_EXE)
echo "$(MODULE) TESTRES \"$(WINETEST_EXE)\"" | $(LDPATH) $(WRC) $(RCFLAGS) -o $@
.PHONY: check test testclean crosstest
# Rules for building test list

12
aclocal.m4 vendored
View File

@ -151,7 +151,7 @@ Makefile: Makefile.in Make.vars.in Make.rules config.status
@./config.status Make.tmp Makefile"
ALL_POT_FILES=""
AC_SUBST(ALL_TEST_BINARIES,"")
AC_SUBST(ALL_TEST_RESOURCES,"")
wine_fn_append_file ()
{
@ -390,19 +390,15 @@ wine_fn_config_test ()
{
ac_dir=$[1]
ac_name=$[2]
wine_fn_append_file ALL_TEST_BINARIES $ac_name.exe
wine_fn_append_file ALL_TEST_RESOURCES $ac_name.res
wine_fn_all_dir_rules $ac_dir Maketest.rules
AS_VAR_IF([enable_tests],[no],,[wine_fn_append_rule ALL_MAKEFILE_DEPENDS \
"all $ac_dir/$ac_name.exe$DLLEXT: $ac_dir
"all: $ac_dir
.PHONY: $ac_dir
$ac_dir: $ac_dir/Makefile __builddeps__ dummy
@cd $ac_dir && \$(MAKE)
programs/winetest/$ac_name.exe: $ac_dir/$ac_name.exe$DLLEXT
cp $ac_dir/$ac_name.exe$DLLEXT \$[@] && \$(STRIP) \$[@]
programs/winetest/$ac_name.res: programs/winetest/$ac_name.exe
echo \"$ac_name.exe TESTRES \\\"programs/winetest/$ac_name.exe\\\"\" | \$(LDPATH) \$(WRC) \$(RCFLAGS) -o \$[@]
programs/winetest: programs/winetest/$ac_name.res
programs/winetest: $ac_dir
check test: $ac_dir/__test__
.PHONY: $ac_dir/__test__
$ac_dir/__test__: dummy

108
configure vendored
View File

@ -605,7 +605,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
LINGUAS
ALL_TEST_BINARIES
ALL_TEST_RESOURCES
LDAPLIBS
LIBPOLL
LIBDL
@ -700,7 +700,6 @@ LDCONFIG
EGREP
GREP
LN_S
STRIP
RANLIB
ARFLAGS
ac_ct_AR
@ -4518,98 +4517,6 @@ else
RANLIB="$ac_cv_prog_RANLIB"
fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
$as_echo "$STRIP" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
$as_echo "$ac_ct_STRIP" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
STRIP="strip"
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
STRIP=$ac_ct_STRIP
fi
else
STRIP="$ac_cv_prog_STRIP"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
$as_echo_n "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
@ -6531,7 +6438,6 @@ fi
LDDLLFLAGS="-bundle -multiply_defined suppress"
LIBWINE_LDFLAGS="-multiply_defined suppress"
LDSHARED="\$(CC) -dynamiclib"
STRIP="$STRIP -x"
LDRPATH_LOCAL="&& install_name_tool -change @executable_path/\`\$(RELPATH) \$(bindir) \$(libdir)\`/libwine.1.dylib @executable_path/\$(top_builddir)/libs/wine/libwine.1.dylib \$@ || \$(RM) \$@"
COREFOUNDATIONLIB="-framework CoreFoundation"
@ -14608,7 +14514,7 @@ Makefile: Makefile.in Make.vars.in Make.rules config.status
@./config.status Make.tmp Makefile"
ALL_POT_FILES=""
ALL_TEST_BINARIES=""
ALL_TEST_RESOURCES=""
wine_fn_append_file ()
@ -14854,22 +14760,18 @@ wine_fn_config_test ()
{
ac_dir=$1
ac_name=$2
wine_fn_append_file ALL_TEST_BINARIES $ac_name.exe
wine_fn_append_file ALL_TEST_RESOURCES $ac_name.res
wine_fn_all_dir_rules $ac_dir Maketest.rules
if test "x$enable_tests" = xno; then :
else
wine_fn_append_rule ALL_MAKEFILE_DEPENDS \
"all $ac_dir/$ac_name.exe$DLLEXT: $ac_dir
"all: $ac_dir
.PHONY: $ac_dir
$ac_dir: $ac_dir/Makefile __builddeps__ dummy
@cd $ac_dir && \$(MAKE)
programs/winetest/$ac_name.exe: $ac_dir/$ac_name.exe$DLLEXT
cp $ac_dir/$ac_name.exe$DLLEXT \$@ && \$(STRIP) \$@
programs/winetest/$ac_name.res: programs/winetest/$ac_name.exe
echo \"$ac_name.exe TESTRES \\\"programs/winetest/$ac_name.exe\\\"\" | \$(LDPATH) \$(WRC) \$(RCFLAGS) -o \$@
programs/winetest: programs/winetest/$ac_name.res
programs/winetest: $ac_dir
check test: $ac_dir/__test__
.PHONY: $ac_dir/__test__
$ac_dir/__test__: dummy

View File

@ -268,7 +268,6 @@ fi
AC_CHECK_TOOLS(AR,[ar gar],ar)
AC_SUBST(ARFLAGS,rc)
AC_PROG_RANLIB
AC_CHECK_TOOL(STRIP,strip,strip)
AC_PROG_LN_S
AC_PROG_EGREP
AC_PATH_PROG(LDCONFIG, ldconfig, true, [/sbin /usr/sbin $PATH])
@ -699,7 +698,6 @@ case $host_os in
LDDLLFLAGS="-bundle -multiply_defined suppress"
LIBWINE_LDFLAGS="-multiply_defined suppress"
LDSHARED="\$(CC) -dynamiclib"
STRIP="$STRIP -x"
LDRPATH_LOCAL="&& install_name_tool -change @executable_path/\`\$(RELPATH) \$(bindir) \$(libdir)\`/libwine.1.dylib @executable_path/\$(top_builddir)/libs/wine/libwine.1.dylib \$@ || \$(RM) \$@"
dnl declare needed frameworks
AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation")

View File

@ -14,13 +14,12 @@ RC_SRCS = \
SVG_SRCS = winetest.svg
TESTBINS = @ALL_TEST_BINARIES@
EXTRA_OBJS = build.res $(TESTBINS:.exe=.res)
EXTRA_OBJS = build.res @ALL_TEST_RESOURCES@
@MAKE_PROG_RULES@
clean::
$(RM) build.rc build.nfo $(TESTBINS)
$(RM) build.rc build.nfo
build.rc: dummy
build="BUILD_INFO STRINGRES build.nfo STRINGTABLE { 1 \"`GIT_DIR=$(top_srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || ($(RM) $@ && exit 1)

View File

@ -75,6 +75,7 @@ my %modules16 =
# Default patterns for top-level .gitignore
my @ignores = (
"*.[oa]",
"*.exe",
"*.fake",
"*.man",
"*.ok",
@ -93,12 +94,10 @@ my @ignores = (
"dlldata.c",
"dlls/*/*.def",
"dlls/shell32/AUTHORS",
"*/*/tests/*crosstest.exe",
"*/*/tests/testlist.c",
"include/config.h",
"include/stamp-h",
"msg.pot",
"programs/winetest/*_test.exe",
"programs/winetest/build.nfo",
"programs/winetest/build.rc",
"rsrc.pot",