summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Philip Oakley <philipoakley@iee.org>2019-07-29 13:08:03 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-07-29 14:51:42 -0700
commit865406bc5426d5196935e37a3a5fde9c843c3e96 (patch)
tree75ac09e38bb332cd00616a55875375f00df19e73 /contrib
parentVcproj.pm: urlencode '<' and '>' when generating VC projects (diff)
downloadtgif-865406bc5426d5196935e37a3a5fde9c843c3e96.tar.xz
contrib/buildsystems: ignore invalidcontinue.obj
Since 4b623d8 (MSVC: link in invalidcontinue.obj for better POSIX compatibility, 2014-03-29), invalidcontinue.obj is linked in the MSVC build, but it was not parsed correctly by the buildsystem. Ignore it, as it is known to Visual Studio and will be handled elsewhere. Also only substitute filenames ending with .o when generating the source .c filename, otherwise we would start to expect .cbj files to generate .obj files (which are not generated by our build)... In the future there may be source files that produce .obj files so keep the two issues (.obj files with & without source files) separate. Signed-off-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Duncan Smart <duncan.smart@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/buildsystems/engine.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index 23da787dc5..53e65d4db7 100755
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -282,7 +282,7 @@ sub handleLibLine
# exit(1);
foreach (@objfiles) {
my $sourcefile = $_;
- $sourcefile =~ s/\.o/.c/;
+ $sourcefile =~ s/\.o$/.c/;
push(@sources, $sourcefile);
push(@cflags, @{$compile_options{"${sourcefile}_CFLAGS"}});
push(@defines, @{$compile_options{"${sourcefile}_DEFINES"}});
@@ -326,8 +326,12 @@ sub handleLinkLine
} elsif ($part =~ /\.(a|lib)$/) {
$part =~ s/\.a$/.lib/;
push(@libs, $part);
- } elsif ($part =~ /\.(o|obj)$/) {
+ } elsif ($part eq 'invalidcontinue.obj') {
+ # ignore - known to MSVC
+ } elsif ($part =~ /\.o$/) {
push(@objfiles, $part);
+ } elsif ($part =~ /\.obj$/) {
+ # do nothing, 'make' should not be producing .obj, only .o files
} else {
die "Unhandled lib option @ line $lineno: $part";
}
@@ -336,7 +340,7 @@ sub handleLinkLine
# exit(1);
foreach (@objfiles) {
my $sourcefile = $_;
- $sourcefile =~ s/\.o/.c/;
+ $sourcefile =~ s/\.o$/.c/;
push(@sources, $sourcefile);
push(@cflags, @{$compile_options{"${sourcefile}_CFLAGS"}});
push(@defines, @{$compile_options{"${sourcefile}_DEFINES"}});