Make & .cshrc

Andrew Klossner andrew at frip.gwd.tek.com
Tue Sep 13 13:47:34 AEST 1988


> I have a problem with make and the c-shell. My login shell is the
> cshell and here is a copy of my .cshrc:
>   ...
> alias cd cd \!\* \; set prompt = '\[33m\[1m\($USER at sleepy\)`pwd`$DEPTH\ \[32m'
>   ...
> On my Uport V.3, if you create the following makefile
>
> fred:
>	cd .. ; date
>
> and type 'make fred', you get the the date as expected, but you
> also get an extra prompt.

This is one of those well-known but undocumented csh problems.  The
solution is, in your .cshrc, put the "alias cd" and any setting of
$prompt under

if ($?prompt) then
	alias cd ...
	set prompt=...
endif

Csh only sets $prompt for an interactive shell.  It's also a good idea
to put other interactive-only work, like running tset or setting
EDITOR, here, to speed up csh script processing (assuming you don't
instead put it in .login).

Although I'm a rabid csh user, it's my personal opinion that a "make"
that doesn't always use /bin/sh (apparently this one depends on $SHELL)
is broken.

  -=- Andrew Klossner   (decvax!tektronix!tekecs!andrew)       [UUCP]
                        (andrew%tekecs.tek.com at relay.cs.net)   [ARPA]



More information about the Comp.unix.wizards mailing list