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
feb52290
Commit
feb52290
authored
Sep 14, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: Remove .. components from generated paths.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ff34a8ec
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
makedep.c
tools/makedep.c
+26
-2
No files found.
tools/makedep.c
View file @
feb52290
...
...
@@ -711,10 +711,34 @@ static char *get_relative_path( const char *from, const char *dest )
*/
static
char
*
concat_paths
(
const
char
*
base
,
const
char
*
path
)
{
int
i
,
len
;
char
*
ret
;
if
(
!
base
||
!
base
[
0
])
return
xstrdup
(
path
&&
path
[
0
]
?
path
:
"."
);
if
(
!
path
||
!
path
[
0
])
return
xstrdup
(
base
);
if
(
path
[
0
]
==
'/'
)
return
xstrdup
(
path
);
return
strmake
(
"%s/%s"
,
base
,
path
);
len
=
strlen
(
base
);
while
(
len
&&
base
[
len
-
1
]
==
'/'
)
len
--
;
while
(
len
&&
!
strncmp
(
path
,
".."
,
2
)
&&
(
!
path
[
2
]
||
path
[
2
]
==
'/'
))
{
for
(
i
=
len
;
i
>
0
;
i
--
)
if
(
base
[
i
-
1
]
==
'/'
)
break
;
if
(
i
==
len
-
2
&&
!
memcmp
(
base
+
i
,
".."
,
2
))
break
;
/* we can't go up if we already have ".." */
if
(
i
!=
len
-
1
||
base
[
i
]
!=
'.'
)
{
path
+=
2
;
while
(
*
path
==
'/'
)
path
++
;
}
/* else ignore "." element */
while
(
i
>
0
&&
base
[
i
-
1
]
==
'/'
)
i
--
;
len
=
i
;
}
if
(
!
len
&&
base
[
0
]
!=
'/'
)
return
xstrdup
(
path
[
0
]
?
path
:
"."
);
ret
=
xmalloc
(
len
+
strlen
(
path
)
+
2
);
memcpy
(
ret
,
base
,
len
);
ret
[
len
++
]
=
'/'
;
strcpy
(
ret
+
len
,
path
);
return
ret
;
}
...
...
@@ -2775,7 +2799,7 @@ static void output_source_rc( struct makefile *make, struct incl_file *source, c
if
(
source
->
file
->
flags
&
FLAG_GENERATED
)
strarray_add
(
&
make
->
clean_files
,
source
->
name
);
if
(
linguas
.
count
&&
(
source
->
file
->
flags
&
FLAG_RC_PO
))
po_dir
=
top_obj_dir_path
(
make
,
"po"
);
strarray_add
(
&
make
->
res_files
,
strmake
(
"%s.res"
,
obj
));
if
(
source
->
file
->
flags
&
FLAG_RC_PO
&&
!
(
source
->
file
->
flags
&
FLAG_PARENTDIR
)
)
if
(
source
->
file
->
flags
&
FLAG_RC_PO
)
{
strarray_add
(
&
make
->
pot_files
,
strmake
(
"%s.pot"
,
obj
));
output
(
"%s.pot "
,
obj_dir_path
(
make
,
obj
)
);
...
...
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