Subject: Re: Makefile structure in htdocs
To: None <>
From: Roland Illig <>
List: netbsd-docs
Date: 10/09/2005 18:48:51
Roland Illig wrote:
> Couldn't we put the detection of the correct WEB_PREFIX into 
> share/mk/ That way, we would save one line in every 
> Makefile. And then, could also test for any on 
> the way from ${.CURDIR} downto ${WEB_PREFIX}.

This patch implements the above paragraph. The only that 
needs to be modified is the one in ${WEB_PREFIX}, as the others only 
contain conditional definitions.

The effect is that in every directory that includes the top-level directly, a warning is printed. These Makefiles should then 
be converted not to include any at all, as all the work 
will be done inside

If this patch should be committed, the <filename>Makefile</filename>s 
and <filename></filename>s can be refactored as follows:

- The path name to should not use ${WEB_PREFIX}, as this 
variable will not be defined until the file is parsed. 
Instead, it should be written as "../../share/mk/" in all 
directories that are two levels under ${WEB_PREFIX}. You can guess what 
it looks like for other directories. ;)

- Any .include lines to "" can be removed.

- Any "" that only sets WEB_PREFIX can be removed.

When all the Makefiles are converted properly, the multiple-inclusion 
guards can be removed to make the two patched files more readable again.