Alexandre Julliard : makedep: Generate rules for .x template files.

Alexandre Julliard julliard at winehq.org
Thu Dec 12 12:48:07 CST 2013


Module: wine
Branch: master
Commit: 52e19da50d6cee6389ecd4ccaa9a1428b0e292af
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=52e19da50d6cee6389ecd4ccaa9a1428b0e292af

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Dec 11 21:18:53 2013 +0100

makedep: Generate rules for .x template files.

---

 Make.rules.in       |    4 ++--
 include/Makefile.in |    3 ---
 tools/makedep.c     |   13 +++++++++----
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/Make.rules.in b/Make.rules.in
index 0617611..dff13b8 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -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)
 
 CLEAN_FILES   = *.o *.a *.so *.res *.fake *.ok *.tab.[ch] *.yy.c
-CLEAN_TARGETS = $(MODULE) $(IMPORTLIB:%=lib%. at IMPLIBEXT@) $(XTEMPLATE_SRCS:.x=.h) \
+CLEAN_TARGETS = $(MODULE) $(IMPORTLIB:%=lib%. at IMPLIBEXT@) \
                 $(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) \
@@ -78,7 +78,7 @@ $(IMPORTLIB:%=lib%.cross.a): $(MAINSPEC) $(IMPLIB_SRCS:.c=.cross.o)
 
 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) \
-              $(BISON_SRCS) $(LEX_SRCS) $(EXTRA_OBJS) $(MANPAGES)
+              $(BISON_SRCS) $(LEX_SRCS) $(XTEMPLATE_SRCS) $(EXTRA_OBJS) $(MANPAGES)
 
 depend: dummy
 	$(MAKEDEP) $(MAKEDEPFLAGS) -C$(srcdir) -S$(top_srcdir) -T$(top_builddir) $(PARENTSRC:%=-P%) $(EXTRAINCL) $(DEPEND_SRCS)
diff --git a/include/Makefile.in b/include/Makefile.in
index e250444..a6d149d 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -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)
 
-rmxftmpl.h: rmxftmpl.x $(MAKEXFTMPL)
-	$(MAKEXFTMPL) -H -o $@ $(srcdir)/rmxftmpl.x
-
 install install-dev:: $(OBJDIR_INCLUDES) $(INSTALLDIRS)
 	for f in $(SRCDIR_INCLUDES); do case $$f in \
 	  wine/*)   $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/`expr $$f : 'wine/\(.*\)'` ;; \
diff --git a/tools/makedep.c b/tools/makedep.c
index 1d99762..f8415c6 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -990,8 +990,7 @@ static void parse_file( struct incl_file *source, int src )
     FILE *file;
 
     /* don't try to open certain types of files */
-    if (strendswith( source->name, ".tlb" ) ||
-        strendswith( source->name, ".x" ))
+    if (strendswith( source->name, ".tlb" ))
     {
         source->filename = xstrdup( source->name );
         return;
@@ -1067,8 +1066,7 @@ static struct incl_file *add_src_file( const char *name )
 
     if (strendswith( file->name, ".tlb" ) ||
         strendswith( file->name, ".res" ) ||
-        strendswith( file->name, ".pot" ) ||
-        strendswith( file->name, ".x" ))
+        strendswith( file->name, ".pot" ))
     {
         file->filename = xstrdup( file->name );
         return file;
@@ -1207,6 +1205,13 @@ static void output_sources(void)
             column += output( "%s.tab.o:", obj );
             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 */
         {
             output( "%s.yy.c: %s\n", obj, source->filename );




More information about the wine-cvs mailing list