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
8f31f92a
Commit
8f31f92a
authored
Oct 16, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Added support for generating dependencies of IDL client/proxy/server/iid files.
parent
1e9accce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
4 deletions
+80
-4
makedep.c
tools/makedep.c
+80
-4
No files found.
tools/makedep.c
View file @
8f31f92a
...
...
@@ -229,6 +229,17 @@ static void add_include_path( const char *name )
path
->
name
=
name
;
}
/*******************************************************************
* find_src_file
*/
static
INCL_FILE
*
find_src_file
(
const
char
*
name
)
{
INCL_FILE
*
file
;
LIST_FOR_EACH_ENTRY
(
file
,
&
sources
,
INCL_FILE
,
entry
)
if
(
!
strcmp
(
name
,
file
->
name
))
return
file
;
return
NULL
;
}
/*******************************************************************
* add_src_file
...
...
@@ -237,7 +248,10 @@ static void add_include_path( const char *name )
*/
static
INCL_FILE
*
add_src_file
(
const
char
*
name
)
{
INCL_FILE
*
file
=
xmalloc
(
sizeof
(
*
file
)
);
INCL_FILE
*
file
;
if
(
find_src_file
(
name
))
return
NULL
;
/* we already have it */
file
=
xmalloc
(
sizeof
(
*
file
)
);
memset
(
file
,
0
,
sizeof
(
*
file
)
);
file
->
name
=
xstrdup
(
name
);
list_add_tail
(
&
sources
,
&
file
->
entry
);
...
...
@@ -615,12 +629,58 @@ static void parse_c_file( INCL_FILE *pFile, FILE *file )
/*******************************************************************
* parse_generated_idl
*/
static
void
parse_generated_idl
(
INCL_FILE
*
source
)
{
char
*
header
,
*
basename
;
basename
=
xstrdup
(
source
->
name
);
basename
[
strlen
(
basename
)
-
4
]
=
0
;
header
=
strmake
(
"%s.h"
,
basename
);
source
->
filename
=
xstrdup
(
source
->
name
);
if
(
strendswith
(
source
->
name
,
"_c.c"
))
{
add_include
(
source
,
header
,
0
,
0
);
}
else
if
(
strendswith
(
source
->
name
,
"_i.c"
))
{
add_include
(
source
,
"rpc.h"
,
0
,
1
);
add_include
(
source
,
"rpcndr.h"
,
0
,
1
);
add_include
(
source
,
"guiddef.h"
,
0
,
1
);
}
else
if
(
strendswith
(
source
->
name
,
"_p.c"
))
{
add_include
(
source
,
"rpcproxy.h"
,
0
,
1
);
add_include
(
source
,
header
,
0
,
0
);
}
else
if
(
strendswith
(
source
->
name
,
"_s.c"
))
{
add_include
(
source
,
header
,
0
,
0
);
}
free
(
header
);
free
(
basename
);
}
/*******************************************************************
* parse_file
*/
static
void
parse_file
(
INCL_FILE
*
pFile
,
int
src
)
{
FILE
*
file
;
/* special case for source files generated from idl */
if
(
strendswith
(
pFile
->
name
,
"_c.c"
)
||
strendswith
(
pFile
->
name
,
"_i.c"
)
||
strendswith
(
pFile
->
name
,
"_p.c"
)
||
strendswith
(
pFile
->
name
,
"_s.c"
))
{
parse_generated_idl
(
pFile
);
return
;
}
file
=
src
?
open_src_file
(
pFile
)
:
open_include_file
(
pFile
);
if
(
!
file
)
return
;
...
...
@@ -686,7 +746,24 @@ static void output_src( FILE *file, INCL_FILE *pFile, int *column )
}
else
if
(
!
strcmp
(
ext
,
"idl"
))
/* IDL file */
{
*
column
+=
fprintf
(
file
,
"%s.h: %s"
,
obj
,
pFile
->
filename
);
char
*
name
;
*
column
+=
fprintf
(
file
,
"%s.h"
,
obj
);
name
=
strmake
(
"%s_c.c"
,
obj
);
if
(
find_src_file
(
name
))
*
column
+=
fprintf
(
file
,
" %s"
,
name
);
free
(
name
);
name
=
strmake
(
"%s_i.c"
,
obj
);
if
(
find_src_file
(
name
))
*
column
+=
fprintf
(
file
,
" %s"
,
name
);
free
(
name
);
name
=
strmake
(
"%s_p.c"
,
obj
);
if
(
find_src_file
(
name
))
*
column
+=
fprintf
(
file
,
" %s"
,
name
);
free
(
name
);
name
=
strmake
(
"%s_s.c"
,
obj
);
if
(
find_src_file
(
name
))
*
column
+=
fprintf
(
file
,
" %s"
,
name
);
free
(
name
);
*
column
+=
fprintf
(
file
,
": %s"
,
pFile
->
filename
);
}
else
{
...
...
@@ -814,8 +891,7 @@ int main( int argc, char *argv[] )
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
pFile
=
add_src_file
(
argv
[
i
]
);
parse_file
(
pFile
,
1
);
if
((
pFile
=
add_src_file
(
argv
[
i
]
)))
parse_file
(
pFile
,
1
);
}
LIST_FOR_EACH_ENTRY
(
pFile
,
&
includes
,
INCL_FILE
,
entry
)
parse_file
(
pFile
,
0
);
output_dependencies
();
...
...
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