View | Details | Raw Unified | Return to issue 65281
Collapse All | Expand All

(-)dmake/getinp.c (-5 / +7 lines)
Lines 771-777 Link Here
771
			tok[1] = '\0';
771
			tok[1] = '\0';
772
		}
772
		}
773
		else
773
		else
774
			lhs = ""; /* Left hand side is empty. */
774
			lhs = NIL(char); /* Left hand side is empty. */
775
775
776
		/* Jump over the operation so we can grab the right half of the expression */
776
		/* Jump over the operation so we can grab the right half of the expression */
777
		if( opcode == ST_IFEQ || opcode == ST_IFNEQ )
777
		if( opcode == ST_IFEQ || opcode == ST_IFNEQ )
Lines 795-804 Link Here
795
				case LESS_EQUAL:
795
				case LESS_EQUAL:
796
				case GREATER_EQUAL:
796
				case GREATER_EQUAL:
797
					/* Ignore quotes around the arguments */
797
					/* Ignore quotes around the arguments */
798
					if ( lhs[0] == '"' ) lhs++;
798
					if ( lhs && lhs[0] == '"' ) lhs++;
799
					if ( rhs[0] == '"' ) rhs++;
799
					if ( rhs && rhs[0] == '"' ) rhs++;
800
					lint = atoi( lhs );
800
801
					rint = atoi( rhs );
801
					/* Empty strings evaluate to zero. */
802
					lint = lhs ? atoi( lhs ) : 0;
803
					rint = rhs ? atoi( rhs ) : 0;
802
					result = ( lint >= rint ) ? TRUE : FALSE;
804
					result = ( lint >= rint ) ? TRUE : FALSE;
803
					if ( opsind == LESS_EQUAL && lint != rint )
805
					if ( opsind == LESS_EQUAL && lint != rint )
804
						result = !result;
806
						result = !result;
(-)dmake/man/dmake.tf (-2 / +3 lines)
Lines 1234-1240 Link Here
1234
command line, for the first target found in the makefile, and for any target
1234
command line, for the first target found in the makefile, and for any target
1235
having no recipe but containing a list of prerequisites (see the COMPATIBILITY
1235
having no recipe but containing a list of prerequisites (see the COMPATIBILITY
1236
section for an exception to this rule if the AUGMAKE (\fB\-A\fP) flag
1236
section for an exception to this rule if the AUGMAKE (\fB\-A\fP) flag
1237
was specified.
1237
was specified).
1238
.SH "RECIPES"
1238
.SH "RECIPES"
1239
The traditional format used by most versions of Make defines the recipe
1239
The traditional format used by most versions of Make defines the recipe
1240
lines as arbitrary strings that may contain macro expansions.  They
1240
lines as arbitrary strings that may contain macro expansions.  They
Lines 3026-3032 Link Here
3026
before the comparison is made, the expression is expanded.  The text
3026
before the comparison is made, the expression is expanded.  The text
3027
portions are then selected and compared.  In the case of the numeric
3027
portions are then selected and compared.  In the case of the numeric
3028
comparisons enclosing quotes are removed after expanding the expressions
3028
comparisons enclosing quotes are removed after expanding the expressions
3029
and the leading numerical parts are converted to an integer number. The
3029
and the leading numerical parts are converted to an integer number. If no
3030
numerical part is found this results to 0 (zero). The
3030
string "12ab" for example evaluates to the number 12.
3031
string "12ab" for example evaluates to the number 12.
3031
Expressions can be nested with () and the use of || or &&.
3032
Expressions can be nested with () and the use of || or &&.
3032
White space at the start and
3033
White space at the start and

Return to issue 65281