mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-04 20:07:49 +00:00
makefiles: Add support for generating correct dependencies for tlb files.
This commit is contained in:
parent
e1a0715b4a
commit
da19122f14
|
@ -207,10 +207,6 @@ filter: dummy
|
||||||
dlldata.c: $(WIDL) Makefile.in
|
dlldata.c: $(WIDL) Makefile.in
|
||||||
$(WIDL) $(IDLFLAGS) --dlldata-only --dlldata=$@ $(IDL_P_SRCS)
|
$(WIDL) $(IDLFLAGS) --dlldata-only --dlldata=$@ $(IDL_P_SRCS)
|
||||||
|
|
||||||
# Rules for resources
|
|
||||||
|
|
||||||
$(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC) $(IDL_TLB_SRCS:.idl=.tlb)
|
|
||||||
|
|
||||||
# Rule for linting
|
# Rule for linting
|
||||||
|
|
||||||
$(MODULE).ln : $(LINTS)
|
$(MODULE).ln : $(LINTS)
|
||||||
|
@ -233,7 +229,10 @@ winapi_check:: dummy
|
||||||
|
|
||||||
# Rules for dependencies
|
# Rules for dependencies
|
||||||
|
|
||||||
DEPEND_SRCS = $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) $(IDL_GEN_C_SRCS) $(BISON_SRCS) $(LEX_SRCS) $(EXTRA_SRCS)
|
DEPEND_SRCS = $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) \
|
||||||
|
$(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) \
|
||||||
|
$(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) \
|
||||||
|
$(BISON_SRCS) $(LEX_SRCS) $(EXTRA_SRCS)
|
||||||
|
|
||||||
$(SUBDIRS:%=%/__depend__): dummy
|
$(SUBDIRS:%=%/__depend__): dummy
|
||||||
@cd `dirname $@` && $(MAKE) depend
|
@cd `dirname $@` && $(MAKE) depend
|
||||||
|
@ -323,6 +322,8 @@ $(MC_SRCS:.mc=.mc.rc): $(WMC)
|
||||||
|
|
||||||
$(IDL_GEN_HEADERS) $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS:.idl=.tlb): $(WIDL)
|
$(IDL_GEN_HEADERS) $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS:.idl=.tlb): $(WIDL)
|
||||||
|
|
||||||
|
$(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC)
|
||||||
|
|
||||||
$(SUBDIRS): dummy
|
$(SUBDIRS): dummy
|
||||||
@cd $@ && $(MAKE)
|
@cd $@ && $(MAKE)
|
||||||
|
|
||||||
|
|
1
configure
vendored
1
configure
vendored
|
@ -21436,6 +21436,7 @@ Makefile: dummy
|
||||||
|
|
||||||
\$(OBJS): \$(IDL_GEN_HEADERS)
|
\$(OBJS): \$(IDL_GEN_HEADERS)
|
||||||
\$(IDL_GEN_C_SRCS:.c=.o): \$(IDL_GEN_C_SRCS)
|
\$(IDL_GEN_C_SRCS:.c=.o): \$(IDL_GEN_C_SRCS)
|
||||||
|
\$(RC_SRCS:.rc=.res): \$(IDL_TLB_SRCS:.idl=.tlb)
|
||||||
\$(LEX_SRCS:.l=.yy.o): \$(LEX_SRCS:.l=.yy.c)
|
\$(LEX_SRCS:.l=.yy.o): \$(LEX_SRCS:.l=.yy.c)
|
||||||
\$(BISON_SRCS:.y=.tab.o): \$(BISON_SRCS:.y=.tab.c)"
|
\$(BISON_SRCS:.y=.tab.o): \$(BISON_SRCS:.y=.tab.c)"
|
||||||
|
|
||||||
|
|
|
@ -1634,6 +1634,7 @@ Makefile: dummy\\
|
||||||
\\
|
\\
|
||||||
\$(OBJS): \$(IDL_GEN_HEADERS)\\
|
\$(OBJS): \$(IDL_GEN_HEADERS)\\
|
||||||
\$(IDL_GEN_C_SRCS:.c=.o): \$(IDL_GEN_C_SRCS)\\
|
\$(IDL_GEN_C_SRCS:.c=.o): \$(IDL_GEN_C_SRCS)\\
|
||||||
|
\$(RC_SRCS:.rc=.res): \$(IDL_TLB_SRCS:.idl=.tlb)\\
|
||||||
\$(LEX_SRCS:.l=.yy.o): \$(LEX_SRCS:.l=.yy.c)\\
|
\$(LEX_SRCS:.l=.yy.o): \$(LEX_SRCS:.l=.yy.c)\\
|
||||||
\$(BISON_SRCS:.y=.tab.o): \$(BISON_SRCS:.y=.tab.c)"],
|
\$(BISON_SRCS:.y=.tab.o): \$(BISON_SRCS:.y=.tab.c)"],
|
||||||
["### Dependencies:
|
["### Dependencies:
|
||||||
|
@ -1645,6 +1646,7 @@ Makefile: dummy
|
||||||
|
|
||||||
\$(OBJS): \$(IDL_GEN_HEADERS)
|
\$(OBJS): \$(IDL_GEN_HEADERS)
|
||||||
\$(IDL_GEN_C_SRCS:.c=.o): \$(IDL_GEN_C_SRCS)
|
\$(IDL_GEN_C_SRCS:.c=.o): \$(IDL_GEN_C_SRCS)
|
||||||
|
\$(RC_SRCS:.rc=.res): \$(IDL_TLB_SRCS:.idl=.tlb)
|
||||||
\$(LEX_SRCS:.l=.yy.o): \$(LEX_SRCS:.l=.yy.c)
|
\$(LEX_SRCS:.l=.yy.o): \$(LEX_SRCS:.l=.yy.c)
|
||||||
\$(BISON_SRCS:.y=.tab.o): \$(BISON_SRCS:.y=.tab.c)"]))
|
\$(BISON_SRCS:.y=.tab.o): \$(BISON_SRCS:.y=.tab.c)"]))
|
||||||
|
|
||||||
|
|
|
@ -791,7 +791,7 @@ static void output_include( FILE *file, INCL_FILE *pFile,
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
* output_src
|
* output_src
|
||||||
*/
|
*/
|
||||||
static void output_src( FILE *file, INCL_FILE *pFile, int *column )
|
static int output_src( FILE *file, INCL_FILE *pFile, int *column )
|
||||||
{
|
{
|
||||||
char *obj = xstrdup( pFile->name );
|
char *obj = xstrdup( pFile->name );
|
||||||
char *ext = get_extension( obj );
|
char *ext = get_extension( obj );
|
||||||
|
@ -817,30 +817,42 @@ static void output_src( FILE *file, INCL_FILE *pFile, int *column )
|
||||||
else if (!strcmp( ext, "idl" )) /* IDL file */
|
else if (!strcmp( ext, "idl" )) /* IDL file */
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
int got_header = 0;
|
||||||
|
const char *suffix = "cips";
|
||||||
|
|
||||||
*column += fprintf( file, "%s.h", obj );
|
name = strmake( "%s.tlb", obj );
|
||||||
|
if (find_src_file( name )) *column += fprintf( file, "%s", name );
|
||||||
name = strmake( "%s_c.c", obj );
|
else
|
||||||
if (find_src_file( name )) *column += fprintf( file, " %s", name );
|
{
|
||||||
free( name );
|
got_header = 1;
|
||||||
name = strmake( "%s_i.c", obj );
|
*column += fprintf( file, "%s.h", obj );
|
||||||
if (find_src_file( name )) *column += fprintf( file, " %s", name );
|
}
|
||||||
free( name );
|
|
||||||
name = strmake( "%s_p.c", obj );
|
|
||||||
if (find_src_file( name )) *column += fprintf( file, " %s", name );
|
|
||||||
free( name );
|
|
||||||
name = strmake( "%s_s.c", obj );
|
|
||||||
if (find_src_file( name )) *column += fprintf( file, " %s", name );
|
|
||||||
free( name );
|
free( name );
|
||||||
|
|
||||||
|
while (*suffix)
|
||||||
|
{
|
||||||
|
name = strmake( "%s_%c.c", obj, *suffix );
|
||||||
|
if (find_src_file( name ))
|
||||||
|
{
|
||||||
|
if (!got_header++) *column += fprintf( file, " %s.h", obj );
|
||||||
|
*column += fprintf( file, " %s", name );
|
||||||
|
}
|
||||||
|
free( name );
|
||||||
|
suffix++;
|
||||||
|
}
|
||||||
*column += fprintf( file, ": %s", pFile->filename );
|
*column += fprintf( file, ": %s", pFile->filename );
|
||||||
}
|
}
|
||||||
|
else if (!strcmp( ext, "tlb" ))
|
||||||
|
{
|
||||||
|
return 0; /* nothing to do for typelib files */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*column += fprintf( file, "%s.o: %s", obj, pFile->filename );
|
*column += fprintf( file, "%s.o: %s", obj, pFile->filename );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free( obj );
|
free( obj );
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -875,7 +887,7 @@ static void output_dependencies(void)
|
||||||
LIST_FOR_EACH_ENTRY( pFile, &sources, INCL_FILE, entry )
|
LIST_FOR_EACH_ENTRY( pFile, &sources, INCL_FILE, entry )
|
||||||
{
|
{
|
||||||
column = 0;
|
column = 0;
|
||||||
output_src( file, pFile, &column );
|
if (!output_src( file, pFile, &column )) continue;
|
||||||
for (i = 0; i < MAX_INCLUDES; i++)
|
for (i = 0; i < MAX_INCLUDES; i++)
|
||||||
if (pFile->files[i]) output_include( file, pFile->files[i],
|
if (pFile->files[i]) output_include( file, pFile->files[i],
|
||||||
pFile, &column );
|
pFile, &column );
|
||||||
|
|
Loading…
Reference in a new issue