Commit 86dd8dbb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Ensure libvlc only export symbols from libvlc API

parent a1b21996
......@@ -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
###############################################################################
......
......@@ -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".
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment