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
c3c35dcf
Commit
c3c35dcf
authored
Mar 10, 2014
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Add a helper function for concatenating paths.
parent
b2a8a089
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
makedep.c
tools/makedep.c
+16
-7
No files found.
tools/makedep.c
View file @
c3c35dcf
...
...
@@ -454,12 +454,23 @@ static char *get_relative_path( const char *from, const char *dest )
/*******************************************************************
* concat_paths
*/
static
char
*
concat_paths
(
const
char
*
base
,
const
char
*
path
)
{
if
(
!
base
)
return
xstrdup
(
path
[
0
]
?
path
:
"."
);
if
(
path
[
0
]
==
'/'
)
return
xstrdup
(
path
);
if
(
!
path
[
0
])
return
xstrdup
(
base
);
return
strmake
(
"%s/%s"
,
base
,
path
);
}
/*******************************************************************
* base_dir_path
*/
static
char
*
base_dir_path
(
const
char
*
path
)
{
if
(
base_dir
&&
path
[
0
]
!=
'/'
)
return
strmake
(
"%s/%s"
,
base_dir
,
path
);
return
xstrdup
(
path
);
return
concat_paths
(
base_dir
,
path
);
}
...
...
@@ -468,8 +479,7 @@ static char *base_dir_path( const char *path )
*/
static
char
*
src_dir_path
(
const
char
*
path
)
{
if
(
src_dir
)
return
strmake
(
"%s/%s"
,
src_dir
,
path
);
return
xstrdup
(
path
);
return
concat_paths
(
src_dir
,
path
);
}
...
...
@@ -478,8 +488,7 @@ static char *src_dir_path( const char *path )
*/
static
char
*
top_obj_dir_path
(
const
char
*
path
)
{
if
(
top_obj_dir
)
return
strmake
(
"%s/%s"
,
top_obj_dir
,
path
);
return
xstrdup
(
path
);
return
concat_paths
(
top_obj_dir
,
path
);
}
...
...
@@ -488,7 +497,7 @@ static char *top_obj_dir_path( const char *path )
*/
static
char
*
top_dir_path
(
const
char
*
path
)
{
if
(
top_src_dir
)
return
strmake
(
"%s/%s"
,
top_src_dir
,
path
);
if
(
top_src_dir
)
return
concat_paths
(
top_src_dir
,
path
);
return
top_obj_dir_path
(
path
);
}
...
...
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