pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk/haskell
Module Name: pkgsrc
Committed By: pho
Date: Mon Feb 7 02:43:43 UTC 2022
Modified Files:
pkgsrc/mk/haskell: build-type.awk
Log Message:
Fix a bug in my previous commit
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/mk/haskell/build-type.awk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mk/haskell/build-type.awk
diff -u pkgsrc/mk/haskell/build-type.awk:1.2 pkgsrc/mk/haskell/build-type.awk:1.3
--- pkgsrc/mk/haskell/build-type.awk:1.2 Mon Feb 7 02:39:41 2022
+++ pkgsrc/mk/haskell/build-type.awk Mon Feb 7 02:43:42 2022
@@ -1,13 +1,15 @@
-# $NetBSD: build-type.awk,v 1.2 2022/02/07 02:39:41 pho Exp $
+# $NetBSD: build-type.awk,v 1.3 2022/02/07 02:43:42 pho Exp $
#
# Extract the field "Build-Type" out of a Cabal package description.
#
BEGIN {
buildTypeLine = 0
+ found = 0
}
tolower($1) ~ /^build-type:/ {
if ($2) {
+ found = 1;
print tolower($2);
exit
}
@@ -18,11 +20,14 @@ tolower($1) ~ /^build-type:/ {
}
buildTypeLine {
+ found = 1;
print tolower($1);
exit
}
END {
- # The package description didn't have Build-Type. Default to "Simple".
- print "simple"
+ if (!found) {
+ # The package description didn't have Build-Type. Default to "Simple".
+ print "simple"
+ }
}
Home |
Main Index |
Thread Index |
Old Index