]> git.sesse.net Git - vlc/commitdiff
Ensure libvlc only export symbols from libvlc API
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 10 Sep 2006 17:40:29 +0000 (17:40 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 10 Sep 2006 17:40:29 +0000 (17:40 +0000)
src/Makefile.am
vlc-api.pl

index adc5137faa13f89061e973dd6c78ec872c71f02f..cb4d8cefb0b369ad9ca7e972d9d0a0777ad6ceaa 100644 (file)
@@ -158,8 +158,8 @@ libvlc_la_LIBADD = $(INCLUDED_LIBINTL)
 libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
 libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
 libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
-libvlc_la_LDFLAGS = `$(VLC_CONFIG) --libs vlc builtin|sed -e 's/\(modules\/[^ ]*\)\.a /\1_builtin.la /g'` -no-undefined
-libvlc_la_DEPENDENCIES = stamp-builtins
+libvlc_la_LDFLAGS = `$(VLC_CONFIG) --libs vlc builtin|sed -e 's/\(modules\/[^ ]*\)\.a /\1_builtin.la /g'` -no-undefined -export-symbols libvlc.sym
+libvlc_la_DEPENDENCIES = stamp-builtins stamp-api
 
 
 if HAVE_BEOS
@@ -378,6 +378,10 @@ 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
+
 ###############################################################################
 # Unit/regression test
 ###############################################################################
index 247a815cbf38dcfc4e7a6cf1fdab22a365ac2e2b..dc8056f0eb6a52044f4954cc84ebfd515a57b32a 100755 (executable)
@@ -31,20 +31,24 @@ my $srcdir = $ENV{'top_srcdir'};
 # Reads to-be exported APIs
 #
 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
 #
-my $new_sym=IO::Handle->new();
-open $new_sym, '> vlc_symbols.h.new' or die "$!";
+open $new_sym, '> vlc_symbols.h.new' or die "vlc_symbols.h.new: $!\n";
 print { $new_sym }
        "/*\n".
        " * This file is automatically generated. DO NOT EDIT!\n".