Alexandre Julliard : makefiles: Always create dependencies from the top-level directory.

Alexandre Julliard julliard at winehq.org
Tue Jan 7 13:21:17 CST 2014


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jan  7 11:36:12 2014 +0100

makefiles: Always create dependencies from the top-level directory.

---

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

diff --git a/Make.rules.in b/Make.rules.in
index 7e6a09d..947419e 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -20,13 +20,6 @@ OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(OBJC_SRCS:
 
 ALLCROSSCFLAGS = $(CPPFLAGS) $(CFLAGS)
 
-# Rules for dependencies
-
-depend: dummy
-	$(MAKEDEP) -M .
-
-.PHONY: depend
-
 # Rules for cleaning
 
 clean::
diff --git a/tools/makedep.c b/tools/makedep.c
index 7f8e518..20b1064 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -1944,6 +1944,7 @@ static struct strarray output_sources(void)
         output( "\t$(RM)" );
         output_filenames( clean_files );
         output( "\n" );
+        strarray_add( &phony_targets, "clean" );
     }
 
     if (subdirs.count)
@@ -1953,6 +1954,13 @@ static struct strarray output_sources(void)
         output( "\t$(MKDIR_P) -m 755 $@\n" );
     }
 
+    if (top_obj_dir)
+    {
+        output( "depend:\n" );
+        output( "\t at cd %s && $(MAKE) %s/depend\n", top_obj_dir, base_dir );
+        strarray_add( &phony_targets, "depend" );
+    }
+
     if (phony_targets.count)
     {
         output( ".PHONY:" );




More information about the wine-cvs mailing list