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
ab8d61d2
Commit
ab8d61d2
authored
Dec 26, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Allow overriding makefile variables through the command line.
parent
c29ea610
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
makedep.c
tools/makedep.c
+13
-3
No files found.
tools/makedep.c
View file @
ab8d61d2
...
...
@@ -93,6 +93,7 @@ static const struct strarray empty_strarray;
static
struct
strarray
include_args
;
static
struct
strarray
object_extensions
;
static
struct
strarray
make_vars
;
static
struct
strarray
cmdline_vars
;
static
const
char
*
base_dir
=
"."
;
static
const
char
*
src_dir
;
...
...
@@ -1204,6 +1205,10 @@ static char *get_make_variable( const char *name )
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
cmdline_vars
.
count
;
i
+=
2
)
if
(
!
strcmp
(
cmdline_vars
.
str
[
i
],
name
))
return
xstrdup
(
cmdline_vars
.
str
[
i
+
1
]
);
for
(
i
=
0
;
i
<
make_vars
.
count
;
i
+=
2
)
if
(
!
strcmp
(
make_vars
.
str
[
i
],
name
))
return
xstrdup
(
make_vars
.
str
[
i
+
1
]
);
...
...
@@ -1835,8 +1840,13 @@ static void update_makefile( const char *path )
/*******************************************************************
* parse_option
*/
static
void
parse_option
(
const
char
*
opt
)
static
int
parse_option
(
const
char
*
opt
)
{
if
(
opt
[
0
]
!=
'-'
)
{
if
(
strchr
(
opt
,
'='
))
return
set_make_variable
(
&
cmdline_vars
,
opt
);
return
0
;
}
switch
(
opt
[
1
])
{
case
'I'
:
...
...
@@ -1874,6 +1884,7 @@ static void parse_option( const char *opt )
fprintf
(
stderr
,
"Unknown option '%s'
\n
%s"
,
opt
,
Usage
);
exit
(
1
);
}
return
1
;
}
...
...
@@ -1888,9 +1899,8 @@ int main( int argc, char *argv[] )
i
=
1
;
while
(
i
<
argc
)
{
if
(
argv
[
i
][
0
]
==
'-'
)
if
(
parse_option
(
argv
[
i
]
)
)
{
parse_option
(
argv
[
i
]
);
for
(
j
=
i
;
j
<
argc
;
j
++
)
argv
[
j
]
=
argv
[
j
+
1
];
argc
--
;
}
...
...
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