fi
# Iterate through each of the components
-for i in framework modules melt mlt++
+for i in framework modules melt mlt++ swig
do
if [ -x src/$i/configure ]
then
rm -f "$(DESTDIR)$(libdir)/$(SONAME)"
rm -f "$(DESTDIR)$(libdir)/$(NAME)"
rm -rf "$(DESTDIR)$(prefix)/include/mlt/framework"
- rm "$(DESTDIR)$(datadir)/mlt/metaschema.yaml"
+ rm -f "$(DESTDIR)$(datadir)/mlt/metaschema.yaml"
ifneq ($(wildcard .depend),)
include .depend
cat << EOF
Melt options:
- --rename-melt - Give melt executable a different name.
+ --rename-melt=name - Give melt executable a different name.
EOF
-SUBDIRS = java perl php python ruby tcl
+include ../../config.mak
+include config.mak
-all clean install:
+all clean depend install:
list='$(SUBDIRS)'; \
for subdir in $$list; do \
- if [ -f $$subdir/Makefile -a -f .$$subdir ] ; \
- then $(MAKE) -C $$subdir $@ || exit 1; \
+ if [ -x $$subdir/build -a ! -f .$$subdir -o $@ = clean ] ; \
+ then echo -n Building $$subdir... ; \
+ cd $$subdir && output=`./build $@ 2>&1` ; \
+ if [ $$? -eq 0 ] ; \
+ then echo OK && touch ../.$$subdir ; \
+ else echo $$output && exit 1 ; \
+ fi ; \
+ cd .. ; \
+ if [ -f $$subdir/Makefile -a -f .$$subdir ] ; \
+ then $(MAKE) -C $$subdir $@ || exit 1 ; \
+ fi ; \
+ if [ $@ = clean ] ; \
+ then rm -f .$$subdir ; \
+ fi ; \
fi \
done
-
-#!/usr/bin/env sh
+#!/bin/sh
-which swig > /dev/null 2>&1
-[ $? != 0 ] && echo "Please install swig" && exit 1
+if [ "$help" = "1" ]
+then
+ cat << EOF
+SWIG options:
-pkg-config mlt-framework --cflags > /dev/null 2>&1
-[ $? != 0 ] && echo "Please install mlt" && exit 1
+ --enable-swig - Build the high level language bindings.
+ --swig-languages=[all | [java | perl | php | python | ruby | tcl]*]
+ - Languages to build (default: all)
-if [ "$1" = "all" ]
-then languages="java perl php python ruby tcl"
-elif [ "$1" != "" ]
-then languages=$*
-else echo "Usage: ./configure [ all | language * ]"
- exit 0
-fi
+EOF
-for i in java perl php python ruby tcl
-do
- rm -f .$i
-done
+else
+
+ which swig > /dev/null 2>&1
+ [ $? != 0 ] && echo "Please install swig" && exit 1
+
+ languages="java perl php python ruby tcl"
+ touch config.mak
-for i in $languages
-do
- echo -n "Configuring $i ... "
- if [ -d "$i" ]
- then
- cd $i &&
- output=`./build`
- if [ $? == 0 ]
- then echo "OK"
- touch ../.$i
- elif [ "$output" == "" ]
- then
- echo "Failed"
- else
- echo $output
- fi
- cd ..
- else
- echo "Unknown"
- fi
-done
+ # Iterate through arguments
+ for i in "$@"
+ do
+ case $i in
+ --swig-languages=* ) echo SUBDIRS = ${i#--swig-languages=} > config.mak ;;
+ esac
+ done
+fi
#!/bin/sh
+if [ "$1" = "clean" ]
+then
+ ( cd `dirname $0`; rm -rf *.cxx *.so mlt.i ../.java *.class src_swig )
+ exit 0
+fi
+
path=`which java 2> /dev/null`
if [ $? = 0 ]
#!/bin/sh
+
+if [ "$1" = "clean" ]
+then
+ ( cd `dirname $0`; rm -f *.cxx *.so mlt.i ../.perl mlt.pm )
+ exit 0
+fi
+
perl Makefile.PL || exit 1
-make
#!/bin/sh
+if [ "$1" = "clean" ]
+then
+ ( cd `dirname $0`; rm -f *.cpp *.so mlt.i ../.php mlt.php *.h )
+ exit 0
+fi
+
+
ln -sf ../mlt.i
swig -c++ -I../../mlt++ -I../.. -php5 -noproxy mlt.i
g++ -fPIC -DPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. `php-config --includes` mlt_wrap.cpp
#!/bin/sh
+if [ "$1" = "clean" ]
+then
+ ( cd `dirname $0`; rm -f *.cxx *.so mlt.i ../.python mlt.py? )
+ exit 0
+fi
+
path=`which python 2> /dev/null`
if [ $? = 0 ]
#!/usr/bin/env ruby
require 'mkmf'
+if ARGV.shift == 'clean'
+ system( "rm -f *.cxx *.so mlt.i ../.ruby Makefile" )
+ exit 0
+end
system( "ln -sf ../mlt.i" )
system( "swig -c++ -ruby -I../../mlt++ -I../.. mlt.i" )
$CFLAGS += "-I../.."
$LDFLAGS += " -L../../mlt++ -lmlt++"
create_makefile('mlt')
-system( 'make' )
#!/bin/sh
+if [ "$1" = "clean" ]
+then
+ ( cd `dirname $0`; rm -f *.cxx *.so mlt.i ../.tcl )
+ exit 0
+fi
+
path=`which tclsh 2>/dev/null`
if [ "$path" != "" ]