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
54a123f4
Commit
54a123f4
authored
Feb 17, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: Add support for a generic SOURCES variable.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4eb9ad98
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
Makefile.in
include/Makefile.in
+0
-0
make_makefiles
tools/make_makefiles
+18
-11
makedep.c
tools/makedep.c
+1
-0
No files found.
include/Makefile.in
View file @
54a123f4
This diff is collapsed.
Click to expand it.
tools/make_makefiles
View file @
54a123f4
...
...
@@ -69,6 +69,7 @@ my @source_vars = (
"OBJC_SRCS"
,
"PO_SRCS"
,
"RC_SRCS"
,
"SOURCES"
,
"SVG_SRCS"
,
"XTEMPLATE_SRCS"
);
...
...
@@ -191,13 +192,18 @@ sub replace_makefile_variables($)
}
$new
.=
$_
;
}
foreach
my
$var
(
@source_vars
)
# if we are using SOURCES, ignore the other variables
unless
(
$replaced
{
"SOURCES"
})
{
next
if
defined
$replaced
{
$var
};
next
unless
defined
$
{
$make
}{
"=$var"
};
my
@values
=
@
{
$
{
$make
}{
"=$var"
}};
next
unless
@values
;
$new
.=
"\n$var = \\\n\t"
.
join
(
" \\\n\t"
,
sort
@values
)
.
"\n"
;
foreach
my
$var
(
@source_vars
)
{
next
if
defined
$replaced
{
$var
};
next
if
$var
eq
"SOURCES"
;
next
unless
defined
$
{
$make
}{
"=$var"
};
my
@values
=
@
{
$
{
$make
}{
"=$var"
}};
next
unless
@values
;
$new
.=
"\n$var = \\\n\t"
.
join
(
" \\\n\t"
,
sort
@values
)
.
"\n"
;
}
}
close
OLD_FILE
;
update_file
(
"$file.in"
,
$new
)
if
$old
ne
$new
;
...
...
@@ -378,9 +384,6 @@ sub assign_sources_to_makefiles(@)
if
(
$name
=~
/\.m$/
)
{
push
@
{
$
{
$make
}{
"=OBJC_SRCS"
}},
$name
;
}
elsif
(
$name
=~
/\.l$/
)
{
push
@
{
$
{
$make
}{
"=LEX_SRCS"
}},
$name
;
}
elsif
(
$name
=~
/\.y$/
)
{
push
@
{
$
{
$make
}{
"=BISON_SRCS"
}},
$name
;
}
elsif
(
$name
=~
/\.x$/
)
{
push
@
{
$
{
$make
}{
"=XTEMPLATE_SRCS"
}},
$name
;
}
elsif
(
$name
=~
/\.rh$/
)
{
push
@
{
$
{
$make
}{
"=HEADER_SRCS"
}},
$name
;
}
elsif
(
$name
=~
/\.inl$/
)
{
push
@
{
$
{
$make
}{
"=HEADER_SRCS"
}},
$name
;
}
elsif
(
$name
=~
/\.svg$/
)
{
push
@
{
$
{
$make
}{
"=SVG_SRCS"
}},
$name
;
}
elsif
(
$name
=~
/\.sfd$/
)
{
...
...
@@ -393,10 +396,9 @@ sub assign_sources_to_makefiles(@)
$
{
$
{
$make
}{
"=flags"
}}{
"staticimplib"
}
=
1
if
defined
$flags
{
"implib"
};
push
@
{
$
{
$make
}{
"=C_SRCS"
}},
$name
;
}
elsif
(
$name
=~
/\.h$/
)
elsif
(
$name
=~
/\.h$/
||
$name
=~
/\.rh$/
||
$name
=~
/\.inl$/
||
$name
=~
/\.x$/
)
{
next
if
$dir
ne
"include"
;
push
@
{
$
{
$make
}{
"=HEADER_SRCS"
}},
$name
;
$
{
$
{
$make
}{
"=flags"
}}{
"install-dev"
}
=
1
;
}
elsif
(
$name
=~
/\.rc$/
)
...
...
@@ -429,6 +431,11 @@ sub assign_sources_to_makefiles(@)
{
push
@
{
$
{
$make
}{
"=IN_SRCS"
}},
$name
;
}
else
{
next
;
}
push
@
{
$
{
$make
}{
"=SOURCES"
}},
$name
;
}
# preserve shared source files from the parent makefile
...
...
tools/makedep.c
View file @
54a123f4
...
...
@@ -3589,6 +3589,7 @@ static void load_sources( struct makefile *make )
{
static
const
char
*
source_vars
[]
=
{
"SOURCES"
,
"C_SRCS"
,
"OBJC_SRCS"
,
"RC_SRCS"
,
...
...
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