Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8bf0f5fe
Commit
8bf0f5fe
authored
Dec 30, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Generate rules for test binaries.
parent
908dada6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
50 deletions
+68
-50
Make.rules.in
Make.rules.in
+1
-18
configure
configure
+1
-14
configure.ac
configure.ac
+1
-14
makedep.c
tools/makedep.c
+65
-4
No files found.
Make.rules.in
View file @
8bf0f5fe
...
...
@@ -19,12 +19,9 @@ RCFLAGS = --nostdinc $(PORCFLAGS) $(TARGETFLAGS) $(DEFS) $(EXTRARCFLAGS)
IDL_GEN_C_SRCS = $(IDL_C_SRCS:.idl=_c.c) $(IDL_I_SRCS:.idl=_i.c) \
$(IDL_P_SRCS:.idl=_p.c) $(IDL_S_SRCS:.idl=_s.c)
CLEAN_TARGETS = $(TESTMODULE) $(TESTMODULE_STRIPPED) $(CROSSTESTMODULE)
OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) $(OBJC_SRCS:.m=.o) \
$(IDL_R_SRCS:.idl=_r.res) $(IDL_TLB_RES) $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.res) $(EXTRA_OBJS)
CROSSOBJS = $(OBJS:.o=.cross.o)
ALLCROSSCFLAGS = $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS)
# Rules for dependencies
...
...
@@ -34,20 +31,6 @@ depend: dummy
.PHONY: depend
# Rules for tests
$(TESTMODULE) $(TESTMODULE:%=%.so): $(OBJS)
$(WINEGCC) $(APPMODE) $(OBJS) -o $@ $(IMPORTS:%=-l%) $(LDFLAGS) $(LIBS)
$(TESTMODULE_STRIPPED): $(OBJS)
$(WINEGCC) -s -Wb,-F,$(TESTMODULE) $(APPMODE) $(OBJS) -o $@ $(IMPORTS:%=-l%) $(LDFLAGS) $(LIBS)
$(CROSSTESTMODULE): $(CROSSOBJS)
$(CROSSWINEGCC) $(CROSSOBJS) -o $@ $(IMPORTS:%=-l%) $(LDFLAGS) $(LIBS)
$(WINETEST_RES): $(TESTMODULE_STRIPPED)
echo "$(TESTMODULE) TESTRES \"$(TESTMODULE_STRIPPED)\"" | $(WRC) $(RCFLAGS) -o $@
# Rules for man pages
all: $(MANPAGES:.man.in=.man)
...
...
@@ -55,7 +38,7 @@ all: $(MANPAGES:.man.in=.man)
# Rules for cleaning
clean::
$(RM) $(CLEAN_FILES) $(
CLEAN_TARGETS) $(
PROGRAMS)
$(RM) $(CLEAN_FILES) $(PROGRAMS)
.PHONY: clean
...
...
configure
View file @
8bf0f5fe
...
...
@@ -16577,25 +16577,14 @@ DLLFLAGS = $DLLFLAGS
MAKE_TEST_RULES
=
"
DLLFLAGS =
$DLLFLAGS
TESTMODULE =
\$
(TESTDLL:%.dll=%)_test.exe
TESTMODULE_STRIPPED =
\$
(TESTDLL:%.dll=%)_test-stripped.exe
$DLLEXT
WINETEST_RES =
\$
(top_builddir)/programs/winetest/
\$
(TESTDLL:%.dll=%)_test.res
RUNTESTFLAGS = -q -P wine -T
\$
(top_builddir) -M
\$
(TESTDLL) -p
\$
(TESTMODULE)
$DLLEXT
RUNTESTFLAGS = -q -P wine
EXTRA_OBJS = testlist.o
all:
\$
(TESTMODULE)
$DLLEXT
\$
(WINETEST_RES)
\$
(C_SRCS:.c=.ok):
\$
(TESTMODULE)
$DLLEXT
\$
(TESTDLL:%=../%
$DLLEXT
)
"
if
test
-n
"
$CROSSTARGET
"
then
as_fn_append MAKE_TEST_RULES
"
MAKEDEPFLAGS = -xo -xcross.o
CROSSTESTMODULE =
\$
(TESTDLL:%.dll=%)_crosstest.exe
crosstest:
\$
(CROSSTESTMODULE)
.PHONY: crosstest
"
fi
...
...
@@ -17409,8 +17398,6 @@ zh_TW"
wine_fn_ignore_file
"*.exe"
test
-n
"
$DLLEXT
"
&&
wine_fn_ignore_file
"*
$DLLEXT
"
wine_fn_ignore_file
".gitignore"
wine_fn_ignore_file
"Makefile"
wine_fn_ignore_file
"TAGS"
...
...
configure.ac
View file @
8bf0f5fe
...
...
@@ -2635,24 +2635,13 @@ dnl Test rules
AC_SUBST(MAKE_TEST_RULES,"
DLLFLAGS = $DLLFLAGS
TESTMODULE = \$(TESTDLL:%.dll=%)_test.exe
TESTMODULE_STRIPPED = \$(TESTDLL:%.dll=%)_test-stripped.exe$DLLEXT
WINETEST_RES = \$(top_builddir)/programs/winetest/\$(TESTDLL:%.dll=%)_test.res
RUNTESTFLAGS = -q -P wine -T \$(top_builddir) -M \$(TESTDLL) -p \$(TESTMODULE)$DLLEXT
RUNTESTFLAGS = -q -P wine
EXTRA_OBJS = testlist.o
all: \$(TESTMODULE)$DLLEXT \$(WINETEST_RES)
\$(C_SRCS:.c=.ok): \$(TESTMODULE)$DLLEXT \$(TESTDLL:%=../%$DLLEXT)
")
if test -n "$CROSSTARGET"
then
AS_VAR_APPEND([MAKE_TEST_RULES],"
MAKEDEPFLAGS = -xo -xcross.o
CROSSTESTMODULE = \$(TESTDLL:%.dll=%)_crosstest.exe
crosstest: \$(CROSSTESTMODULE)
.PHONY: crosstest
")
fi
...
...
@@ -3455,8 +3444,6 @@ dnl End of auto-generated output commands
dnl Main ignore file
WINE_IGNORE_FILE("*.exe")
test -n "$DLLEXT" && WINE_IGNORE_FILE("*$DLLEXT")
WINE_IGNORE_FILE(".gitignore")
WINE_IGNORE_FILE("Makefile")
WINE_IGNORE_FILE("TAGS")
...
...
tools/makedep.c
View file @
8bf0f5fe
...
...
@@ -1367,7 +1367,6 @@ static struct strarray output_sources(void)
struct
incl_file
*
source
;
int
i
;
const
char
*
dllext
=
".so"
;
int
is_test
=
find_src_file
(
"testlist.o"
)
!=
NULL
;
struct
strarray
object_files
=
empty_strarray
;
struct
strarray
crossobj_files
=
empty_strarray
;
struct
strarray
res_files
=
empty_strarray
;
...
...
@@ -1385,6 +1384,7 @@ static struct strarray output_sources(void)
struct
strarray
delayimports
=
get_expanded_make_var_array
(
"DELAYIMPORTS"
);
char
*
module
=
get_expanded_make_variable
(
"MODULE"
);
char
*
exeext
=
get_expanded_make_variable
(
"EXEEXT"
);
char
*
testdll
=
get_expanded_make_variable
(
"TESTDLL"
);
char
*
appmode
=
get_expanded_make_variable
(
"APPMODE"
);
char
*
staticlib
=
get_expanded_make_variable
(
"STATICLIB"
);
char
*
crosstarget
=
get_expanded_make_variable
(
"CROSSTARGET"
);
...
...
@@ -1602,11 +1602,12 @@ static struct strarray output_sources(void)
output_filename
(
"$(ALLCROSSCFLAGS)"
);
output
(
"
\n
"
);
}
if
(
is_test
&&
!
strcmp
(
ext
,
"c"
)
&&
!
(
source
->
flags
&
FLAG_GENERATED
))
if
(
testdll
&&
!
strcmp
(
ext
,
"c"
)
&&
!
(
source
->
flags
&
FLAG_GENERATED
))
{
strarray_add
(
&
test_files
,
source
->
name
);
output
(
"%s.ok:
\n
"
,
obj
);
output
(
"
\t
$(RUNTEST) $(RUNTESTFLAGS) %s && touch $@
\n
"
,
obj
);
output
(
"
\t
$(RUNTEST) $(RUNTESTFLAGS) -T %s -M %s -p %s%s %s && touch $@
\n
"
,
top_obj_dir
,
testdll
,
replace_extension
(
testdll
,
".dll"
,
"_test.exe"
),
dllext
,
obj
);
}
for
(
i
=
0
;
i
<
object_extensions
.
count
;
i
++
)
output
(
"%s.%s "
,
obj
,
object_extensions
.
str
[
i
]
);
...
...
@@ -1773,13 +1774,73 @@ static struct strarray output_sources(void)
}
}
if
(
is_test
)
if
(
testdll
)
{
struct
strarray
ok_files
=
strarray_replace_extension
(
&
test_files
,
".c"
,
".ok"
);
char
*
testmodule
=
replace_extension
(
testdll
,
".dll"
,
"_test.exe"
);
char
*
stripped
=
replace_extension
(
testdll
,
".dll"
,
"_test-stripped.exe"
);
struct
strarray
all_libs
=
empty_strarray
;
for
(
i
=
0
;
i
<
imports
.
count
;
i
++
)
strarray_add
(
&
all_libs
,
strmake
(
"-l%s"
,
imports
.
str
[
i
]
));
strarray_addall
(
&
all_libs
,
get_expanded_make_var_array
(
"LIBS"
));
strarray_add
(
&
all_targets
,
strmake
(
"%s%s"
,
testmodule
,
dllext
));
strarray_add
(
&
clean_files
,
strmake
(
"%s%s"
,
stripped
,
dllext
));
output
(
"%s%s:
\n
"
,
testmodule
,
dllext
);
output
(
"
\t
$(WINEGCC) -o $@"
);
if
(
appmode
)
output_filename
(
appmode
);
output_filenames
(
object_files
);
output_filenames
(
res_files
);
output_filenames
(
all_libs
);
output_filename
(
"$(LDFLAGS)"
);
output
(
"
\n
"
);
output
(
"%s%s:
\n
"
,
stripped
,
dllext
);
output
(
"
\t
$(WINEGCC) -s -o $@ -Wb,-F,%s"
,
testmodule
);
if
(
appmode
)
output_filename
(
appmode
);
output_filenames
(
object_files
);
output_filenames
(
res_files
);
output_filenames
(
all_libs
);
output_filename
(
"$(LDFLAGS)"
);
output
(
"
\n
"
);
output
(
"%s%s %s%s:"
,
testmodule
,
dllext
,
stripped
,
dllext
);
output_filenames
(
object_files
);
output_filenames
(
res_files
);
output
(
"
\n
"
);
if
(
top_obj_dir
)
{
char
*
testres
=
replace_extension
(
testdll
,
".dll"
,
"_test.res"
);
output
(
"all: %s/programs/winetest/%s
\n
"
,
top_obj_dir
,
testres
);
output
(
"%s/programs/winetest/%s: %s%s
\n
"
,
top_obj_dir
,
testres
,
stripped
,
dllext
);
output
(
"
\t
echo
\"
%s TESTRES
\\\"
%s%s
\\\"\"
| $(WRC) $(RCFLAGS) -o $@
\n
"
,
testmodule
,
stripped
,
dllext
);
}
if
(
crosstarget
)
{
char
*
crosstest
=
replace_extension
(
testdll
,
".dll"
,
"_crosstest.exe"
);
strarray_add
(
&
clean_files
,
crosstest
);
output
(
"crosstest: %s
\n
"
,
crosstest
);
output
(
"%s:"
,
crosstest
);
output_filenames
(
crossobj_files
);
output_filenames
(
res_files
);
output
(
"
\n
"
);
output
(
"
\t
$(CROSSWINEGCC) -o $@"
);
output_filenames
(
crossobj_files
);
output_filenames
(
res_files
);
output_filenames
(
all_libs
);
output_filename
(
"$(LDFLAGS)"
);
output
(
"
\n
"
);
strarray_add
(
&
phony_targets
,
"crosstest"
);
}
output
(
"testlist.c: $(MAKECTESTS) %s
\n
"
,
src_dir
?
strmake
(
"%s/Makefile.in"
,
src_dir
)
:
"Makefile.in"
);
output
(
"
\t
$(MAKECTESTS) -o $@"
);
output_filenames
(
test_files
);
output
(
"
\n
"
);
output_filenames
(
ok_files
);
output
(
": %s%s ../%s%s
\n
"
,
testmodule
,
dllext
,
testdll
,
dllext
);
output
(
"check test:"
);
output_filenames
(
ok_files
);
output
(
"
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment