Alexandre Julliard : makefiles: Generate explicit build rules for testlist. c from makedep.

Alexandre Julliard julliard at winehq.org
Tue Oct 15 13:27:10 CDT 2013


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct 15 12:39:42 2013 +0200

makefiles: Generate explicit build rules for testlist.c from makedep.

---

 Make.rules.in   |    3 ---
 tools/makedep.c |   26 ++++++++++++++++++++++----
 2 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/Make.rules.in b/Make.rules.in
index 116dffd..cc04821 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -123,9 +123,6 @@ $(CROSSTESTMODULE): $(CROSSOBJS) Makefile.in
 $(WINETEST_RES): $(TESTMODULE_STRIPPED)
 	echo "$(TESTMODULE) TESTRES \"$(TESTMODULE_STRIPPED)\"" | $(WRC) $(RCFLAGS) -o $@
 
-testlist.c: Makefile.in $(MAKECTESTS)
-	$(MAKECTESTS) -o $@ $(C_SRCS)
-
 testclean::
 	$(RM) *.ok
 
diff --git a/tools/makedep.c b/tools/makedep.c
index 6141d4b..e41fa77 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -835,6 +835,17 @@ static void parse_generated_idl( struct incl_file *source )
 }
 
 /*******************************************************************
+ *         is_generated_idl
+ */
+static int is_generated_idl( struct incl_file *source )
+{
+    return (strendswith( source->name, "_c.c" ) ||
+            strendswith( source->name, "_i.c" ) ||
+            strendswith( source->name, "_p.c" ) ||
+            strendswith( source->name, "_s.c" ));
+}
+
+/*******************************************************************
  *         parse_file
  */
 static void parse_file( struct incl_file *source, int src )
@@ -842,10 +853,7 @@ static void parse_file( struct incl_file *source, int src )
     FILE *file;
 
     /* special case for source files generated from idl */
-    if (strendswith( source->name, "_c.c" ) ||
-        strendswith( source->name, "_i.c" ) ||
-        strendswith( source->name, "_p.c" ) ||
-        strendswith( source->name, "_s.c" ))
+    if (is_generated_idl( source ))
     {
         parse_generated_idl( source );
         return;
@@ -1106,6 +1114,16 @@ static void output_sources(void)
                 output_filename( source->filename, &column );
         output( "\n" );
     }
+
+    if (find_src_file( "testlist.o" ))
+    {
+        output( "testlist.c: $(MAKECTESTS) Makefile.in\n" );
+        column = output( "\t$(MAKECTESTS) -o $@" );
+        LIST_FOR_EACH_ENTRY( source, &sources, struct incl_file, entry )
+            if (strendswith( source->name, ".c" ) && !is_generated_idl( source ))
+                output_filename( source->filename, &column );
+        output( "\n" );
+    }
 }
 
 




More information about the wine-cvs mailing list