OSDN Git Service

Use $^ without header files instead of $(SRCS) to reference the dependencies
authorDiego Biurrun <diego@biurrun.de>
Wed, 12 Mar 2008 09:40:36 +0000 (09:40 +0000)
committerDiego Biurrun <diego@biurrun.de>
Wed, 12 Mar 2008 09:40:36 +0000 (09:40 +0000)
of the .depend target. $^ apparently includes the full path to files found
in a vpath directory, $(SRCS) does not. This makes out of tree builds fail.

Originally committed as revision 12421 to svn://svn.ffmpeg.org/ffmpeg/trunk

Makefile

index 5b5decf..686b6b0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -223,7 +223,7 @@ depend dep: .depend .vhookdep
        $(MAKE-$(CONFIG_AVFILTER)) -C libavfilter depend
 
 .depend: $(SRCS) version.h
-       $(CC) -MM $(CFLAGS) $(SRCS) > $@
+       $(CC) -MM $(CFLAGS) $(filter-out %.h,$^) > $@
 
 # gcc stupidly only outputs the basename of targets with -MM
 .vhookdep: $(ALLHOOKS_SRCS) version.h