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
49f88527
Commit
49f88527
authored
Feb 25, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: Parse the entire top-level makefile.
It's only done once so there are no longer any performance concerns. Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ce231568
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
Makefile.in
Makefile.in
+0
-3
makedep.c
tools/makedep.c
+6
-6
No files found.
Makefile.in
View file @
49f88527
...
...
@@ -18,7 +18,6 @@
# sgmlpages: compile sgml source for the Wine API Guide
# xmlpages: compile xml source for the Wine API Guide
# Start of common header
# The following variable definitions are copied into all makefiles
prefix
=
@prefix@
...
...
@@ -100,8 +99,6 @@ ALL_TEST_RESOURCES = @ALL_TEST_RESOURCES@
@ALL_VARS_RULES@
@SET_MAKE@
# End of common header
all
:
wine
@
echo
"Wine build complete."
...
...
tools/makedep.c
View file @
49f88527
...
...
@@ -182,6 +182,7 @@ struct makefile
static
struct
makefile
*
top_makefile
;
static
const
char
separator
[]
=
"### Dependencies"
;
static
const
char
*
output_makefile_name
=
"Makefile"
;
static
const
char
*
input_file_name
;
static
const
char
*
output_file_name
;
...
...
@@ -1685,7 +1686,7 @@ static int set_make_variable( struct strarray *array, const char *assignment )
/*******************************************************************
* parse_makefile
*/
static
struct
makefile
*
parse_makefile
(
const
char
*
path
,
const
char
*
separator
)
static
struct
makefile
*
parse_makefile
(
const
char
*
path
)
{
char
*
buffer
;
FILE
*
file
;
...
...
@@ -1702,7 +1703,7 @@ static struct makefile *parse_makefile( const char *path, const char *separator
file
=
open_input_makefile
(
make
);
while
((
buffer
=
get_line
(
file
)))
{
if
(
separator
&&
!
strncmp
(
buffer
,
separator
,
strlen
(
separator
)
))
break
;
if
(
!
strncmp
(
buffer
,
separator
,
strlen
(
separator
)
))
break
;
if
(
*
buffer
==
'\t'
)
continue
;
/* command */
while
(
isspace
(
*
buffer
))
buffer
++
;
if
(
*
buffer
==
'#'
)
continue
;
/* comment */
...
...
@@ -3211,7 +3212,6 @@ static void output_top_variables( const struct makefile *make )
*/
static
void
output_dependencies
(
const
struct
makefile
*
make
)
{
static
const
char
separator
[]
=
"### Dependencies"
;
struct
strarray
targets
,
ignore_files
=
empty_strarray
;
char
buffer
[
1024
];
FILE
*
src_file
;
...
...
@@ -3449,7 +3449,7 @@ int main( int argc, char *argv[] )
for
(
i
=
0
;
i
<
HASH_SIZE
;
i
++
)
list_init
(
&
files
[
i
]
);
top_makefile
=
parse_makefile
(
NULL
,
"# End of common header"
);
top_makefile
=
parse_makefile
(
NULL
);
linguas
=
get_expanded_make_var_array
(
top_makefile
,
"LINGUAS"
);
target_flags
=
get_expanded_make_var_array
(
top_makefile
,
"TARGETFLAGS"
);
...
...
@@ -3485,7 +3485,7 @@ int main( int argc, char *argv[] )
top_makefile
->
submakes
=
xmalloc
(
top_makefile
->
subdirs
.
count
*
sizeof
(
*
top_makefile
->
submakes
)
);
for
(
i
=
0
;
i
<
top_makefile
->
subdirs
.
count
;
i
++
)
top_makefile
->
submakes
[
i
]
=
parse_makefile
(
top_makefile
->
subdirs
.
str
[
i
]
,
NULL
);
top_makefile
->
submakes
[
i
]
=
parse_makefile
(
top_makefile
->
subdirs
.
str
[
i
]
);
load_sources
(
top_makefile
);
for
(
i
=
0
;
i
<
top_makefile
->
subdirs
.
count
;
i
++
)
...
...
@@ -3500,7 +3500,7 @@ int main( int argc, char *argv[] )
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
struct
makefile
*
make
=
parse_makefile
(
argv
[
i
]
,
NULL
);
struct
makefile
*
make
=
parse_makefile
(
argv
[
i
]
);
load_sources
(
make
);
output_dependencies
(
make
);
}
...
...
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