Subject: Re: Makefile structure in htdocs
To: Klaus Heinz <k.heinz.okt.fuenf@onlinehome.de>
From: Roland Illig <rillig@NetBSD.org>
List: netbsd-docs
Date: 10/09/2005 15:14:36
Klaus Heinz wrote:
> Roland Illig wrote:
>
> [ Makefile.inc weirdness ]
>
> IMO, inclusion of all those Makefile.inc files is not necessary at all.
> The last time I looked at this I could not find any useful content for
> Makefile.inc apart from pkgsrc/Makefile.inc and pkgsrc/??/Makefile.inc.
I couldn't find any, too.
> Just set WEB_PREFIX and include the appropriate top-level Makefile.inc.
> For de/errors/Makefile this would look like:
>
> WEB_PREFIX?= ${.CURDIR}/../..
> .include "${WEB_PREFIX}/de/Makefile.inc"
Couldn't we put the detection of the correct WEB_PREFIX into
share/mk/web.site.mk? That way, we would save one line in every
Makefile. And then, web.site.mk could also test for any Makefile.inc on
the way from ${.CURDIR} downto ${WEB_PREFIX}.
It would then be possible to strip out all the .include
"../Makefile.inc" lines from the Makefiles. I would put a comment into
htdocs/README.txt, that the <filename>Makefile.inc</filename>s are
included automatically, to avoid confusion with new developers.
Roland