[FFmpeg-cvslog] build: fix make checkheaders in out-of-tree builds

Andreas Cadhalpun git at videolan.org
Sat Jan 23 21:50:10 CET 2016


ffmpeg | branch: master | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Sat Jan 23 11:55:54 2016 +0100| [f503022ce56a27b217437af6635b191e09ab1ec5] | committer: Andreas Cadhalpun

build: fix make checkheaders in out-of-tree builds

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f503022ce56a27b217437af6635b191e09ab1ec5
---

 common.mak |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common.mak b/common.mak
index bad2627..5645e2d 100644
--- a/common.mak
+++ b/common.mak
@@ -47,7 +47,8 @@ LDFLAGS    := $(ALLFFLIBS:%=$(LD_PATH)$(DST_PATH)/lib%) $(LDFLAGS)
 
 define COMPILE
        $(call $(1)DEP,$(1))
-       $(Q)cd $(SRC_PATH); $(subst @,,$($(1))) $($(1)FLAGS) $($(1)_DEPFLAGS:$(@:.o=.d)=$(DST_PATH)/$(@:.o=.d)) $($(1)_C) $($(1)_O:$@=$(DST_PATH)/$@) $(subst $(SRC_PATH)/,,$<)
+       $(Q)cd $(SRC_PATH); if [ -n "$(findstring $(SRC_PATH),$<)" ]; then dest=$(subst $(SRC_PATH)/,,$<); else dest=$(DST_PATH)/$<; fi; \
+       $(subst @,,$($(1))) $($(1)FLAGS) $($(1)_DEPFLAGS:$(@:.o=.d)=$(DST_PATH)/$(@:.o=.d)) $($(1)_C) $($(1)_O:$@=$(DST_PATH)/$@) $$dest
 endef
 
 COMPILE_C = $(call COMPILE,CC)



More information about the ffmpeg-cvslog mailing list