make behavior?

Michael "Ford" Ditto ditto at cbmvax.UUCP
Mon Feb 6 09:38:38 AEST 1989


In article <8220001 at hp-lsd.HP.COM> sung at 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 at kenobi.cts.com
- The Unix Programmer's Manual,		...!sdcsvax!crash!elgar!ford
  2nd Edition, June, 1972.		ditto at cbmvax.commodore.com



More information about the Comp.sys.att mailing list