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
73b0f651
Commit
73b0f651
authored
Jun 30, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
Jun 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Add support for multiple object file extensions.
parent
d4752791
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
makedep.c
tools/makedep.c
+31
-1
No files found.
tools/makedep.c
View file @
73b0f651
...
...
@@ -53,6 +53,14 @@ typedef struct _INCL_FILE
static
struct
list
sources
=
LIST_INIT
(
sources
);
static
struct
list
includes
=
LIST_INIT
(
includes
);
typedef
struct
_OBJECT_EXTENSION
{
struct
list
entry
;
const
char
*
extension
;
}
OBJECT_EXTENSION
;
static
struct
list
object_extensions
=
LIST_INIT
(
object_extensions
);
typedef
struct
_INCL_PATH
{
struct
list
entry
;
...
...
@@ -218,6 +226,18 @@ static char *get_line( FILE *file )
}
/*******************************************************************
* add_object_extension
*
* Add an extension for object files.
*/
static
void
add_object_extension
(
const
char
*
ext
)
{
OBJECT_EXTENSION
*
object_extension
=
xmalloc
(
sizeof
(
*
object_extension
)
);
list_add_tail
(
&
object_extensions
,
&
object_extension
->
entry
);
object_extension
->
extension
=
ext
;
}
/*******************************************************************
* add_include_path
*
* Add a directory to the include path.
...
...
@@ -857,7 +877,10 @@ static int output_src( FILE *file, INCL_FILE *pFile, int *column )
}
else
{
*
column
+=
fprintf
(
file
,
"%s.o: %s"
,
obj
,
pFile
->
filename
);
OBJECT_EXTENSION
*
ext
;
LIST_FOR_EACH_ENTRY
(
ext
,
&
object_extensions
,
OBJECT_EXTENSION
,
entry
)
*
column
+=
fprintf
(
file
,
"%s.%s "
,
obj
,
ext
->
extension
);
*
column
+=
fprintf
(
file
,
": %s"
,
pFile
->
filename
);
}
}
free
(
obj
);
...
...
@@ -973,6 +996,9 @@ static void parse_option( const char *opt )
if
(
opt
[
2
])
Separator
=
opt
+
2
;
else
Separator
=
NULL
;
break
;
case
'x'
:
if
(
opt
[
2
])
add_object_extension
(
opt
+
2
);
break
;
default:
fprintf
(
stderr
,
"Unknown option '%s'
\n
"
,
opt
);
fprintf
(
stderr
,
Usage
,
ProgramName
);
...
...
@@ -1008,6 +1034,10 @@ int main( int argc, char *argv[] )
if
(
src_dir
&&
!
strcmp
(
src_dir
,
"."
))
src_dir
=
NULL
;
if
(
top_src_dir
&&
top_obj_dir
&&
!
strcmp
(
top_src_dir
,
top_obj_dir
))
top_src_dir
=
NULL
;
/* set the default extension list for object files */
if
(
list_empty
(
&
object_extensions
))
add_object_extension
(
"o"
);
/* get rid of absolute paths that don't point into the source dir */
LIST_FOR_EACH_ENTRY_SAFE
(
path
,
next
,
&
paths
,
INCL_PATH
,
entry
)
{
...
...
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