Date: Sun, 30 Nov 2008 16:30:27 +0100 From: Hartmut Brandt <hartmut.brandt@dlr.de> To: Eitan Adler <eitanadlerlist@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: change to make - error when Makefile doesn't exist Message-ID: <4932B193.7030106@dlr.de> In-Reply-To: <49320219.4070804@gmail.com> References: <49320219.4070804@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Eitan Adler wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I stupidly forgot to make a backup so I can't provide a diff but in
> src/usr.bin
> I changed
> TryReadMakefile("Makefile");
> to
> if (!TryReadMakefile("Makefile"))
> Fatal("Makefile could not be opened");
> That way you could differentiate between the Makefile not existing and
> the target not existing.
>
> gmake provided the following error message:
> gmake: *** No targets specified and no makefile found. Stop.
>
>
It is perfectly valid to have no makefile yet to run make. Make has a
number of builtin rules. If, for example, you have a file x.c then 'make
x' or 'make x.o' make will cause make to compile x.c even without a
makefile. But if you have no Makefile, you must specify a target.
Otherwise how would make know what to make? So the error message is
quite exact: it is an error to have no makefile AND to specify no target.
harti
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4932B193.7030106>
