Skip to content

Instantly share code, notes, and snippets.

/-

Created August 23, 2013 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/6318104 to your computer and use it in GitHub Desktop.
Save anonymous/6318104 to your computer and use it in GitHub Desktop.
diff --git a/config/winConfigure.pl b/config/winConfigure.pl
index 0c8d5d6..80cd76f 100755
--- a/config/winConfigure.pl
+++ b/config/winConfigure.pl
@@ -18,7 +18,10 @@ sub parseMakefile {
my $defs = shift;
my $file = $dir.'/Makefile.am';
local *FILE;
- open(FILE, "< $file") || die "can't open \"$file\": $!";
+ if (!open(FILE, "< $file")) {
+ print $dir.'/Makefile.am not found, skipping';
+ return 42;
+ }
my $continuation = ''; # lines ending in a \\
while (<FILE>) {
my $line = $_;
@@ -66,7 +69,9 @@ sub checkDir {
my $dir = shift;
my (%DEFS);
my (%DEPENDENTS, %VERBS);
- &parseMakefile($dir, \%DEFS);
+ if (&parseMakefile($dir, \%DEFS) == 42) {
+ return;
+ }
my @subdirs = @{$DEFS{'SUBDIRS'}};
my @builtSources = @{$DEFS{'BUILT_SOURCES'}};
my $built;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment