]> git.sesse.net Git - mlt/commitdiff
Add configure option --rename-melt.
authorDan Dennedy <dan@dennedy.org>
Tue, 23 Jun 2009 04:45:16 +0000 (21:45 -0700)
committerDan Dennedy <dan@dennedy.org>
Tue, 23 Jun 2009 04:45:16 +0000 (21:45 -0700)
Signed-off-by: Dan Dennedy <dan@dennedy.org>
src/melt/Makefile
src/melt/configure
src/melt/melt.c

index 239bb393a298046afad2372017514f168173dd6c..e89e98cfa4a454620180a07c5d39ea3cc97268e4 100644 (file)
@@ -1,6 +1,5 @@
 include ../../config.mak
-
-TARGET = melt
+include config.mak
 
 OBJS = melt.o \
           io.o
@@ -27,7 +26,7 @@ clean:
 
 install:       all
        install -d "$(DESTDIR)$(bindir)"
-       install -c -s -m 755 $(TARGET) "$(DESTDIR)$(bindir)"
+       install -c -m 755 $(TARGET) "$(DESTDIR)$(bindir)"
 
 uninstall:
        rm -f "$(DESTDIR)$(bindir)/$(TARGET)"
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..82437fa3d7a6970ec9a57133ab8317890e619deb 100755 (executable)
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ "$help" = "1" ]
+then
+       cat << EOF
+Melt options:
+
+  --rename-melt           - Give melt executable a different name.
+
+EOF
+
+else
+       target=melt
+       for i in "$@"
+       do
+               case $i in
+                       --rename-melt=* ) target="${i#--rename-melt=}" ;;
+               esac
+       done
+       echo "TARGET=$target" > config.mak
+fi
index acb93a78600e4670e0368190c8924b3054cacc24..2b1a033873d9279963bd03bb4bdf2ca483b85e51 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -404,12 +405,12 @@ query_all:
                }
                else if ( !strcmp( argv[ i ], "-version" ) || !strcmp( argv[ i ], "--version" ) )
                {
-                       fprintf( stderr, "MLT melt " VERSION "\n"
+                       fprintf( stderr, "MLT %s " VERSION "\n"
                                "Copyright (C) 2002-2009 Ushodaya Enterprises Limited\n"
                                "<http://www.mltframework.org/>\n"
                                "This is free software; see the source for copying conditions.  There is NO\n"
-                               "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
-                       );
+                               "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
+                               basename( argv[0] ) );
                        goto exit_factory;
                }
                else if ( !strcmp( argv[ i ], "-debug" ) )
@@ -517,7 +518,7 @@ query_all:
        else
        {
                fprintf( stderr,
-"Usage: melt [options] [producer [name=value]* ]+\n"
+"Usage: %s [options] [producer [name=value]* ]+\n"
 "Options:\n"
 "  -attach filter[:arg] [name=value]*       Attach a filter to the output\n"
 "  -attach-cut filter[:arg] [name=value]*   Attach a filter to a cut\n"
@@ -552,7 +553,8 @@ query_all:
 "  -verbose                                 Set the logging level to verbose\n"
 "  -version                                 Show the version and copyright\n"
 "  -video-track | -hide-audio               Add a video-only track\n"
-"For more help: <http://www.mltframework.org/>\n" );
+"For more help: <http://www.mltframework.org/>\n",
+               basename( argv[0] ) );
        }
 
        // Close the consumer