From owner-freebsd-bugs Mon Jun 3 21:09:22 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id VAA12216 for bugs-outgoing; Mon, 3 Jun 1996 21:09:22 -0700 (PDT) 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 VAA12210 for ; Mon, 3 Jun 1996 21:09:19 -0700 (PDT) Received: from bunyip.cc.uq.oz.au by bunyip.cc.uq.oz.au id <00201-1@bunyip.cc.uq.oz.au>; Tue, 4 Jun 1996 14:02:51 +1000 Received: from netfl15a.devetir.qld.gov.au by pandora.devetir.qld.gov.au (8.6.10/DEVETIR-E0.3a) with ESMTP id OAA16691 for ; Tue, 4 Jun 1996 14:02:52 +1000 Received: from localhost by netfl15a.devetir.qld.gov.au (8.6.8.1/DEVETIR-0.1) id EAA23538 for ; Tue, 4 Jun 1996 04:02:54 GMT Message-Id: <199606040402.EAA23538@netfl15a.devetir.qld.gov.au> X-Mailer: exmh version 1.6.5 12/11/95 To: bugs@freebsd.org Subject: Shell commands beginning with '@' don't work in make sometimes Reply-to: sysseh@devetir.qld.gov.au X-send-pr-version: 3.2 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Jun 1996 14:02:54 +1000 From: Stephen Hocking Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Submitter-Id: current-users >Originator: Bourne-again Superuser >Organization: DTIR >Confidential: no >Synopsis: Shell commands within make that start with '@' don't work >Severity: serious >Priority: medium >Category: bin >Release: FreeBSD 2.2-CURRENT i386 >Class: sw-bug >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.