#*****************************************************************************
#* vlc-api.pl: VLC API maintenance script
#*****************************************************************************
-#* Copyright (C) 2005 VideoLAN (Centrale Réseaux) and its contributors
+#* Copyright (C) 2005 the VideoLAN team
#* $Id$
#*
#* Authors: Rémi Denis-Courmont <rem # videolan.org>
use strict;
+my $srcdir = $ENV{'top_srcdir'};
+
#
# Reads to-be exported APIs
#
#
# 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".
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;$/)
#
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';
}