[Ffmpeg-devel] Makefile consolidation

Måns Rullgård mru
Mon Feb 13 00:09:38 CET 2006


Diego Biurrun <diego at biurrun.de> writes:

> On Sun, Feb 12, 2006 at 03:45:19PM +0000, M?ns Rullg?rd wrote:
>> M?ns Rullg?rd <mru at inprovide.com> writes:
>> 
>> > Inspired by Diego's makefile cleanup today, I took it one step
>> > further, and moved lots of common bits into a single file.
>> >
>> > I haven't committed it in case anyone should have objections.  The
>> > diffstat is rather convincing though:
>> >
>> >  Makefile                        |   18 +-----
>> >  common.mak                      |   98 +++++++++++++++++++++++++++++++++++
>> >  configure                       |    2 
>> >  libavcodec/Makefile             |   84 +++---------------------------
>> >  libavcodec/libpostproc/Makefile |   67 ++---------------------
>> >  libavformat/Makefile            |   80 ++--------------------------
>> >  libavutil/Makefile              |   63 +---------------------
>> >  7 files changed, 133 insertions(+), 279 deletions(-)
>> >
>> > Patch attached.  Comments welcome.
>> 
>> Anyone tested this?  Diego?
>
> Do you build out-of-tree?

Yes, almost always.

> cerebus:~/src/ffmpeg$ make distclean
> make -C libavutil clean
> make[1]: Entering directory `/home/diego/src/ffmpeg/libavutil'
> Makefile:33: '/home/diego/src/ffmpeg'/common.mak: No such file or
> directory
> make[1]: *** No rule to make target
> `'/home/diego/src/ffmpeg'/common.mak'.  Stop.
> make[1]: Leaving directory `/home/diego/src/ffmpeg/libavutil'
> make: *** [clean] Error 2
>
> It seems to dislike the quotes...  I'll remove them from configure.

Something like this should do it:

--- configure   11 Feb 2006 20:37:12 -0000      1.248
+++ configure   12 Feb 2006 23:08:08 -0000
@@ -1889,10 +1889,9 @@
     for f in $FILES ; do
         ln -sf "$source_path/$f" $f
     done
-    echo "SRC_PATH=$source_path" >> config.mak
-else
-    echo "SRC_PATH='$source_path'" >> config.mak
 fi
+echo "SRC_PATH=$source_path" >> config.mak
+echo "BUILD_ROOT=$PWD" >> config.mak
 
 if test "$amr_wb" = "yes" ; then
   echo "#define AMR_WB 1" >> $TMPH


-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list