[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

behavior of '@' in complex defs

From: Rich Peachey
Subject: behavior of '@' in complex defs
Date: Tue, 05 Mar 2002 15:51:02 -0500


I have encountered a problem when I use make 3.79.1 (on both Solaris 7
and Win32) with how it suppresses output with the '@' symbol.  To
demonstrate the problem that I have, I wrote a very basic makefile (see
below).  I am running it on my Sun.  Inside the current directory is
another directory named 'junk'.  Inside of 'junk' is a textfile
containing '1 2 3' named 'junktext'.  Below is a script showing the
version of make I am using, the makefile itself, and the output:


salty:gmake -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.5.1
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
        Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

Report bugs to <address@hidden>.

salty:cd junk
salty:more junktext
1 2 3
salty:cd ..
salty:more makefile
define TEST_RULE
        @ echo "Testing gmake bug"
        cd junk; more junktext
        cd ..
        @ echo "finished"

Testing gmake bug
1 2 3

script done on Tue Mar 05 12:59:15 2002


Prior to version 3.79, the output generated by this makefile would have
included "cd junk; more junktext" before the "1 2 3" line, and the "cd
.." after the "1 2 3" line.  It seems that with 3.79 and higher treats
the entire TEST_RULE definition as a single command, and the '@' at the
start of that def turns off the output for the entire definition instead
of just for the echo line.  This is causing us a problem because we have
a several line define in our test scripts, but the output generated by
those scripts is now suppressed due to a '@' in the first line of the
define.  I tested the scripts with make version 3.78.1 and the output
was as expected - not suppressed.  It wasn't clear to me from your
documentation if the '@' in a multi-line define effects the entire

I ran both on Solaris 7 & Win 2000 with the same results.  The Sun box
is a Ultra 60, the PC is a P4 Dell - but I don't think that matters. 
Attached is the config.h file from my Solaris build of make 3.79.1.  The
build was made using a Solaris 2.5.1 machine.

Thanks for any insight you can provide.

Rich Peachey
Agere Systems
Member of Technical Staff
Software Tools Group, PAS Org.

Attachment: config.h
Description: application/unknown-content-type-hfile

reply via email to

[Prev in Thread] Current Thread [Next in Thread]