Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Jun 1996 14:19:49 +1000
From:      Stephen Hocking <sysseh@devetir.qld.gov.au>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/1291: Shell commands beginning with '@' don't work in make sometimes
Message-ID:  <199606040419.EAA24271@netfl15a.devetir.qld.gov.au>
Resent-Message-ID: <199606040440.VAA13964@freefall.freebsd.org>

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

>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:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun  3 21:40:02 PDT 1996
>Last-Modified:
>Originator:     Bourne-again Superuser
>Organization:
DTIR
>Release:        FreeBSD 2.2-CURRENT i386
>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.


>Audit-Trail:
>Unformatted:



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