[Pkg-haskell-commits] darcs: tools: Allow specifying flags in packages.txt

Joachim Breitner mail at joachim-breitner.de
Sat Jun 15 11:55:40 UTC 2013


Sat Jun 15 11:54:34 UTC 2013  Joachim Breitner <mail at joachim-breitner.de>
  * Allow specifying flags in packages.txt

    M ./all-packages/test-packages.pl +5

Sat Jun 15 11:54:34 UTC 2013  Joachim Breitner <mail at joachim-breitner.de>
  * Allow specifying flags in packages.txt
diff -rN -u old-tools/all-packages/test-packages.pl new-tools/all-packages/test-packages.pl
--- old-tools/all-packages/test-packages.pl	2013-06-15 11:55:40.431036585 +0000
+++ new-tools/all-packages/test-packages.pl	2013-06-15 11:55:40.543244111 +0000
@@ -16,6 +16,7 @@
 my %available;
 my %comments;
 my %notest;
+my @flags;
 
 print "Reading packages.txt...\n";
 open PACKAGES, "<", "packages.txt" or die $!;
@@ -31,6 +32,7 @@
 	$versions{$pkg} = $version;
 	next unless $comment;
 	$notest{$pkg}++ if $comment =~ s/notest\s*//;
+	push @flags, $1 while $comment =~ s/(-f[^ ]+)\s*//;
 	$comments{$pkg} = $comment if $comment;
 }
 close PACKAGES;
@@ -171,6 +173,9 @@
 	next if (exists $notest{$pkg});
 	push @params, sprintf "%s-%s", $pkg, $versions{$pkg};
 }
+push @params, @flags;
+
+printf "Using flags: %s\n", join ", ", @flags;
 
 print "Running cabal-install...\n";
 my $out;




More information about the Pkg-haskell-commits mailing list