Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6f4d1766
Commit
6f4d1766
authored
Jul 28, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: Avoid adding the same source multiple times.
parent
872dc83e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
13 deletions
+16
-13
Makefile.in
dlls/setupapi/tests/Makefile.in
+0
-2
make_makefiles
tools/make_makefiles
+6
-0
makedep.c
tools/makedep.c
+10
-11
No files found.
dlls/setupapi/tests/Makefile.in
View file @
6f4d1766
...
@@ -18,5 +18,3 @@ SOURCES = \
...
@@ -18,5 +18,3 @@ SOURCES = \
setupapi.rc
\
setupapi.rc
\
setupcab.c
\
setupcab.c
\
stringtable.c
stringtable.c
RC_SRCS
=
setupapi.rc
tools/make_makefiles
View file @
6f4d1766
...
@@ -128,6 +128,7 @@ sub replace_makefile_variables($)
...
@@ -128,6 +128,7 @@ sub replace_makefile_variables($)
my
$make
=
$makefiles
{
$file
};
my
$make
=
$makefiles
{
$file
};
my
$source_vars_regexp
=
join
"|"
,
@source_vars
;
my
$source_vars_regexp
=
join
"|"
,
@source_vars
;
my
%
replaced
;
my
%
replaced
;
my
%
files
;
my
$old
;
my
$old
;
my
$new
;
my
$new
;
...
@@ -177,6 +178,11 @@ sub replace_makefile_variables($)
...
@@ -177,6 +178,11 @@ sub replace_makefile_variables($)
$new
.=
$new_str
;
$new
.=
$new_str
;
}
}
$replaced
{
$var
}
=
1
;
$replaced
{
$var
}
=
1
;
foreach
my
$val
(
@values
)
{
die
"$file.in: duplicate file $val"
if
defined
$files
{
$val
};
$files
{
$val
}
=
1
;
}
next
;
next
;
}
}
$new
.=
$_
;
$new
.=
$_
;
...
...
tools/makedep.c
View file @
6f4d1766
...
@@ -817,10 +817,8 @@ found:
...
@@ -817,10 +817,8 @@ found:
static
struct
incl_file
*
add_generated_source
(
struct
makefile
*
make
,
static
struct
incl_file
*
add_generated_source
(
struct
makefile
*
make
,
const
char
*
name
,
const
char
*
filename
)
const
char
*
name
,
const
char
*
filename
)
{
{
struct
incl_file
*
file
;
struct
incl_file
*
file
=
xmalloc
(
sizeof
(
*
file
)
)
;
if
((
file
=
find_src_file
(
make
,
name
)))
return
file
;
/* we already have it */
file
=
xmalloc
(
sizeof
(
*
file
)
);
memset
(
file
,
0
,
sizeof
(
*
file
)
);
memset
(
file
,
0
,
sizeof
(
*
file
)
);
file
->
file
=
add_file
(
name
);
file
->
file
=
add_file
(
name
);
file
->
name
=
xstrdup
(
name
);
file
->
name
=
xstrdup
(
name
);
...
@@ -1564,10 +1562,8 @@ static void parse_file( struct makefile *make, struct incl_file *source, int src
...
@@ -1564,10 +1562,8 @@ static void parse_file( struct makefile *make, struct incl_file *source, int src
*/
*/
static
struct
incl_file
*
add_src_file
(
struct
makefile
*
make
,
const
char
*
name
)
static
struct
incl_file
*
add_src_file
(
struct
makefile
*
make
,
const
char
*
name
)
{
{
struct
incl_file
*
file
;
struct
incl_file
*
file
=
xmalloc
(
sizeof
(
*
file
)
)
;
if
((
file
=
find_src_file
(
make
,
name
)))
return
file
;
/* we already have it */
file
=
xmalloc
(
sizeof
(
*
file
)
);
memset
(
file
,
0
,
sizeof
(
*
file
)
);
memset
(
file
,
0
,
sizeof
(
*
file
)
);
file
->
name
=
xstrdup
(
name
);
file
->
name
=
xstrdup
(
name
);
file
->
use_msvcrt
=
make
->
use_msvcrt
;
file
->
use_msvcrt
=
make
->
use_msvcrt
;
...
@@ -1744,7 +1740,7 @@ static struct makefile *parse_makefile( const char *path )
...
@@ -1744,7 +1740,7 @@ static struct makefile *parse_makefile( const char *path )
static
void
add_generated_sources
(
struct
makefile
*
make
)
static
void
add_generated_sources
(
struct
makefile
*
make
)
{
{
unsigned
int
i
;
unsigned
int
i
;
struct
incl_file
*
source
,
*
next
,
*
file
;
struct
incl_file
*
source
,
*
next
,
*
file
,
*
dlldata
=
NULL
;
struct
strarray
objs
=
get_expanded_make_var_array
(
make
,
"EXTRA_OBJS"
);
struct
strarray
objs
=
get_expanded_make_var_array
(
make
,
"EXTRA_OBJS"
);
LIST_FOR_EACH_ENTRY_SAFE
(
source
,
next
,
&
make
->
sources
,
struct
incl_file
,
entry
)
LIST_FOR_EACH_ENTRY_SAFE
(
source
,
next
,
&
make
->
sources
,
struct
incl_file
,
entry
)
...
@@ -1772,10 +1768,13 @@ static void add_generated_sources( struct makefile *make )
...
@@ -1772,10 +1768,13 @@ static void add_generated_sources( struct makefile *make )
}
}
if
(
source
->
file
->
flags
&
FLAG_IDL_PROXY
)
if
(
source
->
file
->
flags
&
FLAG_IDL_PROXY
)
{
{
file
=
add_generated_source
(
make
,
"dlldata.o"
,
"dlldata.c"
);
if
(
!
dlldata
)
add_dependency
(
file
->
file
,
"objbase.h"
,
INCL_NORMAL
);
{
add_dependency
(
file
->
file
,
"rpcproxy.h"
,
INCL_NORMAL
);
dlldata
=
add_generated_source
(
make
,
"dlldata.o"
,
"dlldata.c"
);
add_all_includes
(
make
,
file
,
file
->
file
);
add_dependency
(
dlldata
->
file
,
"objbase.h"
,
INCL_NORMAL
);
add_dependency
(
dlldata
->
file
,
"rpcproxy.h"
,
INCL_NORMAL
);
add_all_includes
(
make
,
dlldata
,
dlldata
->
file
);
}
file
=
add_generated_source
(
make
,
replace_extension
(
source
->
name
,
".idl"
,
"_p.c"
),
NULL
);
file
=
add_generated_source
(
make
,
replace_extension
(
source
->
name
,
".idl"
,
"_p.c"
),
NULL
);
add_dependency
(
file
->
file
,
"objbase.h"
,
INCL_NORMAL
);
add_dependency
(
file
->
file
,
"objbase.h"
,
INCL_NORMAL
);
add_dependency
(
file
->
file
,
"rpcproxy.h"
,
INCL_NORMAL
);
add_dependency
(
file
->
file
,
"rpcproxy.h"
,
INCL_NORMAL
);
...
...
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