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
aa89eccc
Commit
aa89eccc
authored
Apr 11, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for generating dependencies for idl files.
parent
a7ac73d6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
14 deletions
+73
-14
Make.rules.in
Make.rules.in
+3
-1
Makefile.in
include/Makefile.in
+1
-2
makedep.c
tools/makedep.c
+69
-11
No files found.
Make.rules.in
View file @
aa89eccc
...
...
@@ -188,7 +188,7 @@ $(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy
cd `dirname $@` && $(MAKE) depend
depend: $(MAKEDEP) $(SUBDIRS:%=%/__depend__)
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(EXTRA_SRCS)
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(
IDL_SRCS) $(
EXTRA_SRCS)
.PHONY: depend $(SUBDIRS:%=%/__depend__)
...
...
@@ -257,6 +257,8 @@ $(RC_SRCS16:.rc=.res): $(WRC)
$(MC_SRCS:.mc=.mc.rc): $(WMC)
$(IDL_SRCS:.idl=.h): $(WIDL)
$(SUBDIRS): dummy
@cd $@ && $(MAKE)
...
...
include/Makefile.in
View file @
aa89eccc
...
...
@@ -175,6 +175,7 @@ WINDOWS_INCLUDES = \
wshisotp.h
\
wsipx.h
\
zmouse.h
\
$(IDL_SRCS)
\
$
(
IDL_SRCS:.idl
=
.h
)
MSVCRT_INCLUDES
=
\
...
...
@@ -252,8 +253,6 @@ EXTRASUBDIRS = bitmaps msvcrt msvcrt/sys wine
.idl.h
:
$(LDPATH)
$(WIDL)
$(DEFS)
-b
-h
-H
$@
$<
$(IDL_SRCS
:
.idl=.h): $(WIDL)
.PHONY
:
idl
idl
:
$(IDL_SRCS:.idl=.h)
...
...
tools/makedep.c
View file @
aa89eccc
...
...
@@ -101,6 +101,17 @@ static char *xstrdup( const char *str )
/*******************************************************************
* get_extension
*/
static
char
*
get_extension
(
char
*
filename
)
{
char
*
ext
=
strrchr
(
filename
,
'.'
);
if
(
ext
&&
strchr
(
ext
,
'/'
))
ext
=
NULL
;
return
ext
;
}
/*******************************************************************
* is_generated
*
* Test if a given file type is generated during the make process
...
...
@@ -271,24 +282,45 @@ static FILE *open_include_file( INCL_FILE *pFile )
/*******************************************************************
* parse_file
* parse_
idl_
file
*/
static
void
parse_
file
(
INCL_FILE
*
pFile
,
int
src
)
static
void
parse_
idl_file
(
INCL_FILE
*
pFile
,
FILE
*
file
)
{
char
buffer
[
1024
];
char
*
include
;
int
line
=
0
;
FILE
*
file
;
if
(
is_generated
(
pFile
->
nam
e
))
while
(
fgets
(
buffer
,
sizeof
(
buffer
)
-
1
,
fil
e
))
{
/* file is generated during make, don't try to open it */
pFile
->
filename
=
xstrdup
(
pFile
->
name
);
return
;
char
*
p
=
buffer
;
line
++
;
while
(
*
p
&&
isspace
(
*
p
))
p
++
;
if
(
strncmp
(
p
,
"import"
,
6
))
continue
;
p
+=
6
;
while
(
*
p
&&
isspace
(
*
p
))
p
++
;
if
(
*
p
!=
'\"'
)
continue
;
p
++
;
include
=
p
;
while
(
*
p
&&
(
*
p
!=
'\"'
))
p
++
;
if
(
!*
p
)
{
fprintf
(
stderr
,
"%s:%d: Malformed import directive
\n
"
,
pFile
->
filename
,
line
);
exit
(
1
);
}
*
p
=
0
;
add_include
(
pFile
,
include
,
line
,
0
);
}
}
file
=
src
?
open_src_file
(
pFile
)
:
open_include_file
(
pFile
);
if
(
!
file
)
return
;
/*******************************************************************
* parse_c_file
*/
static
void
parse_c_file
(
INCL_FILE
*
pFile
,
FILE
*
file
)
{
char
buffer
[
1024
];
char
*
include
;
int
line
=
0
;
while
(
fgets
(
buffer
,
sizeof
(
buffer
)
-
1
,
file
))
{
...
...
@@ -315,6 +347,29 @@ static void parse_file( INCL_FILE *pFile, int src )
*
p
=
0
;
add_include
(
pFile
,
include
,
line
,
(
quote
==
'>'
)
);
}
}
/*******************************************************************
* parse_file
*/
static
void
parse_file
(
INCL_FILE
*
pFile
,
int
src
)
{
char
*
ext
;
FILE
*
file
;
if
(
is_generated
(
pFile
->
name
))
{
/* file is generated during make, don't try to open it */
pFile
->
filename
=
xstrdup
(
pFile
->
name
);
return
;
}
file
=
src
?
open_src_file
(
pFile
)
:
open_include_file
(
pFile
);
if
(
!
file
)
return
;
ext
=
get_extension
(
pFile
->
name
);
if
(
ext
&&
!
strcmp
(
ext
,
".idl"
))
parse_idl_file
(
pFile
,
file
);
else
parse_c_file
(
pFile
,
file
);
fclose
(
file
);
}
...
...
@@ -349,8 +404,7 @@ static void output_include( FILE *file, INCL_FILE *pFile,
static
void
output_src
(
FILE
*
file
,
INCL_FILE
*
pFile
,
int
*
column
)
{
char
*
obj
=
xstrdup
(
pFile
->
name
);
char
*
ext
=
strrchr
(
obj
,
'.'
);
if
(
ext
&&
strchr
(
ext
,
'/'
))
ext
=
NULL
;
char
*
ext
=
get_extension
(
obj
);
if
(
ext
)
{
*
ext
++
=
0
;
...
...
@@ -370,6 +424,10 @@ static void output_src( FILE *file, INCL_FILE *pFile, int *column )
{
*
column
+=
fprintf
(
file
,
"%s.mc.rc: %s"
,
obj
,
pFile
->
filename
);
}
else
if
(
!
strcmp
(
ext
,
"idl"
))
/* IDL file */
{
*
column
+=
fprintf
(
file
,
"%s.h: %s"
,
obj
,
pFile
->
filename
);
}
else
{
*
column
+=
fprintf
(
file
,
"%s.o: %s"
,
obj
,
pFile
->
filename
);
...
...
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