Moritz Lenz schrieb:
Reini Urban wrote:
Moritz Lenz schrieb:
Reini Urban wrote:
Attached are updates to the cygwin070patches branch.
Thanks for applying the patches!
applied as r30543.
And this one also please.

fix cuddled else and some beautification.

Also applied (r30547).

And one more patch to fix more cuddling else and tabs.


--
Reini Urban
http://phpwiki.org/  http://murbreak.at/
Index: lib/Parrot/Configure/Compiler.pm
===================================================================
--- lib/Parrot/Configure/Compiler.pm	(revision 30547)
+++ lib/Parrot/Configure/Compiler.pm	(working copy)
@@ -354,15 +354,15 @@
             last;
         }
         if ( $options{conditioned_lines} ) {
-	    # allow multiple keys and nested parens here
+            # allow multiple keys and nested parens here
             if ( $line =~ m/^#([-+])\((.+)\):(.*)/s ) {
-		my $truth = cond_eval($conf, $2);
-		next if ($1 eq '-') and $truth;
-		next if ($1 eq '+') and not $truth;
+          my $truth = cond_eval($conf, $2);
+              next if ($1 eq '-') and $truth;
+                next if ($1 eq '+') and not $truth;
                 $line = $3;
-	    }
-	    # but here not (legacy)
-	    elsif ( $line =~ m/^#CONDITIONED_LINE\(([^)]+)\):(.*)/s ) {
+            }
+      # but here not (legacy)
+        elsif ( $line =~ m/^#CONDITIONED_LINE\(([^)]+)\):(.*)/s ) {
                 next unless cond_eval($conf, $1);
                 $line = $2;
             }
@@ -475,16 +475,17 @@
     my $s = $_[0];
     return "" unless $s;
     if ($s =~ /^\((.+)\)\s*(.*)/) { # longest match to matching closing paren
-	$_[0] = $2 ? $2 : "";	    # modify the 2nd arg
-	#print "** \"$s\" => (\"$1\",\"$_[0]\")\n";
-	return $1;
-    } else {
-	$s =~ s/^\s+//;    		# left-trim to make it more robust
-	$s =~ m/^([^ \(]+)\s*(.*)?/;    # shortest match to next whitespace or open paren
-	$_[0] = $2 ? $2 : "";		# modify the 2nd arg
-	#print "** \"$s\" => (\"$1\",\"$_[0]\")\n";
-	return $1;
+        $_[0] = $2 ? $2 : "";       # modify the 2nd arg
+        #print "** \"$s\" => (\"$1\",\"$_[0]\")\n";
+        return $1;
     }
+    else {
+        $s =~ s/^\s+//;                 # left-trim to make it more robust
+        $s =~ m/^([^ \(]+)\s*(.*)?/;    # shortest match to next whitespace or open paren
+        $_[0] = $2 ? $2 : "";           # modify the 2nd arg
+        #print "** \"$s\" => (\"$1\",\"$_[0]\")\n";
+        return $1;
+    }
 }
 
 # Recursively evaluate AND, OR, NOT for multiple keys as LISP expressions.
@@ -497,30 +498,32 @@
     my $key = $expr;
     my @count = split /\s+/, $expr;
     if (@count > 1) { # multiple keys: recurse into
-	my $truth;
-	my $op = next_expr($expr);
-	if ($op =~ /^(or|and|not)$/i) {
-	    $op  = lc($op);
-	    $key = next_expr($expr);
-	} else {
+        my $truth;
+        my $op = next_expr($expr);
+        if ($op =~ /^(or|and|not)$/i) {
+            $op  = lc($op);
+            $key = next_expr($expr);
+        }
+        else {
             $key = $op;
-	    $op  = 'or';
-	}
-	while ($key) {
-	    last if $truth and ($op eq 'or'); # logical shortcut on OR and already $truth
-	    $truth = cond_eval($conf, $key);
-	    if    ($op eq 'not') { $truth = $truth ? 0 : 1; }
-	    elsif ($op eq 'and') { last unless $truth; } # skip on early fail
-	    $key = next_expr($expr);
-	}
-	return $truth;
+            $op  = 'or';
+        }
+        while ($key) {
+            last if $truth and ($op eq 'or'); # logical shortcut on OR and already $truth
+            $truth = cond_eval($conf, $key);
+            if    ($op eq 'not') { $truth = $truth ? 0 : 1; }
+            elsif ($op eq 'and') { last unless $truth; } # skip on early fail
+            $key = next_expr($expr);
+        }
+        return $truth;
     }
     if ($key =~ /^(\w+)=(.+)$/) {
-      return $conf->data->get($1) eq $2;
-    } else {
-      return exists($conf->data->{c}->{$key})
-        ? $conf->data()->get($key)
-	: $key eq $^O;
+        return $conf->data->get($1) eq $2;
+    }
+    else {
+        return exists($conf->data->{c}->{$key})
+               ? $conf->data()->get($key)
+               : $key eq $^O;
   }
 }
 
Index: config/gen/makefiles/root.in
===================================================================
--- config/gen/makefiles/root.in	(revision 30547)
+++ config/gen/makefiles/root.in	(working copy)
@@ -550,7 +550,6 @@
 
 all : \
     flags_dummy \
-    Makefile \
     PARROT_LIBS \
     $(PARROT) \
     runtime/parrot/include/parrotlib.pbc \
@@ -623,10 +622,6 @@
 vtable.dump : src/vtable.tbl
 	$(PMC2CV)
 
-# regenerate the Makefile
-Makefile: config/gen/makefiles/root.in
-	$(RECONFIGURE) --step=gen::makefiles --target=Makefile
-
 # This is a listing of all targets meant to be called by users
 help :
 	@echo ""
@@ -1002,20 +997,6 @@
     lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(OPS_DIR)/ops.num $(OPS_DIR)/ops.skip
 	$(PERL) $(BUILD_TOOLS_DIR)/ops2pm.pl $(OPS_FILES)
 
-# FIXME: This creates a cycle sometimes
-#lib/Parrot/Config/Generated.pm \
-#    $(SRC_DIR)/platform.c \
-##CONDITIONED_LINE(platform_asm):    $(SRC_DIR)/platform_asm.s \
-##CONDITIONED_LINE(has_opengl):    config/gen/call_list/opengl.in \
-##CONDITIONED_LINE(has_glut):    $(SRC_DIR)/glut_callbacks.c \
-#    config_lib.pasm \
-#    $(BUILD_TOOLS_DIR)/dynpmc.pl \
-#    $(BUILD_TOOLS_DIR)/dynoplibs.pl \
-# : Configure.pl lib/Parrot/Configure.pm \
-#   lib/Parrot/Configure/Step/List.pm lib/Parrot/Configure/Step/Methods.pm
-#	@echo "  Makefile out-of-date: reconfigure"
-#	$(PERL) Configure.pl $(CONFIG_ARGS)
-
 ###############################################################################
 #
 # Examples (Assembly):

Reply via email to