makedep: Generate rules for .x template files.

This commit is contained in:
Alexandre Julliard 2013-12-11 21:18:53 +01:00
parent 166ad9696c
commit 52e19da50d
3 changed files with 11 additions and 9 deletions

View File

@ -20,7 +20,7 @@ IDL_GEN_C_SRCS = $(IDL_C_SRCS:.idl=_c.c) $(IDL_I_SRCS:.idl=_i.c) \
$(IDL_P_SRCS:.idl=_p.c) $(IDL_S_SRCS:.idl=_s.c) $(IDL_P_SRCS:.idl=_p.c) $(IDL_S_SRCS:.idl=_s.c)
CLEAN_FILES = *.o *.a *.so *.res *.fake *.ok *.tab.[ch] *.yy.c CLEAN_FILES = *.o *.a *.so *.res *.fake *.ok *.tab.[ch] *.yy.c
CLEAN_TARGETS = $(MODULE) $(IMPORTLIB:%=lib%.@IMPLIBEXT@) $(XTEMPLATE_SRCS:.x=.h) \ CLEAN_TARGETS = $(MODULE) $(IMPORTLIB:%=lib%.@IMPLIBEXT@) \
$(TESTMODULE) $(TESTMODULE_STRIPPED) $(CROSSTESTMODULE) $(TESTMODULE) $(TESTMODULE_STRIPPED) $(CROSSTESTMODULE)
OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) $(OBJC_SRCS:.m=.o) \ OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) $(OBJC_SRCS:.m=.o) \
@ -78,7 +78,7 @@ $(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o)
DEPEND_SRCS = $(C_SRCS) $(OBJC_SRCS) $(RC_SRCS) $(MC_SRCS) \ DEPEND_SRCS = $(C_SRCS) $(OBJC_SRCS) $(RC_SRCS) $(MC_SRCS) \
$(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) $(IDL_R_SRCS) $(IDL_TLB_SRCS) \ $(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) $(IDL_R_SRCS) $(IDL_TLB_SRCS) \
$(BISON_SRCS) $(LEX_SRCS) $(EXTRA_OBJS) $(MANPAGES) $(BISON_SRCS) $(LEX_SRCS) $(XTEMPLATE_SRCS) $(EXTRA_OBJS) $(MANPAGES)
depend: dummy depend: dummy
$(MAKEDEP) $(MAKEDEPFLAGS) -C$(srcdir) -S$(top_srcdir) -T$(top_builddir) $(PARENTSRC:%=-P%) $(EXTRAINCL) $(DEPEND_SRCS) $(MAKEDEP) $(MAKEDEPFLAGS) -C$(srcdir) -S$(top_srcdir) -T$(top_builddir) $(PARENTSRC:%=-P%) $(EXTRAINCL) $(DEPEND_SRCS)

View File

@ -642,9 +642,6 @@ OBJDIR_INCLUDES = $(PUBLIC_IDL_H_SRCS:.idl=.h) $(XTEMPLATE_SRCS:.x=.h)
all: $(IDL_H_SRCS:.idl=.h) $(IDL_TLB_SRCS:.idl=.tlb) $(XTEMPLATE_SRCS:.x=.h) all: $(IDL_H_SRCS:.idl=.h) $(IDL_TLB_SRCS:.idl=.tlb) $(XTEMPLATE_SRCS:.x=.h)
rmxftmpl.h: rmxftmpl.x $(MAKEXFTMPL)
$(MAKEXFTMPL) -H -o $@ $(srcdir)/rmxftmpl.x
install install-dev:: $(OBJDIR_INCLUDES) $(INSTALLDIRS) install install-dev:: $(OBJDIR_INCLUDES) $(INSTALLDIRS)
for f in $(SRCDIR_INCLUDES); do case $$f in \ for f in $(SRCDIR_INCLUDES); do case $$f in \
wine/*) $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/`expr $$f : 'wine/\(.*\)'` ;; \ wine/*) $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/`expr $$f : 'wine/\(.*\)'` ;; \

View File

@ -990,8 +990,7 @@ static void parse_file( struct incl_file *source, int src )
FILE *file; FILE *file;
/* don't try to open certain types of files */ /* don't try to open certain types of files */
if (strendswith( source->name, ".tlb" ) || if (strendswith( source->name, ".tlb" ))
strendswith( source->name, ".x" ))
{ {
source->filename = xstrdup( source->name ); source->filename = xstrdup( source->name );
return; return;
@ -1067,8 +1066,7 @@ static struct incl_file *add_src_file( const char *name )
if (strendswith( file->name, ".tlb" ) || if (strendswith( file->name, ".tlb" ) ||
strendswith( file->name, ".res" ) || strendswith( file->name, ".res" ) ||
strendswith( file->name, ".pot" ) || strendswith( file->name, ".pot" ))
strendswith( file->name, ".x" ))
{ {
file->filename = xstrdup( file->name ); file->filename = xstrdup( file->name );
return file; return file;
@ -1207,6 +1205,13 @@ static void output_sources(void)
column += output( "%s.tab.o:", obj ); column += output( "%s.tab.o:", obj );
free( header ); free( header );
} }
else if (!strcmp( ext, "x" )) /* template file */
{
output( "%s.h: $(MAKEXFTMPL) %s\n", obj, source->filename );
output( "\t$(MAKEXFTMPL) -H -o $@ %s\n", source->filename );
strarray_add( &clean_files, strmake( "%s.h", obj ));
continue;
}
else if (!strcmp( ext, "l" )) /* lex file */ else if (!strcmp( ext, "l" )) /* lex file */
{ {
output( "%s.yy.c: %s\n", obj, source->filename ); output( "%s.yy.c: %s\n", obj, source->filename );