Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9240ffbb
Commit
9240ffbb
authored
Nov 02, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Add --sysroot option.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f282b498
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
Makefile.in
tools/wrc/Makefile.in
+1
-1
wrc.c
tools/wrc/wrc.c
+15
-2
wrc.man.in
tools/wrc/wrc.man.in
+3
-0
No files found.
tools/wrc/Makefile.in
View file @
9240ffbb
...
...
@@ -15,7 +15,7 @@ C_SRCS = \
LEX_SRCS
=
parser.l
BISON_SRCS
=
parser.y
wrc_EXTRADEFS
=
-DINCLUDEDIR
=
"
\"
${
includedir
}
/wine
\"
"
wrc_EXTRADEFS
=
-DINCLUDEDIR
=
"
\"
${
includedir
}
\"
"
EXTRALIBS
=
$(GETTEXTPO_LIBS)
-lwpp
...
...
tools/wrc/wrc.c
View file @
9240ffbb
...
...
@@ -74,6 +74,7 @@ static const char usage[] =
" --po-dir=DIR Directory containing po files for translations
\n
"
" --preprocessor Specifies the preprocessor to use, including arguments
\n
"
" -r Ignored for compatibility with rc
\n
"
" --sysroot=DIR Prefix include paths with DIR
\n
"
" -U, --undefine id Undefine preprocessor identifier id
\n
"
" --use-temp-file Ignored for compatibility with windres
\n
"
" -v, --verbose Enable verbose mode
\n
"
...
...
@@ -172,6 +173,7 @@ enum long_options_values
LONG_OPT_NOTMPFILE
,
LONG_OPT_PO_DIR
,
LONG_OPT_PREPROCESSOR
,
LONG_OPT_SYSROOT
,
LONG_OPT_VERSION
,
LONG_OPT_DEBUG
,
LONG_OPT_ENDIANNESS
,
...
...
@@ -197,6 +199,7 @@ static const struct option long_options[] = {
{
"pedantic"
,
0
,
NULL
,
LONG_OPT_PEDANTIC
},
{
"po-dir"
,
1
,
NULL
,
LONG_OPT_PO_DIR
},
{
"preprocessor"
,
1
,
NULL
,
LONG_OPT_PREPROCESSOR
},
{
"sysroot"
,
1
,
NULL
,
LONG_OPT_SYSROOT
},
{
"target"
,
1
,
NULL
,
'F'
},
{
"undefine"
,
1
,
NULL
,
'U'
},
{
"use-temp-file"
,
0
,
NULL
,
LONG_OPT_TMPFILE
},
...
...
@@ -335,6 +338,7 @@ int main(int argc,char *argv[])
int
cmdlen
;
int
po_mode
=
0
;
char
*
po_dir
=
NULL
;
const
char
*
sysroot
=
""
;
char
**
files
=
xmalloc
(
argc
*
sizeof
(
*
files
)
);
signal
(
SIGSEGV
,
segvhandler
);
...
...
@@ -384,6 +388,9 @@ int main(int argc,char *argv[])
if
(
strcmp
(
optarg
,
"cat"
)
==
0
)
no_preprocess
=
1
;
else
fprintf
(
stderr
,
"-P option not yet supported, ignored.
\n
"
);
break
;
case
LONG_OPT_SYSROOT
:
sysroot
=
xstrdup
(
optarg
);
break
;
case
LONG_OPT_VERSION
:
printf
(
version_string
);
exit
(
0
);
...
...
@@ -499,8 +506,14 @@ int main(int argc,char *argv[])
/* If we do need to search standard includes, add them to the path */
if
(
stdinc
)
{
wpp_add_include_path
(
INCLUDEDIR
"/msvcrt"
);
wpp_add_include_path
(
INCLUDEDIR
"/windows"
);
static
const
char
*
incl_dirs
[]
=
{
INCLUDEDIR
,
"/usr/include"
,
"/usr/local/include"
};
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
incl_dirs
);
i
++
)
{
if
(
i
&&
!
strcmp
(
incl_dirs
[
i
],
incl_dirs
[
0
]
))
continue
;
wpp_add_include_path
(
strmake
(
"%s%s/wine/msvcrt"
,
sysroot
,
incl_dirs
[
i
]
));
wpp_add_include_path
(
strmake
(
"%s%s/wine/windows"
,
sysroot
,
incl_dirs
[
i
]
));
}
}
/* Kill io buffering when some kind of debuglevel is enabled */
...
...
tools/wrc/wrc.man.in
View file @
9240ffbb
...
...
@@ -121,6 +121,9 @@ This option may be used to specify the preprocessor to use, including any
leading arguments. If not specified, \fBwrc\fR uses its builtin processor.
To disable preprocessing, use \fB--preprocessor=cat\fR.
.TP
.I \fB\-\-sysroot=\fIdir\fR
Prefix the standard include paths with \fIdir\fR.
.TP
.I \fB\-U\fR, \fB\-\-undefine\fR=\fIid\fR
Undefine preprocessor identifier \fIid\fR. Please note that only macros
defined up to this point are undefined by this command. However, these
...
...
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