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
c6008a06
Commit
c6008a06
authored
Mar 10, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Mar 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemaker: Fix conversion of C++ filenames into object names.
parent
02b37007
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
8 deletions
+28
-8
winemaker
tools/winemaker
+28
-8
No files found.
tools/winemaker
View file @
c6008a06
...
...
@@ -20,7 +20,7 @@ use strict;
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
my
$version
=
"0.8.
1
"
;
my
$version
=
"0.8.
2
"
;
use
Cwd
;
use
File::
Basename
;
...
...
@@ -278,6 +278,10 @@ my $TF_NOMSVCRT=32;
my
$TF_HASDEF
=
64
;
##
# This target has C++ files named *.cxx (instead of *.cpp)
my
$TF_HASCXX
=
128
;
##
# Initialize a target:
# - set the target type to TT_SETTINGS, i.e. no real target will
# be generated.
...
...
@@ -805,13 +809,16 @@ sub source_scan_project_file($$$)
if
(
!
defined
$sfilet
)
{
next
;
}
if
(
$sfilet
=~
/\.c$/i
and
$sfilet
!~
/\.(dbg|spec)\.c$/
)
{
push
@sources_c
,
$sfilet
;
}
elsif
(
$sfilet
=~
/\.
(cpp|cxx)
$/i
)
{
}
elsif
(
$sfilet
=~
/\.
cpp
$/i
)
{
if
(
$sfilet
=~
/^stdafx.cpp$/i
&&
!
(
@$project_settings
[
$T_FLAGS
]
&
$TF_NOMFC
))
{
push
@sources_misc
,
$sfilet
;
@$project_settings
[
$T_FLAGS
]
|=
$TF_MFC
;
}
else
{
push
@sources_cxx
,
$sfilet
;
}
}
elsif
(
$sfilet
=~
/\.cxx$/i
)
{
@$project_settings
[
$T_FLAGS
]
|=
$TF_HASCXX
;
push
@sources_cxx
,
$sfilet
;
}
elsif
(
$sfilet
=~
/\.rc$/i
)
{
push
@sources_rc
,
$sfilet
;
}
elsif
(
$sfilet
=~
/\.def$/i
)
{
...
...
@@ -896,13 +903,16 @@ sub source_scan_project_file($$$)
$sfilet
=~
s/\\/\//g
;
#make slashes out of backslashes
if
(
$sfilet
=~
/\.c$/i
and
$sfilet
!~
/\.(dbg|spec)\.c$/
)
{
push
@sources_c
,
$sfilet
;
}
elsif
(
$sfilet
=~
/\.
(cpp|cxx)
$/i
)
{
}
elsif
(
$sfilet
=~
/\.
cpp
$/i
)
{
if
(
$sfilet
=~
/^stdafx.cpp$/i
&&
!
(
@$project_settings
[
$T_FLAGS
]
&
$TF_NOMFC
))
{
push
@sources_misc
,
$sfilet
;
@$project_settings
[
$T_FLAGS
]
|=
$TF_MFC
;
}
else
{
push
@sources_cxx
,
$sfilet
;
}
}
elsif
(
$sfilet
=~
/\.cxx$/i
)
{
@$project_settings
[
$T_FLAGS
]
|=
$TF_HASCXX
;
push
@sources_cxx
,
$sfilet
;
}
elsif
(
$sfilet
=~
/\.rc$/i
)
{
push
@sources_rc
,
$sfilet
;
}
elsif
(
$sfilet
=~
/\.def$/i
)
{
...
...
@@ -1318,13 +1328,16 @@ sub source_scan_directory($$$$)
$targets
{
$dentry
}
=
1
;
}
elsif
(
$dentry
=~
/\.c$/i
and
$dentry
!~
/\.(dbg|spec)\.c$/
)
{
push
@sources_c
,
"$dentry"
;
}
elsif
(
$dentry
=~
/\.
(cpp|cxx)
$/i
)
{
}
elsif
(
$dentry
=~
/\.
cpp
$/i
)
{
if
(
$dentry
=~
/^stdafx.cpp$/i
&&
!
(
@$project_settings
[
$T_FLAGS
]
&
$TF_NOMFC
))
{
push
@sources_misc
,
"$dentry"
;
@$project_settings
[
$T_FLAGS
]
|=
$TF_MFC
;
}
else
{
push
@sources_cxx
,
"$dentry"
;
}
}
elsif
(
$dentry
=~
/\.cxx$/i
)
{
@$project_settings
[
$T_FLAGS
]
|=
$TF_HASCXX
;
push
@sources_cxx
,
"$dentry"
;
}
elsif
(
$dentry
=~
/\.rc$/i
)
{
push
@sources_rc
,
"$dentry"
;
}
elsif
(
$dentry
=~
/\.def$/i
)
{
...
...
@@ -2378,6 +2391,13 @@ sub generate_project_files($)
return
;
}
my
$cpp_to_object
;
if
(
@$project_settings
[
$T_FLAGS
]
&
$TF_HASCXX
)
{
$cpp_to_object
=
".cxx=.o"
;
}
else
{
$cpp_to_object
=
".cpp=.o"
;
}
print
FILEO
"### Generated by Winemaker $version\n"
;
print
FILEO
"###\n"
;
print
FILEO
"### Invocation command line was\n"
;
...
...
@@ -2439,7 +2459,7 @@ sub generate_project_files($)
generate_list
(
"EXTRA_CXX_SRCS"
,
1
,
@$project_settings
[
$T_SOURCES_CXX
]);
generate_list
(
"EXTRA_RC_SRCS"
,
1
,
@$project_settings
[
$T_SOURCES_RC
]);
print
FILEO
"\n"
;
generate_list
(
"EXTRA_OBJS"
,
1
,[
"\$(EXTRA_C_SRCS:.c=.o)"
,
"\$(EXTRA_CXX_SRCS:
.cpp=.o
)"
]);
generate_list
(
"EXTRA_OBJS"
,
1
,[
"\$(EXTRA_C_SRCS:.c=.o)"
,
"\$(EXTRA_CXX_SRCS:
$cpp_to_object
)"
]);
print
FILEO
"\n\n\n"
;
}
...
...
@@ -2460,7 +2480,7 @@ sub generate_project_files($)
generate_list
(
"${canon}_LIBRARY_PATH"
,
1
,
@$target
[
$T_LIBRARY_PATH
]);
generate_list
(
"${canon}_LIBRARIES"
,
1
,
@$target
[
$T_LIBRARIES
]);
print
FILEO
"\n"
;
generate_list
(
"${canon}_OBJS"
,
1
,[
"\$(${canon}_C_SRCS:.c=.o)"
,
"\$(${canon}_CXX_SRCS:
.cpp=.o
)"
,
"\$(${canon}_RC_SRCS:.rc=.res)"
]);
generate_list
(
"${canon}_OBJS"
,
1
,[
"\$(${canon}_C_SRCS:.c=.o)"
,
"\$(${canon}_CXX_SRCS:
$cpp_to_object
)"
,
"\$(${canon}_RC_SRCS:.rc=.res)"
]);
print
FILEO
"\n\n\n"
;
}
print
FILEO
"### Global source lists\n\n"
;
...
...
@@ -2518,7 +2538,7 @@ sub generate_project_files($)
print
FILEO
"\n"
;
print
FILEO
"# Implicit rules\n"
;
print
FILEO
"\n"
;
print
FILEO
".SUFFIXES: .cpp .rc .res\n"
;
print
FILEO
".SUFFIXES: .cpp .
cxx .
rc .res\n"
;
print
FILEO
"DEFINCL = \$(INCLUDE_PATH) \$(DEFINES) \$(OPTIONS)\n"
;
print
FILEO
"\n"
;
print
FILEO
".c.o:\n"
;
...
...
@@ -2539,7 +2559,7 @@ sub generate_project_files($)
print
FILEO
" \\\\\\#*\\\\\\# *~ *% .\\\\\\#*\n"
;
print
FILEO
"\n"
;
print
FILEO
"clean:: \$(SUBDIRS:%=%/__clean__) \$(EXTRASUBDIRS:%=%/__clean__)\n"
;
print
FILEO
"\t\$(RM) \$(CLEAN_FILES) \$(RC_SRCS:.rc=.res) \$(C_SRCS:.c=.o) \$(CXX_SRCS:
.cpp=.o
)\n"
;
print
FILEO
"\t\$(RM) \$(CLEAN_FILES) \$(RC_SRCS:.rc=.res) \$(C_SRCS:.c=.o) \$(CXX_SRCS:
$cpp_to_object
)\n"
;
print
FILEO
"\t\$(RM) \$(DLLS:%=%.so) \$(LIBS) \$(EXES) \$(EXES:%=%.so)\n"
;
print
FILEO
"\n"
;
print
FILEO
"\$(SUBDIRS:%=%/__clean__): dummy\n"
;
...
...
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