Don't require make to generate visualc files

Don't run `make list` to obtain the list of programs in
generate_visualc_files.pl. This doesn't work on Windows when a `make`
command is not available. Instead, read the makefile.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-04-22 20:07:44 +02:00
parent 1411c7c0d6
commit b0fa9d209d
2 changed files with 66 additions and 59 deletions

View file

@ -177,10 +177,10 @@ sub gen_app {
}
sub get_app_list {
my $app_list = `cd $programs_dir && make list`;
die "make list failed: $!\n" if $?;
return split /\s+/, $app_list;
my $makefile_contents = slurp_file('programs/Makefile');
$makefile_contents =~ /\n\s*APPS\s*=[\\\s]*(.*?)(?<!\\)[\#\n]/s
or die "Cannot find APPS = ... in programs/Makefile\n";
return split /(?:\s|\\)+/, $1;
}
sub gen_app_files {