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
dea28ee4
Commit
dea28ee4
authored
Aug 01, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Don't add dependencies for system headers.
parent
b7ef1b2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
14 deletions
+45
-14
Make.rules.in
Make.rules.in
+1
-1
makedep.c
tools/makedep.c
+44
-13
No files found.
Make.rules.in
View file @
dea28ee4
...
...
@@ -203,7 +203,7 @@ $(SUBDIRS:%=%/__depend__): dummy
cd `dirname $@` && $(MAKE) depend
depend: $(IDL_SRCS:.idl=.h) $(SUBDIRS:%=%/__depend__)
$(MAKEDEP)
$(INCLUDES) -C$(SRCDIR
) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(EXTRA_SRCS)
$(MAKEDEP)
-C$(SRCDIR) -S$(TOPSRCDIR) -T$(TOPOBJDIR) $(INCLUDES
) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(EXTRA_SRCS)
.PHONY: depend $(SUBDIRS:%=%/__depend__)
...
...
tools/makedep.c
View file @
dea28ee4
...
...
@@ -60,7 +60,9 @@ typedef struct _INCL_PATH
static
struct
list
paths
=
LIST_INIT
(
paths
);
static
const
char
*
SrcDir
=
NULL
;
static
const
char
*
src_dir
;
static
const
char
*
top_src_dir
;
static
const
char
*
top_obj_dir
;
static
const
char
*
OutputFileName
=
"Makefile"
;
static
const
char
*
Separator
=
"### Dependencies"
;
static
const
char
*
ProgramName
;
...
...
@@ -71,6 +73,8 @@ static const char Usage[] =
"Options:
\n
"
" -Idir Search for include files in directory 'dir'
\n
"
" -Cdir Search for source files in directory 'dir'
\n
"
" -Sdir Set the top source directory
\n
"
" -Sdir Set the top object directory
\n
"
" -fxxx Store output in file 'xxx' (default: Makefile)
\n
"
" -sxxx Use 'xxx' as separator (default:
\"
### Dependencies
\"
)
\n
"
;
...
...
@@ -299,10 +303,10 @@ static FILE *open_src_file( INCL_FILE *pFile )
return
file
;
}
/* now try in source dir */
if
(
SrcD
ir
)
if
(
src_d
ir
)
{
pFile
->
filename
=
xmalloc
(
strlen
(
SrcD
ir
)
+
strlen
(
pFile
->
name
)
+
2
);
strcpy
(
pFile
->
filename
,
SrcD
ir
);
pFile
->
filename
=
xmalloc
(
strlen
(
src_d
ir
)
+
strlen
(
pFile
->
name
)
+
2
);
strcpy
(
pFile
->
filename
,
src_d
ir
);
strcat
(
pFile
->
filename
,
"/"
);
strcat
(
pFile
->
filename
,
pFile
->
name
);
file
=
fopen
(
pFile
->
filename
,
"r"
);
...
...
@@ -580,8 +584,13 @@ static void parse_option( const char *opt )
if
(
opt
[
2
])
add_include_path
(
opt
+
2
);
break
;
case
'C'
:
if
(
opt
[
2
])
SrcDir
=
opt
+
2
;
else
SrcDir
=
NULL
;
src_dir
=
opt
+
2
;
break
;
case
'S'
:
top_src_dir
=
opt
+
2
;
break
;
case
'T'
:
top_obj_dir
=
opt
+
2
;
break
;
case
'f'
:
if
(
opt
[
2
])
OutputFileName
=
opt
+
2
;
...
...
@@ -604,18 +613,40 @@ static void parse_option( const char *opt )
int
main
(
int
argc
,
char
*
argv
[]
)
{
INCL_FILE
*
pFile
;
INCL_PATH
*
path
,
*
next
;
int
i
,
j
;
ProgramName
=
argv
[
0
];
while
(
argc
>
1
)
i
=
1
;
while
(
i
<
argc
)
{
if
(
*
argv
[
1
]
==
'-'
)
parse_option
(
argv
[
1
]
);
else
if
(
argv
[
i
][
0
]
==
'-'
)
{
parse_option
(
argv
[
i
]
);
for
(
j
=
i
;
j
<
argc
;
j
++
)
argv
[
j
]
=
argv
[
j
+
1
];
argc
--
;
}
else
i
++
;
}
/* get rid of absolute paths that don't point into the source dir */
LIST_FOR_EACH_ENTRY_SAFE
(
path
,
next
,
&
paths
,
INCL_PATH
,
entry
)
{
if
(
path
->
name
[
0
]
!=
'/'
)
continue
;
if
(
top_src_dir
)
{
pFile
=
add_src_file
(
argv
[
1
]
)
;
parse_file
(
pFile
,
1
)
;
if
(
!
strncmp
(
path
->
name
,
top_src_dir
,
strlen
(
top_src_dir
)
))
continue
;
if
(
path
->
name
[
strlen
(
top_src_dir
)]
==
'/'
)
continue
;
}
argc
--
;
argv
++
;
list_remove
(
&
path
->
entry
);
free
(
path
);
}
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
pFile
=
add_src_file
(
argv
[
i
]
);
parse_file
(
pFile
,
1
);
}
LIST_FOR_EACH_ENTRY
(
pFile
,
&
includes
,
INCL_FILE
,
entry
)
parse_file
(
pFile
,
0
);
if
(
!
list_empty
(
&
sources
))
output_dependencies
();
...
...
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