*BSD News Article 4875


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!uunet!mcsun!sun4nl!eur.nl!pk
From: pk@cs.few.eur.nl (Paul Kranenburg)
Subject: Re: 386bsd: elvis won't compile
Message-ID: <1992Sep11.110750.24748@cs.few.eur.nl>
Sender: news@cs.few.eur.nl
Reply-To: pk@cs.few.eur.nl
Organization: Erasmus University Rotterdam
References: <1992Sep8.185716.23623@hippo.ru.ac.za> <BuA04M.J6H@ibmpcug.co.uk>
Date: Fri, 11 Sep 1992 11:07:50 GMT
Lines: 35

In <BuA04M.J6H@ibmpcug.co.uk> adrian@ibmpcug.co.uk (Adrian Hall) writes:

>In article <1992Sep8.185716.23623@hippo.ru.ac.za> ccml@hippo.ru.ac.za (Mike Lawrie) writes:
>>In /usr/src/usr.bin/elvis, I type "make" and end up with the message
>>
>>	make: obj: No such file or directory
>>
>>There is a link /usr/src/usr.bin/elvis/obj->/usr/obj/contrib/elvis-1.5,
>>but there is not even a directory /usr/obj/contrib.
>>

>Ummmm

>	mkdir -p /usr/obj/contrib/elvis-1.5

>Seriously though (sorry if I assumedyou didnt know the usage of the
>mkdir command!), there are a lot of directories under /usr/othersrc
>which ask for obj dirs and do not have one. The appropriate mkdir -p
>clears it up, so it is no great problem.

There is a related problem with make if you try to overrule the object
directory by setting the environment var MAKEOBJDIR. If I set it to "."
(doing "setenv MAKEOBJDIR ." or just "setenv MAKEOBJDIR"), make will
erroneously set its variable ${.CURDIR} to "..", causing a number of
Makefiles to get confused. A look at the code (right at the beginning
of main()) reveales that any value of MAKEOBJDIR that does not evaluate
to a subdirectory of the current directory (in which make was started)
will cause this error to show up.

A quick fix would be to change the line (#358, main.c)
	if (S_ISDIR(sb.st_mode))
to
	if (S_ISDIR(sb.st_mode) && !strcmp(path, _PATH_OBJDIR))

-pk