[MPlayer-cvslog] r26464 - in trunk: . Makefile gui gui/mplayer gui/mplayer/gtk gui/skin gui/win32 gui/wm input libaf libass libmenu mpcommon.mak osdep

diego subversion at mplayerhq.hu
Sat Apr 19 00:49:17 CEST 2008


Author: diego
Date: Sat Apr 19 00:49:17 2008
New Revision: 26464

Log:
per-file dependencies (for the non-recursive parts)


Modified:
   trunk/   (props changed)
   trunk/Makefile
   trunk/gui/   (props changed)
   trunk/gui/mplayer/   (props changed)
   trunk/gui/mplayer/gtk/   (props changed)
   trunk/gui/skin/   (props changed)
   trunk/gui/win32/   (props changed)
   trunk/gui/wm/   (props changed)
   trunk/input/   (props changed)
   trunk/libaf/   (props changed)
   trunk/libass/   (props changed)
   trunk/libmenu/   (props changed)
   trunk/mpcommon.mak
   trunk/osdep/   (props changed)

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	(original)
+++ trunk/Makefile	Sat Apr 19 00:49:17 2008
@@ -234,9 +234,10 @@ DIRS =  gui \
 
 all:	$(ALL_PRG)
 
-.depend: help_mp.h version.h codecs.conf.h
-dep depend:
-	for part in $(PARTS); do $(MAKE) -C $$part depend; done
+DEPS = $(SRCS_COMMON:.c=.d) $(SRCS_MPLAYER:.c=.d) $(SRCS_MENCODER:.c=.d)
+$(DEPS): help_mp.h version.h codecs.conf.h
+dep depend: $(DEPS)
+	for part in $(PARTS); do $(MAKE) -C $$part .depend; done
 
 include mpcommon.mak
 
@@ -395,6 +396,7 @@ distclean:: doxygen_clean
 	for part in $(PARTS); do $(MAKE) -C $$part distclean; done
 	$(MAKE) -C TOOLS distclean
 	-rm -f configure.log config.mak config.h
+	rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.d, $(addsuffix $(suffix),$(dir))))
 
 strip:
 	strip -s $(ALL_PRG)

Modified: trunk/mpcommon.mak
==============================================================================
--- trunk/mpcommon.mak	(original)
+++ trunk/mpcommon.mak	Sat Apr 19 00:49:17 2008
@@ -25,17 +25,24 @@ clean::
 	rm -f *.o *.a *.ho *~
 
 distclean:: clean
-	rm -f .depend test test2
+	rm -f *.d .depend test test2
 
 .depend: $(SRCS_COMMON) $(SRCS_MPLAYER) $(SRCS_MENCODER)
 	$(MPDEPEND_CMD) > $@
 
+%.d: %.c
+	$(MPDEPEND_CMD) > $@
+
 %.ho: %.h
 	$(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
 
 ALLHEADERS = $(wildcard *.h)
 checkheaders: $(ALLHEADERS:.h=.ho)
 
--include .depend
+# Hack to keep .depend from being generated at the top level unnecessarily.
+ifndef DEPS
+DEPS = .depend
+endif
+-include $(DEPS)
 
 .PHONY: libs *clean dep depend



More information about the MPlayer-cvslog mailing list