Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 69c34b9

Browse files
author
Philip Oakley
committed
engine.pl: provide more debug print statements
Assist developers transitioning between the two cultures by including appropriate, but commented out, debug statements. The exception is when an unhandled compiler option is detected, where printing of the full line will supplement the line number and option part. Otherwise the OP has no immediate mechanism for inspecting the relevant part of the makedry output. These debug print statements act as a guide for a poor man's --verbose option. The test suite doesn't cover the contrib/buildsystems (or Msysgit's msvc-build) contributions so fails to notice breakages there-in. It is doubly hard to get developers to ride both horses so, contrary to normal convention, retain selected debug statements as a safety net for those willing to try. Signed-off-by: Philip Oakley <[email protected]>
1 parent 5ccc796 commit 69c34b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/buildsystems/engine.pl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sub showUsage
4141
# Parse command-line options
4242
while (@ARGV) {
4343
my $arg = shift @ARGV;
44+
#print "Arg: $arg \n";
4445
if ("$arg" eq "-h" || "$arg" eq "--help" || "$arg" eq "-?") {
4546
showUsage();
4647
exit(0);
@@ -129,6 +130,7 @@ sub parseMakeOutput
129130
print "Parsing GNU Make output to figure out build structure...\n";
130131
my $line = 0;
131132
while (my $text = shift @makedry) {
133+
#print "Make: $text\n"; # show the makedry line
132134
my $ate_next;
133135
do {
134136
$ate_next = 0;
@@ -263,6 +265,7 @@ sub handleCompileLine
263265
} elsif ($part =~ /\.(c|cc|cpp)$/) {
264266
$sourcefile = $part;
265267
} else {
268+
print "full line: $line\n";
266269
die "Unhandled compiler option @ line $lineno: $part";
267270
}
268271
}
@@ -288,6 +291,7 @@ sub handleLibLine
288291
$libout = $part;
289292
$libout =~ s/\.a$//;
290293
} else {
294+
print "full line: $line\n";
291295
die "Unhandled lib option @ line $lineno: $part";
292296
}
293297
}

0 commit comments

Comments
 (0)