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
6222e49c
Commit
6222e49c
authored
Oct 23, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: Get rid of the support for updating a makefile in place.
We always regenerate the makefile first nowadays. Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ef557a8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
33 deletions
+16
-33
makedep.c
tools/makedep.c
+16
-33
No files found.
tools/makedep.c
View file @
6222e49c
...
@@ -172,7 +172,6 @@ struct makefile
...
@@ -172,7 +172,6 @@ struct makefile
static
struct
makefile
*
top_makefile
;
static
struct
makefile
*
top_makefile
;
static
const
char
*
makefile_name
=
"Makefile"
;
static
const
char
*
makefile_name
=
"Makefile"
;
static
const
char
*
Separator
=
"### Dependencies"
;
static
const
char
*
input_file_name
;
static
const
char
*
input_file_name
;
static
const
char
*
output_file_name
;
static
const
char
*
output_file_name
;
static
const
char
*
temp_file_name
;
static
const
char
*
temp_file_name
;
...
@@ -185,8 +184,7 @@ static const char Usage[] =
...
@@ -185,8 +184,7 @@ static const char Usage[] =
"Usage: makedep [options] directories
\n
"
"Usage: makedep [options] directories
\n
"
"Options:
\n
"
"Options:
\n
"
" -R from to Compute the relative path between two directories
\n
"
" -R from to Compute the relative path between two directories
\n
"
" -fxxx Store output in file 'xxx' (default: Makefile)
\n
"
" -fxxx Store output in file 'xxx' (default: Makefile)
\n
"
;
" -sxxx Use 'xxx' as separator (default:
\"
### Dependencies
\"
)
\n
"
;
#ifndef __GNUC__
#ifndef __GNUC__
...
@@ -2534,38 +2532,27 @@ static void output_top_variables( struct makefile *make )
...
@@ -2534,38 +2532,27 @@ static void output_top_variables( struct makefile *make )
/*******************************************************************
/*******************************************************************
* output_dependencies
* output_dependencies
*/
*/
static
void
output_dependencies
(
struct
makefile
*
make
,
const
char
*
path
)
static
void
output_dependencies
(
struct
makefile
*
make
)
{
{
struct
strarray
targets
,
testlist_files
=
empty_strarray
,
ignore_files
=
empty_strarray
;
struct
strarray
targets
,
testlist_files
=
empty_strarray
,
ignore_files
=
empty_strarray
;
char
buffer
[
1024
];
FILE
*
src_file
;
FILE
*
src_file
;
if
(
Separator
&&
((
src_file
=
fopen
(
path
,
"r"
))))
output_file_name
=
base_dir_path
(
make
,
makefile_name
);
{
output_file
=
create_temp_file
(
output_file_name
);
char
buffer
[
1024
];
output_top_variables
(
make
);
int
found
=
0
;
output_file
=
create_temp_file
(
path
);
/* copy the contents of the source makefile */
output_top_variables
(
make
);
if
(
!
(
src_file
=
fopen
(
output_file_name
,
"r"
)))
fatal_perror
(
"open"
);
while
(
fgets
(
buffer
,
sizeof
(
buffer
),
src_file
)
&&
!
found
)
while
(
fgets
(
buffer
,
sizeof
(
buffer
),
src_file
))
{
if
(
fwrite
(
buffer
,
1
,
strlen
(
buffer
),
output_file
)
!=
strlen
(
buffer
))
fatal_perror
(
"write"
);
if
(
fwrite
(
buffer
,
1
,
strlen
(
buffer
),
output_file
)
!=
strlen
(
buffer
))
fatal_perror
(
"write"
);
if
(
fclose
(
src_file
))
fatal_perror
(
"close"
);
found
=
!
strncmp
(
buffer
,
Separator
,
strlen
(
Separator
)
);
}
if
(
fclose
(
src_file
))
fatal_perror
(
"close"
);
if
(
!
found
)
output
(
"
\n
%s
\n
"
,
Separator
);
}
else
{
if
(
!
(
output_file
=
fopen
(
path
,
Separator
?
"a"
:
"w"
)))
fatal_perror
(
"%s"
,
path
);
output_top_variables
(
make
);
}
targets
=
output_sources
(
make
,
&
testlist_files
);
targets
=
output_sources
(
make
,
&
testlist_files
);
fclose
(
output_file
);
fclose
(
output_file
);
output_file
=
NULL
;
output_file
=
NULL
;
if
(
temp_file_name
)
rename_temp_file
(
path
);
rename_temp_file
(
output_file_name
);
strarray_add
(
&
ignore_files
,
".gitignore"
);
strarray_add
(
&
ignore_files
,
".gitignore"
);
strarray_add
(
&
ignore_files
,
"Makefile"
);
strarray_add
(
&
ignore_files
,
"Makefile"
);
...
@@ -2576,6 +2563,8 @@ static void output_dependencies( struct makefile *make, const char *path )
...
@@ -2576,6 +2563,8 @@ static void output_dependencies( struct makefile *make, const char *path )
output_testlist
(
base_dir_path
(
make
,
"testlist.c"
),
testlist_files
);
output_testlist
(
base_dir_path
(
make
,
"testlist.c"
),
testlist_files
);
if
(
!
make
->
src_dir
&&
make
->
base_dir
)
if
(
!
make
->
src_dir
&&
make
->
base_dir
)
output_gitignore
(
base_dir_path
(
make
,
".gitignore"
),
ignore_files
);
output_gitignore
(
base_dir_path
(
make
,
".gitignore"
),
ignore_files
);
output_file_name
=
NULL
;
}
}
...
@@ -2606,7 +2595,7 @@ static void update_makefile( const char *path )
...
@@ -2606,7 +2595,7 @@ static void update_makefile( const char *path )
struct
incl_file
*
file
;
struct
incl_file
*
file
;
struct
makefile
*
make
;
struct
makefile
*
make
;
make
=
parse_makefile
(
path
,
Separator
);
make
=
parse_makefile
(
path
,
NULL
);
if
(
root_src_dir
)
if
(
root_src_dir
)
{
{
...
@@ -2671,9 +2660,7 @@ static void update_makefile( const char *path )
...
@@ -2671,9 +2660,7 @@ static void update_makefile( const char *path )
LIST_FOR_EACH_ENTRY
(
file
,
&
make
->
includes
,
struct
incl_file
,
entry
)
parse_file
(
make
,
file
,
0
);
LIST_FOR_EACH_ENTRY
(
file
,
&
make
->
includes
,
struct
incl_file
,
entry
)
parse_file
(
make
,
file
,
0
);
output_file_name
=
base_dir_path
(
make
,
makefile_name
);
output_dependencies
(
make
);
output_dependencies
(
make
,
output_file_name
);
output_file_name
=
NULL
;
}
}
...
@@ -2718,10 +2705,6 @@ static int parse_option( const char *opt )
...
@@ -2718,10 +2705,6 @@ static int parse_option( const char *opt )
case
'R'
:
case
'R'
:
relative_dir_mode
=
1
;
relative_dir_mode
=
1
;
break
;
break
;
case
's'
:
if
(
opt
[
2
])
Separator
=
opt
+
2
;
else
Separator
=
NULL
;
break
;
default:
default:
fprintf
(
stderr
,
"Unknown option '%s'
\n
%s"
,
opt
,
Usage
);
fprintf
(
stderr
,
"Unknown option '%s'
\n
%s"
,
opt
,
Usage
);
exit
(
1
);
exit
(
1
);
...
...
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