html.mk

static html creation framework using make(1) and cpp(1)
Log | Files | Refs | README | LICENSE

commit 041b415cfb915e2f07c0be3200cfdfda63a54642
parent bd3bdf88c50da855400d443affb22f0bf4962d0a
Author: Kyle Milz <krwmilz@gmail.com>
Date:   Thu, 22 Jul 2021 22:18:43 +0000

man: update docs

The DESTDIR and TOP variables are no more; replace them with BSDSRCDIR and
BSDOBJDIR. The .include statement is more straightforward too.

Diffstat:
Mhtml.mk.5 | 68+++++++++++++++++++++++++++++++++++++++-----------------------------
1 file changed, 39 insertions(+), 29 deletions(-)

diff --git a/html.mk.5 b/html.mk.5 @@ -20,7 +20,7 @@ .Nm html.mk .Nd html.mk master Makefile fragment .Sh SYNOPSIS -.Fd .include mk/html.mk +.Fd .include <bsd.html.mk> .Sh DESCRIPTION .Nm contains a website creation framework using @@ -57,40 +57,30 @@ Not implemented. .It Cm depend Creates .Pa .depend -files for -.Xr make 1 -to read. +file from any dependencies found in files listed in the +.Ev SRCS +array. .It Cm obj See .Sx OUT OF TREE BUILDS . Create a directory structure identical to the one .Xr make 1 is currently operating in under -.Ev DESTDIR . +.Ev BSDOBJDIR . Symbolic links named .Pa obj are created in each source directory that point to the corresponding location in the destination tree. .El .Sh VARIABLES -All of these variables except -.Ev DESTDIR -are set in your Makefile. -.Ev DESTDIR -should be set in -.Pa mk/site.mk . +The following variables are to be set in your +.Pa Makefile . .Bl -tag -width Ds .It Ev CP_OBJ -An array of files that exist in this directory that should be copied into -.Pa obj/ . -Only useful for -.Sx OUT OF TREE BUILDS . -.It Ev DESTDIR -The location where a directory tree structure similar to the source tree -will be constructed, and linked to, by symbolic links from the source tree. -All generated intermediate and final files will be placed here. Only useful for .Sx OUT OF TREE BUILDS . +An array of files that exist in this directory that should be copied into +.Pa obj/ . .It Ev SRCS An array of input files that will be analyzed and transformed by .Nm . @@ -103,26 +93,46 @@ suffix. An array of directories that .Xr make 1 will enter after it is finished building in the current directory. -.It Ev TOP -A relative path to the root of the website where the file -.Pa mk/html.mk -is located. +.El +.Pp +The following variable can either be set in a site wide +.Pa site.mk +file or a +.Pa Makefile . +.Bl -tag -width Ds +.It Ev BSDSRCDIR +Only useful for +.Sx OUT OF TREE BUILDS . +An absolute path to the parent of the site root. +.It Ev BSDOBJDIR +Only useful for +.Sx OUT OF TREE BUILDS . +The location where a directory tree structure similar to the source tree +will be constructed, and linked to, by symbolic links from the source tree. +All generated intermediate and final files will be placed here. +.It Ev WOBJMASK +Only useful for +.Sx OUT OF TREE BUILDS . +The umask for any output files built. +.It Ev CPPFLAGS +Flags passed to all +.Xr cpp 1 +invocations, can be used for common include directories. .El .Sh OUT OF TREE BUILDS .Nm can create many intermediate and output files and it may be desirable to put them all in a different location. This is the idea behind an -out of tree build, and is similar to how other large C programs are built. +out of tree build, and is similar to how other programs are built. .Pp -To enable this feature -.Ic make obj -is called from the root of the website. A directory tree identical to the -one +This feature is enabled by calling the +.Ic obj +target. A directory tree identical to the current one .Xr make 1 knows about (through .Ev SUBDIR variables) will be created under -.Ev DESTDIR . +.Ev BSDOBJDIR . Any further intermediate or output files created will be placed there, instead of the current directory. .Sh INCLUDE SUFFIXES