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>
diff --git a/scripts/generate_visualc_files.pl b/scripts/generate_visualc_files.pl
index d11041c..f325e9a 100755
--- a/scripts/generate_visualc_files.pl
+++ b/scripts/generate_visualc_files.pl
@@ -177,10 +177,10 @@
}
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 {