Vcproj.pm: urlencode '<' and '>' when generating VC projects
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jul 29, 2019 at 13:08 UTC
158471d155827e295266e3eb128dac47fca3d1e7
1 file changed
+8
contrib/buildsystems/Generators/Vcproj.pm
+8
@@ -59,6 +59,8 @@ sub createLibProject {
59
my $includes= join(";", sort(map(""$rel_dir\\$_"", @{$$build_structure{"LIBS_${libname}_INCLUDES"}})));
60
my $cflags = join(" ", sort(@{$$build_structure{"LIBS_${libname}_CFLAGS"}}));
61
$cflags =~ s/\"/"/g;
62
+ $cflags =~ s/</</g;
63
+ $cflags =~ s/>/>/g;
64
65
my $cflags_debug = $cflags;
66
$cflags_debug =~ s/-MT/-MTd/;
@@ -80,6 +82,8 @@ sub createLibProject {
82
83
$defines =~ s/-D//g;
84
$defines =~ s/\"/\\"/g;
85
+ $defines =~ s/</</g;
86
+ $defines =~ s/>/>/g;
87
$defines =~ s/\'//g;
88
$includes =~ s/-I//g;
89
mkdir "$target" || die "Could not create the directory $target for lib project!\n";
@@ -271,6 +275,8 @@ sub createAppProject {
275
my $includes= join(";", sort(map(""$rel_dir\\$_"", @{$$build_structure{"APPS_${appname}_INCLUDES"}})));
276
my $cflags = join(" ", sort(@{$$build_structure{"APPS_${appname}_CFLAGS"}}));
277
$cflags =~ s/\"/"/g;
278
+ $cflags =~ s/</</g;
279
+ $cflags =~ s/>/>/g;
280
281
my $cflags_debug = $cflags;
282
$cflags_debug =~ s/-MT/-MTd/;
@@ -297,6 +303,8 @@ sub createAppProject {
303
304
$defines =~ s/-D//g;
305
$defines =~ s/\"/\\"/g;
306
+ $defines =~ s/</</g;
307
+ $defines =~ s/>/>/g;
308
$defines =~ s/\'//g;
309
$defines =~ s/\\\\/\\/g;
310
$includes =~ s/-I//g;