summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2008-03-12 23:30:35 +0000
committerDiego Biurrun <diego@biurrun.de>2008-03-12 23:30:35 +0000
commit315c741d3d215f2861fb356dd0ba8637b6019127 (patch)
tree396278028c8c29f4d6e5d2d76f9da4a4d64540ac /configure
parent8b83d568930506600c65c14aaa76089d1c618d69 (diff)
downloadffmpeg-315c741d3d215f2861fb356dd0ba8637b6019127.tar.gz
Move dependency generation commands into configure.
This will allow specifying gcc-independent commands in the future. Originally committed as revision 12426 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure b/configure
index 32a398008f..afcdca5bb8 100755
--- a/configure
+++ b/configure
@@ -934,6 +934,10 @@ SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
+# gcc stupidly only outputs the basename of targets with -MM
+DEPEND_CMD='$(CC) -MM $(CFLAGS) $(filter-out %.h,$^) | sed "s,[0-9a-z._-]*: \([a-z0-9]*/\).*,\1&,"'
+VHOOKDEPEND_CMD='$(CC) -MM $(VHOOKCFLAGS) $(filter-out %.h,$^) | sed "s,^\([a-z]\),vhook/\1,"'
+
# find source path
source_path="`dirname \"$0\"`"
enable source_path_used
@@ -1991,6 +1995,8 @@ echo "LIBNAME=$LIBNAME" >> config.mak
echo "SLIBPREF=$SLIBPREF" >> config.mak
echo "SLIBSUF=$SLIBSUF" >> config.mak
echo "EXESUF=$EXESUF" >> config.mak
+echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak
+echo "VHOOKDEPEND_CMD=$VHOOKDEPEND_CMD" >> config.mak
if enabled bigendian; then
echo "WORDS_BIGENDIAN=yes" >> config.mak