From sysseh@devetir.qld.gov.au  Mon Jun  3 21:31:59 1996
Received: from bunyip.cc.uq.oz.au (pp@bunyip.cc.uq.oz.au [130.102.2.1])
          by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id VAA13517
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 3 Jun 1996 21:31:54 -0700 (PDT)
Received: from bunyip.cc.uq.oz.au by bunyip.cc.uq.oz.au 
          id <01748-0@bunyip.cc.uq.oz.au>; Tue, 4 Jun 1996 14:19:08 +1000
Received: from netfl15a.devetir.qld.gov.au 
          by pandora.devetir.qld.gov.au (8.6.10/DEVETIR-E0.3a) with ESMTP 
          id OAA17028 for <FreeBSD-gnats-submit@freebsd.org>;
          Tue, 4 Jun 1996 14:19:49 +1000
Received: from localhost by netfl15a.devetir.qld.gov.au (8.6.8.1/DEVETIR-0.1) 
          id EAA24271 for <FreeBSD-gnats-submit@freebsd.org>;
          Tue, 4 Jun 1996 04:19:50 GMT
Message-Id: <199606040419.EAA24271@netfl15a.devetir.qld.gov.au>
Date: Tue, 04 Jun 1996 14:19:49 +1000
From: Stephen Hocking <sysseh@devetir.qld.gov.au>
Sender: sysseh@devetir.qld.gov.au
Reply-To: sysseh@devetir.qld.gov.au
To: FreeBSD-gnats-submit@freebsd.org
Subject: Shell commands beginning with '@' don't work in make sometimes
X-Send-Pr-Version: 3.2

>Number:         1291
>Category:       bin
>Synopsis:       Shell commands within make that start with '@' don't work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun  3 21:40:02 PDT 1996
>Closed-Date:    Fri Jun 7 10:34:57 PDT 1996
>Last-Modified:  Fri Jun  7 10:40:59 PDT 1996
>Originator:     Bourne-again Superuser
>Release:        FreeBSD 2.2-CURRENT i386
>Organization:
DTIR
>Environment:

	FreeBSD-2.2 current

>Description:

	When a makefile has a target with embedded shell comands that start
	with @, it will not execute them properly, actually seeking a
command that begins with '@' (say @for) rather than just not echoing the
command in question.

>How-To-Repeat:

A makefile fragment of the form

# a very simple makefile...
pmake::
	@for flag in ${MAKEFLAGS} ''; do \
	case "$$flag" in *=*) ;; *[i]*) set +e;; esac; done; \
	@for i in develhdrs/local; do if [ -d $(DESTDIR)$$i ]; then \
	set +x; else (set -x; $(MKDIRHIER) $(DESTDIR)$$i); fi \
	done
	@echo 'make started.'
	@for i in *.c; do \
	        echo $i; \
	done
	cc -I. -c *.c
	cd lst.lib; cc -I.. -c *.c
	cc *.o lst.lib/*.o -o pmake
	@echo 'make completed.' 

will cause an error like the following -

@for: not found
*** Error code 2
 
   

>Fix:
	
	Unknown at this stage - looks like a perverse make bug.


-- 
The views expressed above are not those of the Worker's Compensation Board of
Queensland, Australia.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: alex 
State-Changed-When: Fri Jun 7 10:34:57 PDT 1996 
State-Changed-Why:  
Someone (sorry, I've lost the message) pointed out on -hackers 
that the example given was erroneous (the line before @for ended 
with a backslash). 
>Unformatted:
