Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
25b08106
Commit
25b08106
authored
11 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
makefiles: Generate explicit build rules for resource files from makedep.
parent
da4c49c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Make.rules.in
+2
-13
2 additions, 13 deletions
Make.rules.in
programs/winetest/Makefile.in
+2
-1
2 additions, 1 deletion
programs/winetest/Makefile.in
tools/makedep.c
+49
-3
49 additions, 3 deletions
tools/makedep.c
with
53 additions
and
17 deletions
Make.rules.in
+
2
−
13
View file @
25b08106
...
...
@@ -36,7 +36,7 @@ CROSSOBJS = $(OBJS:.o=.cross.o)
# Implicit rules
.SUFFIXES:
.rc .res
.idl .tlb .h .ok .man.in .man _c.c _i.c _p.c _s.c _r.res _t.res .cross.o .po .mo @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp
.SUFFIXES: .idl .tlb .h .ok .man.in .man _c.c _i.c _p.c _s.c _r.res _t.res .cross.o .po .mo @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp
.c.o:
$(CC) -c $(ALLCFLAGS) -o $@ $<
...
...
@@ -47,9 +47,6 @@ CROSSOBJS = $(OBJS:.o=.cross.o)
.c.cross.o:
$(CROSSCC) -c $(INCLUDES) $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS) -o $@ $<
.rc.res:
$(WRC) $(RCFLAGS) -o $@ $<
.idl.h:
$(WIDL) $(IDLFLAGS) -h -o $@ $<
...
...
@@ -131,7 +128,7 @@ $(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o)
# Rules for dependencies
DEPEND_SRCS = $(C_SRCS) $(OBJC_SRCS) $(RC_SRCS) $(MC_SRCS) \
DEPEND_SRCS = $(C_SRCS) $(OBJC_SRCS) $(RC_SRCS) $(MC_SRCS)
$(PO_SRCS:.rc=.pot)
\
$(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) \
$(IDL_GEN_C_SRCS) $(IDL_R_SRCS:.idl=_r.res) $(IDL_TLB_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) \
$(BISON_SRCS) $(LEX_SRCS) $(EXTRA_OBJS)
...
...
@@ -210,14 +207,6 @@ install install-lib install-dev uninstall::
.PHONY: install install-lib install-dev uninstall
# Rules for resources
rsrc.pot: $(WRC)
$(WRC) $(RCFLAGS) -O pot -o $@ $(PO_SRCS)
$(RC_SRCS:.rc=.res): $(WRC)
$(PO_SRCS:.rc=.res): $(ALL_MO_FILES)
# Misc. rules
$(IDL_GEN_HEADERS) $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) $(IDL_TLB_RES) $(IDL_R_SRCS:.idl=_r.res): $(WIDL)
...
...
This diff is collapsed.
Click to expand it.
programs/winetest/Makefile.in
+
2
−
1
View file @
25b08106
...
...
@@ -25,6 +25,7 @@ build.rc: dummy
build.nfo
:
-$(
CC
)
-v
2>
$@
build.res
:
build.nfo
build.res
:
build.rc build.nfo
$(
WRC
)
$(
RCFLAGS
)
-o
$@
build.rc
@MAKE_PROG_RULES@
This diff is collapsed.
Click to expand it.
tools/makedep.c
+
49
−
3
View file @
25b08106
...
...
@@ -96,6 +96,7 @@ static const char Usage[] =
static
void
fatal_error
(
const
char
*
msg
,
...
)
__attribute__
((
__format__
(
__printf__
,
1
,
2
)));
static
void
fatal_perror
(
const
char
*
msg
,
...
)
__attribute__
((
__format__
(
__printf__
,
1
,
2
)));
static
int
output
(
const
char
*
format
,
...
)
__attribute__
((
__format__
(
__printf__
,
1
,
2
)));
static
char
*
strmake
(
const
char
*
fmt
,
...
)
__attribute__
((
__format__
(
__printf__
,
1
,
2
)));
/*******************************************************************
* fatal_error
...
...
@@ -340,6 +341,24 @@ static struct incl_file *find_include_file( const char *name )
return
NULL
;
}
/*******************************************************************
* find_target_src_file
*
* Check if we have a source file as a target for the specified source with a different extension.
*/
static
struct
incl_file
*
find_target_src_file
(
const
char
*
name
,
const
char
*
ext
)
{
struct
incl_file
*
ret
;
char
*
p
,
*
match
=
xmalloc
(
strlen
(
name
)
+
strlen
(
ext
)
+
1
);
strcpy
(
match
,
name
);
if
((
p
=
get_extension
(
match
)))
strcpy
(
p
,
ext
);
else
strcat
(
match
,
ext
);
ret
=
find_src_file
(
match
);
free
(
match
);
return
ret
;
}
/*******************************************************************
* add_include
*
...
...
@@ -858,6 +877,7 @@ static void parse_file( struct incl_file *source, int src )
/* don't try to open certain types of files */
if
(
strendswith
(
source
->
name
,
".tlb"
)
||
strendswith
(
source
->
name
,
".res"
)
||
strendswith
(
source
->
name
,
".pot"
)
||
strendswith
(
source
->
name
,
".x"
))
{
source
->
filename
=
xstrdup
(
source
->
name
);
...
...
@@ -926,7 +946,7 @@ static void output_include( struct incl_file *pFile, struct incl_file *owner, in
static
void
output_sources
(
void
)
{
struct
incl_file
*
source
;
int
i
,
column
,
mc_srcs
=
0
;
int
i
,
column
,
po_srcs
=
0
,
mc_srcs
=
0
;
LIST_FOR_EACH_ENTRY
(
source
,
&
sources
,
struct
incl_file
,
entry
)
{
...
...
@@ -962,7 +982,19 @@ static void output_sources(void)
}
else
if
(
!
strcmp
(
ext
,
"rc"
))
/* resource file */
{
column
+=
output
(
"rsrc.pot %s.res: %s"
,
obj
,
source
->
filename
);
if
(
find_target_src_file
(
source
->
name
,
".pot"
))
{
output
(
"%s.res: $(WRC) $(ALL_MO_FILES) %s
\n
"
,
obj
,
source
->
filename
);
output
(
"
\t
$(WRC) $(RCFLAGS) -o $@ %s
\n
"
,
source
->
filename
);
column
+=
output
(
"%s.res rsrc.pot:"
,
obj
);
po_srcs
++
;
}
else
{
output
(
"%s.res: $(WRC) %s
\n
"
,
obj
,
source
->
filename
);
output
(
"
\t
$(WRC) $(RCFLAGS) -o $@ %s
\n
"
,
source
->
filename
);
column
+=
output
(
"%s.res:"
,
obj
);
}
}
else
if
(
!
strcmp
(
ext
,
"mc"
))
/* message file */
{
...
...
@@ -1004,7 +1036,7 @@ static void output_sources(void)
column
+=
output
(
": %s"
,
source
->
filename
);
}
else
if
(
!
strcmp
(
ext
,
"tlb"
)
||
!
strcmp
(
ext
,
"res"
))
else
if
(
!
strcmp
(
ext
,
"tlb"
)
||
!
strcmp
(
ext
,
"res"
)
||
!
strcmp
(
ext
,
"pot"
))
{
continue
;
/* nothing to do for typelib files */
}
...
...
@@ -1024,6 +1056,20 @@ static void output_sources(void)
/* rules for files that depend on multiple sources */
if
(
po_srcs
)
{
column
=
output
(
"rsrc.pot: $(WRC)"
);
LIST_FOR_EACH_ENTRY
(
source
,
&
sources
,
struct
incl_file
,
entry
)
if
(
strendswith
(
source
->
name
,
".rc"
)
&&
find_target_src_file
(
source
->
name
,
".pot"
))
output_filename
(
source
->
filename
,
&
column
);
output
(
"
\n
"
);
column
=
output
(
"
\t
$(WRC) $(RCFLAGS) -O pot -o $@"
);
LIST_FOR_EACH_ENTRY
(
source
,
&
sources
,
struct
incl_file
,
entry
)
if
(
strendswith
(
source
->
name
,
".rc"
)
&&
find_target_src_file
(
source
->
name
,
".pot"
))
output_filename
(
source
->
filename
,
&
column
);
output
(
"
\n
"
);
}
if
(
mc_srcs
)
{
column
=
output
(
"msg.pot: $(WMC)"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment