bug-make
[Top][All Lists]
Advanced

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

Re: Problem with shell commands on Digital UNIX V4.0F.


From: Matt Hodges
Subject: Re: Problem with shell commands on Digital UNIX V4.0F.
Date: Thu, 19 Dec 2002 16:40:47 +0000

>>>>> Paul D Smith writes:

 > I can't imagine what the problem might be... certainly bash works
 > fine for me with GNU make on Linux and Solaris...

Something really strange is happening. There seems to be some random
variation in the results. For this Makefile:

----------------------------------------------------------------------
FOO:=$(shell echo foo)
BAR:=$(shell ls Makefile)

all:
        @echo FOO = $(FOO)
        @echo BAR = $(BAR)
----------------------------------------------------------------------

version 3.79.1 always gives:

----------------------------------------------------------------------
FOO = foo
BAR = Makefile
----------------------------------------------------------------------

regardless of the shell. But for 3.80, I see behaviour like this:

----------------------------------------------------------------------
address@hidden; for shell in bash ksh sh; do echo; echo /bin/$shell; make 
SHELL=/bin/$shell; done;
Thu Dec 19 16:19:27 GMT 2002

/bin/bash
FOO =
BAR =

/bin/ksh
FOO =
BAR =

/bin/sh
FOO = foo
BAR =
address@hidden; for shell in bash ksh sh; do echo; echo /bin/$shell; make 
SHELL=/bin/$shell; done;
Thu Dec 19 16:19:29 GMT 2002

/bin/bash
FOO = foo
BAR = Makefile

/bin/ksh
FOO = foo
BAR =

/bin/sh
FOO =
BAR =
address@hidden; for shell in bash ksh sh; do echo; echo /bin/$shell; make 
SHELL=/bin/$shell; done;
Thu Dec 19 16:19:30 GMT 2002

/bin/bash
FOO =
BAR = Makefile

/bin/ksh
FOO = foo
BAR =

/bin/sh
FOO = foo
BAR =
----------------------------------------------------------------------

I ran some tests with the -d flag, and here is a sample sdiff output
for one job with bash and one with ksh (with the PIDs factored out):

-------------------------------------------------------------------------------------------------------------------
Considering target file `all'.                                  Considering 
target file `all'.
 File `all' does not exist.                                      File `all' 
does not exist.
 Finished prerequisites of target file `all'.                    Finished 
prerequisites of target file `all'.
Must remake target `all'.                                       Must remake 
target `all'.
                                                              > FOO = foo
                                                              > Got a SIGCHLD; 
1 unreaped children.
Putting child 0x140019880 (all) PID xxxx on the chain.          Putting child 
0x140019880 (all) PID xxxx on the chain.
Live child 0x140019880 (all) PID xxxx                           Live child 
0x140019880 (all) PID xxxx 
FOO =                                                         <
Got a SIGCHLD; 1 unreaped children.                           <
Reaping winning child 0x140019880 PID xxxx                      Reaping winning 
child 0x140019880 PID xxxx 
Live child 0x140019880 (all) PID xxxx                           Live child 
0x140019880 (all) PID xxxx 
BAR =                                                           BAR =
Got a SIGCHLD; 1 unreaped children.                             Got a SIGCHLD; 
1 unreaped children.
Reaping winning child 0x140019880 PID xxxx                      Reaping winning 
child 0x140019880 PID xxxx 
Removing child 0x140019880 PID xxxx from chain.                 Removing child 
0x140019880 PID xxxx from chain.
Successfully remade target file `all'.                          Successfully 
remade target file `all'.
-------------------------------------------------------------------------------------------------------------------



reply via email to

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