Subject: bin/760: Make should ignore tab-only lines
To: None <gnats-admin@NetBSD.ORG>
From: None <martin@euterpe.owl.de>
List: netbsd-bugs
Date: 01/28/1995 13:05:05
>Number: 760
>Category: bin
>Synopsis: Make can't parse files like "\t\n"
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Jan 28 13:05:02 1995
>Originator: Martin Husemann
>Organization:
private
>Release: -current as of Jan 27 1995
>Environment:
System: NetBSD euterpe.owl.de 1.0A NetBSD 1.0A (EUTERPE) #2: Sat Jan 28 12:35:00 MET 1995 root@euterpe.owl.de:/usr/src/sys/arch/i386/compile/EUTERPE i386
>Description:
A lot of people complained about the Makefiles with lines conaining
a single tab. One fix is to remove this tab - but I would prefer
'make' to silently skip those lines (as other 'make's do); there
are several sources out there which contain such "broken"
makefiles. I don't know what any `standard' says about this,
but I think invisible lines shouldn't break anything.
>How-To-Repeat:
printf '\t\n' >/tmp/Makefile; make -f /tmp/Makefile
>Fix:
--- src/usr.bin/make/parse.c.old Sat Jan 28 21:21:17 1995
+++ src/usr.bin/make/parse.c Sat Jan 28 21:35:33 1995
@@ -2404,8 +2404,9 @@
goto nextLine;
}
}
- if (*line == '#') {
- /* If we're this far, the line must be a comment. */
+ if (*line == '#' || *line == '\0') {
+ /* If we're this far, the line must be a comment.
+ (Empty lines are ignored as well) */
goto nextLine;
}
>Audit-Trail:
>Unformatted: