bug-make
[Top][All Lists]
Advanced

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

No output from $(shell foo) on Tru64


From: Matthew Sanderson
Subject: No output from $(shell foo) on Tru64
Date: Tue, 13 Jul 2004 10:25:18 +1000 (EST)

Hi,

I'm running GNU Make 3.80 on Tru64 4.0F on an Alpha. I'm intermittently
getting empty values as the result of a $(shell foo) function call. One
'make' run, the variable gets the value I expect, which is the output of
the command; the next run, the variable gets an empty value.

Example makefile:
UNAME:=$(shell /bin/uname)
all:
        echo '$(UNAME)'
I expect the variable UNAME to receive the value 'OSF1' - and once in a 
while it does; but most of the time, UNAME=''. The intermittency of this
problem is a bit worrying...

Replacing the command /bin/uname with a shell script that prints out a
constant string does not fix the problem. And UNAME:=$(shell cat 
myfile.txt) yields nothing even though myfile.txt contains data and is
readable.

The problem occurs both when GNU Make is compiled by GCC 3.3.2, by GCC 
3.3.3, and when compiled by some version of the Digital C compiler (not
sure which), all on the same Alpha/Tru64 4.0F box.

I tried editing Make's config.h after ./configure, and undefining 
HAVE_VFORK, HAVE_VFORK_H and HAVE_WORKING_VFORK, and #defining vfork fork.
This didn't seem to change anything.

Using the same makefile, and a Make binary compiled from the same GNU Make
3.80 source code on a different platform (Solaris), the problem does not
occur. It also doesn't occur on HPUX, Linux or AIX. Only Tru64 is broken.

'trace', the Tru64 equivalent of truss/strace, shows the child process (in
this case, uname) printing the expected output to the pipe fd connecting
it to its parent. So I am guessing this is a problem in the system shell
/bin/sh, or in Make? I can send the trace output (rather lengthy) if
desired.

Thanks for making Make :-) and in advance for any help you can offer.

Regards,

--matthew






reply via email to

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