Hi, Could someone explain this behavior?
The first question I have is on line 49, here is my setup, 1 $ uname -a 2 Linux proton 2.4.18-27.7.xsmp #1 SMP Fri Mar 14 05:52:30 EST 2003 i686 3 $ config.guess --timestamp 4 2003-05-22 5 $ config.guess 6 i686-pc-linux-gnu 7 $ cd ~/tmp 8 $ mkdir foo 9 $ cd foo 10 $ cp ../Makefile.a . 11 $ cp ../Makefile.b . 12 $ cat Makefile.a 13 all: 14 gmake -f Makefile.b SHELL=/usr/local/bin/bash 15 $ cat Makefile.b 16 TOPDIR := $(shell /bin/pwd) 17 all: 18 echo TOPDIR = $(TOPDIR) 19 $ ls -la 20 total 92 21 drwxrwxr-x 2 davidt eng 4095 Jun 4 22:03 . 22 drwxrwxrwx 7 davidt eng 86016 Jun 4 22:01 .. 23 -rw-rw-r-- 1 davidt eng 52 Jun 4 22:01 Makefile.a 24 -rw-rw-r-- 1 davidt eng 58 Jun 4 22:02 Makefile.b 25 $ echo $SHELL 26 /usr/local/bin/ksh 27 $ echo ${.sh.version} 28 Version M 1993-12-28 m+ 29 $ ls -l ~/.bash* 30 -rw-r--r-- 1 davidt eng 24 Jun 4 22:08 /home/davidt/.bash_profile 31 -rw-r--r-- 1 davidt eng 18 Jun 4 22:09 /home/davidt/.bashrc 32 $ cat ~/.bash_profile 33 echo Hello bash_profile 34 $ cat ~/.bashrc 35 echo Hello bashrc 36 $ bash --version 37 GNU bash, version 2.05.0(1)-release (i686-pc-linux-gnu) 38 Copyright 2000 Free Software Foundation, Inc. 39 $ make --version 40 GNU Make 3.80 41 Copyright (C) 2002 Free Software Foundation, Inc. 42 This is free software; see the source for copying conditions. 43 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A 44 PARTICULAR PURPOSE. 45 $ pwd 46 /home/davidt/tmp/foo 47 $ make -s -f Makefile.a 48 Hello bashrc 49 TOPDIR = Hello bashrc /home/davidt/tmp/foo ^^^^^^^^^^^^ Why is the shell invoked interactively? I mean, bash sources the ~/.bashrc file only if bash is interactive, right? So, line 48 and 49 are clearly wrong. But line 49 looks worse. 50 $ make -s -f Makefile.b 51 TOPDIR = /home/davidt/tmp/foo Note how Makefile.b has no problems. 52 $ make -s -f Makefile.a SHELL=/usr/local/bin/bash 53 Hello bashrc 54 TOPDIR = /home/davidt/tmp/foo Note how line 54 differs from line 49. 55 $ make -s -f Makefile.a SHELL=/usr/local/bin/ksh 56 Hello bashrc 57 TOPDIR = Hello bashrc /home/davidt/tmp/foo Note how line 57 differs from line 54, but is the same as line 49. Can someone explain this behavior? And what is the correct behavior? I assume only line 51 shows correct behavior. Is this 0, 1, or 2 bugs? Is this a known bug? -- David Thompson Foster City, CA _______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make