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
798a91a3
Commit
798a91a3
authored
Nov 23, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Nov 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemaker: Also detect static libraries when scanning directories.
parent
376ffdf3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
4 deletions
+26
-4
winemaker
tools/winemaker
+26
-4
No files found.
tools/winemaker
View file @
798a91a3
...
@@ -20,7 +20,7 @@ use strict;
...
@@ -20,7 +20,7 @@ use strict;
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
#
my
$version
=
"0.8.
0
"
;
my
$version
=
"0.8.
1
"
;
use
Cwd
;
use
Cwd
;
use
File::
Basename
;
use
File::
Basename
;
...
@@ -1288,8 +1288,16 @@ sub source_scan_directory($$$$)
...
@@ -1288,8 +1288,16 @@ sub source_scan_directory($$$$)
if
(
$dentry
=~
/^(Release|Debug)/i
)
{
if
(
$dentry
=~
/^(Release|Debug)/i
)
{
# These directories are often used to store the object files and the
# These directories are often used to store the object files and the
# resulting executable/library. They should not contain anything else.
# resulting executable/library. They should not contain anything else.
my
@candidates
=
grep
/\.(exe|dll)$/i
,
@
{
get_directory_contents
(
"$fullentry"
)};
my
@candidates
=
grep
/\.(exe|dll|lib)$/i
,
@
{
get_directory_contents
(
"$fullentry"
)};
foreach
my
$candidate
(
@candidates
)
{
foreach
my
$candidate
(
sort
@candidates
)
{
my
$dlldup
=
$candidate
;
$dlldup
=~
s/\.lib$/.dll/
;
if
(
$candidate
=~
/\.lib$/
and
$targets
{
$dlldup
})
{
# Often lib files are created together with dll files, even if the dll file is the
# real target.
next
;
}
$targets
{
$candidate
}
=
1
;
$targets
{
$candidate
}
=
1
;
}
}
}
elsif
(
$dentry
=~
/^include/i
)
{
}
elsif
(
$dentry
=~
/^include/i
)
{
...
@@ -1303,7 +1311,7 @@ sub source_scan_directory($$$$)
...
@@ -1303,7 +1311,7 @@ sub source_scan_directory($$$$)
source_scan_directory
(
$project
,
"$fullentry/"
,
"$dentry/"
,
$no_target
);
source_scan_directory
(
$project
,
"$fullentry/"
,
"$dentry/"
,
$no_target
);
}
}
}
elsif
(
-
f
"$fullentry"
)
{
}
elsif
(
-
f
"$fullentry"
)
{
if
(
$dentry
=~
/\.(exe|dll)$/i
)
{
if
(
$dentry
=~
/\.(exe|dll
|lib
)$/i
)
{
$targets
{
$dentry
}
=
1
;
$targets
{
$dentry
}
=
1
;
}
elsif
(
$dentry
=~
/\.c$/i
and
$dentry
!~
/\.(dbg|spec)\.c$/
)
{
}
elsif
(
$dentry
=~
/\.c$/i
and
$dentry
!~
/\.(dbg|spec)\.c$/
)
{
push
@sources_c
,
"$dentry"
;
push
@sources_c
,
"$dentry"
;
...
@@ -1517,6 +1525,7 @@ sub source_scan_directory($$$$)
...
@@ -1517,6 +1525,7 @@ sub source_scan_directory($$$$)
# - Match each target with source files (sort in reverse
# - Match each target with source files (sort in reverse
# alphabetical order to get the longest matches first)
# alphabetical order to get the longest matches first)
my
@local_dlls
=
();
my
@local_dlls
=
();
my
@local_libs
=
();
my
@local_depends
=
();
my
@local_depends
=
();
my
@exe_list
=
();
my
@exe_list
=
();
foreach
my
$target_name
(
map
(
lc
,
(
sort
{
$b
cmp
$a
}
keys
%
targets
)))
{
foreach
my
$target_name
(
map
(
lc
,
(
sort
{
$b
cmp
$a
}
keys
%
targets
)))
{
...
@@ -1535,6 +1544,13 @@ sub source_scan_directory($$$$)
...
@@ -1535,6 +1544,13 @@ sub source_scan_directory($$$$)
}
else
{
}
else
{
push
@
{
@$target
[
$T_LDFLAGS
]},(
"-shared"
,
"\$(${canon}_MODULE:.dll=.spec)"
);
push
@
{
@$target
[
$T_LDFLAGS
]},(
"-shared"
,
"\$(${canon}_MODULE:.dll=.spec)"
);
}
}
}
elsif
(
$target_name
=~
/\.lib$/
)
{
$target_name
=~
s/(.*)\.lib/lib$1.a/
;
@$target
[
$T_NAME
]
=
$target_name
;
@$target
[
$T_TYPE
]
=
$TT_LIB
;
push
@local_depends
,
"$target_name"
;
push
@local_libs
,
$target_name
;
push
@
{
@$target
[
$T_ARFLAGS
]},(
"rc"
);
}
else
{
}
else
{
@$target
[
$T_TYPE
]
=
$opt_target_type
;
@$target
[
$T_TYPE
]
=
$opt_target_type
;
push
@exe_list
,
$target
;
push
@exe_list
,
$target
;
...
@@ -1694,6 +1710,12 @@ sub source_scan_directory($$$$)
...
@@ -1694,6 +1710,12 @@ sub source_scan_directory($$$$)
push
@
{
@$target
[
$T_DLLS
]},
@local_dlls
;
push
@
{
@$target
[
$T_DLLS
]},
@local_dlls
;
}
}
}
}
if
(
@local_libs
>
0
and
@exe_list
>
0
)
{
foreach
my
$target
(
@exe_list
)
{
push
@
{
@$target
[
$T_LIBRARY_PATH
]},
"-L."
;
push
@
{
@$target
[
$T_LIBRARIES
]},
@local_libs
;
}
}
}
}
##
##
...
...
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