aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/make.c22
-rwxr-xr-xtestsuite/make.tests2
2 files changed, 13 insertions, 11 deletions
diff --git a/miscutils/make.c b/miscutils/make.c
index 871c434f8..b2edfdbb4 100644
--- a/miscutils/make.c
+++ b/miscutils/make.c
@@ -1605,9 +1605,6 @@ skip_line(const char *str1)
1605 int ret = cstate[clevel] & SKIP_LINE; 1605 int ret = cstate[clevel] & SKIP_LINE;
1606 int key; 1606 int key;
1607 1607
1608 if (*str1 == '\t')
1609 return ret;
1610
1611 copy = xstrdup(str1); 1608 copy = xstrdup(str1);
1612 q = process_line(copy); 1609 q = process_line(copy);
1613 if ((token = gettok(&q)) != NULL) { 1610 if ((token = gettok(&q)) != NULL) {
@@ -1754,16 +1751,19 @@ readline(FILE *fd, int want_command)
1754 } 1751 }
1755 dispno = lineno; 1752 dispno = lineno;
1756 1753
1757 if (want_command && *str == '\t') 1754 // Check for lines that are conditionally skipped.
1758 return str; 1755 if (posix || !skip_line(str)) {
1756 if (want_command && *str == '\t')
1757 return str;
1759 1758
1760 // Check for comment lines and lines that are conditionally skipped. 1759 // Check for comment lines
1761 p = str; 1760 p = str;
1762 while (isblank(*p)) 1761 while (isblank(*p))
1763 p++; 1762 p++;
1764 1763
1765 if (*p != '\n' && *str != '#' && (posix || !skip_line(str))) 1764 if (*p != '\n' && *str != '#')
1766 return str; 1765 return str;
1766 }
1767 1767
1768 pos = 0; 1768 pos = 0;
1769 } 1769 }
diff --git a/testsuite/make.tests b/testsuite/make.tests
index c92c69340..a12e50b8b 100755
--- a/testsuite/make.tests
+++ b/testsuite/make.tests
@@ -652,6 +652,8 @@ B = b
652target: 652target:
653ifeq ($(A),a) 653ifeq ($(A),a)
654 @echo A OK 654 @echo A OK
655else
656 @echo A not OK
655endif 657endif
656ifneq "a" "$B" 658ifneq "a" "$B"
657 @echo B OK 659 @echo B OK