Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
8f31f92a
Commit
8f31f92a
authored
18 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
makedep: Added support for generating dependencies of IDL client/proxy/server/iid files.
parent
1e9accce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/makedep.c
+80
-4
80 additions, 4 deletions
tools/makedep.c
with
80 additions
and
4 deletions
tools/makedep.c
+
80
−
4
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
);
...
...
@@ -614,6 +628,42 @@ 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
*/
...
...
@@ -621,6 +671,16 @@ 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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment