From 97f1e2efb5754b953905ea1a41a5c469765f6267 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sat, 1 Feb 2014 21:19:38 +0000 Subject: [PATCH] Fix roken-h-process.pl --- Makefile.am | 1 + cf/roken-h-process.pl | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 447670123..0741d3b03 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,6 +38,7 @@ EXTRA_DIST = \ autogen.sh \ krb5.conf \ cf/make-proto.pl \ + cf/roken-h-process.pl \ cf/install-catman.sh \ cf/ChangeLog \ cf/c-function.m4 \ diff --git a/cf/roken-h-process.pl b/cf/roken-h-process.pl index 72d3bd37c..e797dd224 100644 --- a/cf/roken-h-process.pl +++ b/cf/roken-h-process.pl @@ -145,15 +145,15 @@ sub parse_if if (m/^\s*$/) { print "end $_\n" if ($debug); return 1; + } elsif (m/^\(([^&]+)\&\&(.*)\)\s*\|\|\s*\(([^&]+)\&\&(.*)\)$/) { + print "($1 and $2) or ($3 and $4)\n" if ($debug); + return ((parse_if($1) and parse_if($2)) or (parse_if($3) and parse_if($4))); } elsif (m/^([^&]+)\&\&(.*)$/) { print "$1 and $2\n" if ($debug); return parse_if($1) and parse_if($2); - } elsif (m/^\(([^&]+)\&\&(.*)$/) { - print "$1 and $2\n" if ($debug); - return parse_if($1) and parse_if($2); } elsif (m/^([^\|]+)\|\|(.*)$/) { print "$1 or $2\n" if ($debug); - return parse_if($1) or parse_if($2); + return (parse_if($1) or parse_if($2)); } elsif (m/^\s*(\!)?\s*defined\((\w+)\)/) { ($neg, $var) = ($1, $2); print "def: ${neg}-defined(${var})\n" if ($debug);