Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!cbmvax!ditto From: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Newsgroups: comp.sys.att Subject: Re: make behavior? Summary: .kshrc? .cshrc? Message-ID: <5897@cbmvax.UUCP> Date: 5 Feb 89 23:38:38 GMT References: <8220001@hp-lsd.HP.COM> Reply-To: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Organization: Commodore Technology, West Chester, PA Lines: 31 In article <8220001@hp-lsd.HP.COM> sung@hp-lsd.HP.COM (Ann Sung) writes: > $ make > pwd > /tmp/test > echo "test" > test.out > pwd > /tmp/test > >The file test.out is created in my home directory, rather than in /tmp/test >as I expected. Note that the line containing the "pwd" command is simple enough that make will directly exec() it without running a shell, while the "echo" line must be passed to the shell for interpretation. That points to your shell as the source of the problem, since the pwd commands executed correctly. I would guess that your $SHELL variable is set to /bin/ksh and you have a .kshrc file which changes your current directory. The problem can (and should) be fixed by setting SHELL to /bin/sh in the Makefile. You also probably want to consider whether your .kshrc's behavior is wrong. (The name .kshrc actually comes from $ENV; yours might be different.) (The same warning about make applies to users of csh with a cshrc file; I just assumed that this 3b1 user would be using ksh.) -- -=] Ford [=- "The number of Unix installations (In Real Life: Mike Ditto) has grown to 10, with more expected." ford@kenobi.cts.com - The Unix Programmer's Manual, ...!sdcsvax!crash!elgar!ford 2nd Edition, June, 1972. ditto@cbmvax.commodore.com