]> git.sesse.net Git - vlc/blobdiff - vlc-api.pl
Remove unused comments
[vlc] / vlc-api.pl
index 87082403aa6accbf38a6ca0470c4a9a666f2491f..2e93044bc2d8e80d24518b2f8efd4879e1534ba3 100755 (executable)
@@ -2,7 +2,7 @@
 #*****************************************************************************
 #* vlc-api.pl: VLC API maintenance script
 #*****************************************************************************
-#* Copyright (C) 2005 VideoLAN
+#* Copyright (C) 2005 the VideoLAN team
 #* $Id$
 #*
 #* Authors: RĂ©mi Denis-Courmont <rem # videolan.org>
@@ -24,6 +24,8 @@
 
 use strict;
 
+my $srcdir = $ENV{'top_srcdir'};
+
 #
 # Reads to-be exported APIs
 #
@@ -40,7 +42,7 @@ while (<STDIN>)
 #
 # Write header's header
 #
-open my $new_sym, '> include/vlc_symbols.h.new' or die "$!";
+open my $new_sym, '> vlc_symbols.h.new' or die "$!";
 print { $new_sym }
        "/*\n".
        " * This file is automatically generated. DO NOT EDIT!\n".
@@ -69,7 +71,7 @@ my $changes = 0;
 my @API;
 my @deprecated_API;
 
-open my $oldfd, '< include/vlc_symbols.h';
+open my $oldfd, "< $srcdir/include/vlc_symbols.h";
 while (<$oldfd>)
 {
        if (/^    void \*(\w*)_deprecated;$/)
@@ -175,10 +177,10 @@ close $new_sym;
 #
 if ($changes != 0)
 {
-       rename 'include/vlc_symbols.h.new', 'include/vlc_symbols.h';
+       rename 'vlc_symbols.h.new', "$srcdir/include/vlc_symbols.h";
        print "$changes API(s) changed.\n";
 }
 else
 {
-       unlink 'include/vlc_symbols.h.new';
+       unlink 'vlc_symbols.h.new';
 }