Alexandre Julliard : tools: Add some sanity checks in make_makefiles.
Module: wine Branch: master Commit: 845047eebbeebdcc7ecbb46a54686251bcfa1114 URL: http://source.winehq.org/git/wine.git/?a=commit;h=845047eebbeebdcc7ecbb46a54... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Oct 23 10:44:05 2010 +0200 tools: Add some sanity checks in make_makefiles. --- tools/make_makefiles | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/tools/make_makefiles b/tools/make_makefiles index bc52c49..4673fea 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -309,6 +309,10 @@ sub parse_makefile($) $make{$1} = \@list; next; } + if (/^\s*(TOPSRCDIR|TOPOBJDIR|SRCDIR|VPATH)\s*=\s*(.*)/) + { + die "Variable $1 in $file.in is obsolete"; + } } return %make; } @@ -363,6 +367,14 @@ sub update_makefiles(@) if ($rules eq $makerules{"MAKE_DLL_RULES"}) { (my $name = $file) =~ s/^dlls\/(.*)\/Makefile/$1/; + if ($name =~ /\./) + { + die "Invalid MODULE in $file" unless $make{"MODULE"} eq $name; + } + else + { + die "Invalid MODULE in $file" unless $make{"MODULE"} eq "$name.dll"; + } my $implib = $make{"IMPORTLIB"} || ""; my $implib_srcs = defined($make{"IMPLIB_SRCS"}) && join( " ", @{$make{"IMPLIB_SRCS"}} ); $args .= "," if $implib || $is_win16; @@ -374,6 +386,14 @@ sub update_makefiles(@) elsif ($rules eq $makerules{"MAKE_PROG_RULES"}) { (my $name = $file) =~ s/^programs\/(.*)\/Makefile/$1/; + if ($name =~ /\./) + { + die "Invalid MODULE in $file" unless $make{"MODULE"} eq $name; + } + else + { + die "Invalid MODULE in $file" unless $make{"MODULE"} eq "$name.exe"; + } my $install = $dont_install{$name} ? "" : "install"; $install .= "bin" if $bin_install{$name}; $args .= "," if $is_win16 || $install;
participants (1)
-
Alexandre Julliard