Generate libvlc.sym separately from vlc_symbols.h
authorRémi Denis-Courmont <rem@videolan.org>
Wed, 22 Nov 2006 12:57:04 +0000 (12:57 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Wed, 22 Nov 2006 12:57:04 +0000 (12:57 +0000)
src/Makefile.am
vlc-api.pl

index a54b283..10bbab7 100644 (file)
@@ -386,9 +386,11 @@ stamp-api: Makefile.in $(HEADERS_include) ../vlc-api.pl
          top_srcdir="$(top_srcdir)" perl $(top_srcdir)/vlc-api.pl
        touch stamp-api
 
-libvlc.sym:
-       rm -f stamp-api
-       $(MAKE) stamp-api
+libvlc.sym: $(HEADERS_include)
+       rm -f libvlc.sym
+       (cd $(srcdir) && cat $(HEADERS_include) ) | \
+       sed -ne 's/^.*VLC_EXPORT\s*(\s*\w.*\S\s*,\s*\(\w*\)\s*,\s*(\s*\w.*\S\s*)\s*)[^)]*$$/\1/p' \
+               > libvlc.sym
 
 ###############################################################################
 # Unit/regression test
index dc8056f..0cb7d52 100755 (executable)
@@ -32,19 +32,15 @@ my $srcdir = $ENV{'top_srcdir'};
 #
 my %new_APIs;
 my $new_sym = IO::Handle->new();
-open $new_sym, '> libvlc.sym' or die "libvlc.sym: $!\n";
 
 while (<STDIN>)
 {
        if (/VLC_EXPORT\(\s*(\w.*\S)\s*,\s*(\w*)\s*,\s*\(\s*(\w.*\S)\s*\)\s*\)[^)]*$/)
        {
                $new_APIs{$2} = [ ( $1, $3 ) ];
-               print { $new_sym } "$2\n";
        } 
 }
 
-close $new_sym;
-
 #
 # Write header's header
 #