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

Fix for make distclean

parent 902981f5
......@@ -1065,7 +1065,8 @@ stamp-builtin: FORCE
@if test ! -f $@; then printf "" > $@; fi
stamp-api: Makefile.in $(HEADERS_include) vlc-config vlc-api.pl src/misc/modules_builtin.h.in
cd $(srcdir) && cat $(HEADERS_include) | perl ./vlc-api.pl
( cd $(srcdir) && cat $(HEADERS_include) ) | \
( pwd; top_srcdir="$(top_srcdir)" perl $(top_srcdir)/vlc-api.pl )
touch stamp-api
###############################################################################
......
......@@ -24,6 +24,8 @@
use strict;
my $srcdir = $ENV{'top_srcdir'};
#
# Reads to-be exported APIs
#
......@@ -40,7 +42,7 @@ while (<STDIN>)
#
# 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".
......@@ -69,7 +71,7 @@ my $changes = 0;
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;$/)
......@@ -175,10 +177,10 @@ close $new_sym;
#
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';
}
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