Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jun 1995 11:05:36 +0200
From:      petri@ibr.cs.tu-bs.de (Stefan Petri)
To:        FreeBSD-gnats-submit@FreeBSD.org, bugs@FreeBSD.org
Subject:   make chokes on empty rules + fix
Message-ID:  <199506120905.LAA14341@jupiter.ibr.cs.tu-bs.de>

next in thread | raw e-mail | index | archive | help

>Submitter-Id:   net
>Originator:     Stefan Petri
>Organization:   TU Braunschweig, Inst. f. Betriebssysteme u. Rechnerverbund
>Confidential:   no
>Synopsis:       make chokes on empty rules + fix
>Severity:       non-critical
>Priority:       medium
>Category:       bin
>Release:        FreeBSD 2.0.950412-SNAP i386
>Class:          change-request
>Environment: 

	Any FreeBSD

>Description: 

	make aborts with fatal error if a Makefile rule line contains a
	tab followed by an emtpy shell command line. This is very annoying,
	because the Makefiles in almost every piece of software on the
	net contain such lines, notably Makefiles that are generated by
	the gnu configure utility. The correctness of such lines might
	be arguable, but since every other version of make simply
	ignores such lines, I propose the following fix, which will
	print out a warning about such a line, but will continue to
	make the target.

	[send-pr did not like ``Severity: seriuosly annoying'' ;-]

>How-To-Repeat: 

	Creat a Makefile with only a tabulator in a rule line, then
	invoke make.

>Fix: 
	

*** /usr/src/usr.bin/make/parse.c-950412-SNAP	Mon Jan 23 22:01:46 1995
--- parse.c	Mon Jun 12 10:44:13 1995
***************
*** 715,721 ****
  	     * Ending a dependency line without an operator is a Bozo
  	     * no-no 
  	     */
! 	    Parse_Error (PARSE_FATAL, "Need an operator");
  	    return;
  	}
  	*cp = '\0';
--- 715,721 ----
  	     * Ending a dependency line without an operator is a Bozo
  	     * no-no 
  	     */
! 	    Parse_Error (PARSE_WARNING, "Need an operator");
  	    return;
  	}
  	*cp = '\0';



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506120905.LAA14341>