Commit 04d60a3e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Generate libvlc.sym separately from vlc_symbols.h

parent 3ebd0d5b
...@@ -386,9 +386,11 @@ stamp-api: Makefile.in $(HEADERS_include) ../vlc-api.pl ...@@ -386,9 +386,11 @@ stamp-api: Makefile.in $(HEADERS_include) ../vlc-api.pl
top_srcdir="$(top_srcdir)" perl $(top_srcdir)/vlc-api.pl top_srcdir="$(top_srcdir)" perl $(top_srcdir)/vlc-api.pl
touch stamp-api touch stamp-api
libvlc.sym: libvlc.sym: $(HEADERS_include)
rm -f stamp-api rm -f libvlc.sym
$(MAKE) stamp-api (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 # Unit/regression test
......
...@@ -32,19 +32,15 @@ my $srcdir = $ENV{'top_srcdir'}; ...@@ -32,19 +32,15 @@ my $srcdir = $ENV{'top_srcdir'};
# #
my %new_APIs; my %new_APIs;
my $new_sym = IO::Handle->new(); my $new_sym = IO::Handle->new();
open $new_sym, '> libvlc.sym' or die "libvlc.sym: $!\n";
while (<STDIN>) while (<STDIN>)
{ {
if (/VLC_EXPORT\(\s*(\w.*\S)\s*,\s*(\w*)\s*,\s*\(\s*(\w.*\S)\s*\)\s*\)[^)]*$/) if (/VLC_EXPORT\(\s*(\w.*\S)\s*,\s*(\w*)\s*,\s*\(\s*(\w.*\S)\s*\)\s*\)[^)]*$/)
{ {
$new_APIs{$2} = [ ( $1, $3 ) ]; $new_APIs{$2} = [ ( $1, $3 ) ];
print { $new_sym } "$2\n";
} }
} }
close $new_sym;
# #
# Write header's header # Write header's header
# #
......
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