Home | History | Annotate | Download | only in mk
History log of /src/share/mk/bsd.doc.mk
RevisionDateAuthorComments
 1.69  11-Apr-2025  rillig bsd.doc.mk: clean up

Remove the redundant location information from the .error directives, as
the .error directive provides the location by itself.

Fix typos in the print and spell targets, make the PRINTER variable
optional. The spell target still doesn't work due to the missing
spell.ok file. No idea where this file is supposed to come from.
 1.68  04-Aug-2015  dholland Remove CreationDate from the header of output postscript. Also, feed -n
to gzip when compressing so it doesn't store the timestamp in the file
header. For MKREPRO, but unconditional as the information omitted isn't
particularly useful. PR 50116.
 1.67  06-Jul-2014  dholland Add MKGROFFHTMLDOC and make it default to no. It seems that sometimes
when generating html groff runs netpbm behind your back. Needless to
say we don't have netpbm in base, so this fails on a clean install; so
for now disable generating html for /usr/share/doc by default.
Workaround for PR 48970.

It seems that all available document preparation toolchains are made
of fail.
 1.66  06-Jul-2014  dholland Don't install EXTRAHTMLFILES if MKHTML is "no".
 1.65  05-Jul-2014  dholland Rework /usr/share/doc.

Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
- explicit use of soelim
- refer
- tbl
- pic
- eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
 1.64  16-Mar-2006  jwise branches: 1.64.48; 1.64.60;
Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).
 1.63  29-Jan-2004  lukem Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.
 1.62  21-Oct-2003  lukem Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.
 1.61  19-Oct-2003  lukem support MAKEVERBOSE
 1.60  18-Jul-2003  lukem Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.
 1.59  10-Jul-2003  lukem Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO". The new variables are:
TOOL_ASN1_COMPILE TOOL_CAP_MKDB TOOL_CAT TOOL_CKSUM TOOL_COMPILE_ET
TOOL_CONFIG TOOL_CRUNCHGEN TOOL_CTAGS TOOL_DB TOOL_EQN TOOL_FGEN
TOOL_GENCAT TOOL_GROFF TOOL_HEXDUMP TOOL_INDXBIB TOOL_INSTALLBOOT
TOOL_INSTALL_INFO TOOL_M4 TOOL_MAKEFS TOOL_MAKEINFO TOOL_MAKEWHATIS
TOOL_MDSETIMAGE TOOL_MENUC TOOL_MKCSMAPPER TOOL_MKESDB
TOOL_MKLOCALE TOOL_MKMAGIC TOOL_MKTEMP TOOL_MSGC TOOL_MTREE
TOOL_PAX TOOL_PIC TOOL_PREPMKBOOTIMAGE TOOL_PWD_MKDB TOOL_REFER
TOOL_ROFF_ASCII TOOL_ROFF_DVI TOOL_ROFF_HTML TOOL_ROFF_PS
TOOL_ROFF_RAW TOOL_RPCGEN TOOL_SOELIM TOOL_SUNLABEL TOOL_TBL
TOOL_UUDECODE TOOL_VGRIND TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
TOOL_FOO?= foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
TOOL_FOO= ${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
 1.58  22-Oct-2002  perry Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.
 1.57  11-Feb-2002  mycroft Don't use .PHONY for targets that are actually installed. Instead use force
dependencies. (Among other things, `make -t install' does something vaguely
sensible now.)
 1.56  28-Nov-2001  tv Fix the :U's used with ${UPDATE} so that stray values don't get put into
the .PHONY: target.
 1.55  18-Nov-2001  bjh21 Need bsd.sys.mk for the GROFF definition in the non-USETOOLS case.
 1.54  12-Nov-2001  tv Major overhaul of src/tools and host toolchain. Summary of changes:

* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.

* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.
 1.53  02-Nov-2001  tv Improve readability and reduce redundant redundancy in share/mk; add some
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.

Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.

Reviewed by christos.
 1.52  14-Aug-2001  tv Change ROFF?= to be more like other utility macros; make this "groff -Tps"
by default.
 1.51  14-Aug-2001  tv Rather than explicitly saying "clean cleandir:" all the time, make clean
a dependency of cleandir (so that "make cleandir" implies "make clean").
 1.50  01-Jun-2001  tv Make "distclean" a REAL synonym for "cleandir" by actually aliasing it
in <bsd.own.mk>, rather than sprinkling it in all the .mk files (and
some Makefiles throughout the tree).
 1.49  08-May-2001  sommerfeld Suppress duplicate entries in ALLFILES, FILES, INCS, DEPINCS, INFOFILES,
NLSALL, CATPAGES, MANPAGES, HTMLPAGES, and SCRIPTS.
 1.48  06-Jun-2000  mycroft Abuse .USE some more.
 1.47  06-Jun-2000  mycroft Minor rearrangement.
 1.46  06-Jun-2000  mycroft Use ODE make(1) features to eliminate extra variables and move several things
outside of .for loops. (Needs more work to completely eliminate .for.)

XXX Don't look at this stuff. It will make your head hurt.
 1.45  28-Apr-2000  tron branches: 1.45.2;
Add "dependall" target.
 1.44  22-Jan-2000  mycroft Make `dependall' play nicely with SUBDIR, using a hack similar to `realinstall'
for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.
 1.43  04-Sep-1999  fredb Permit "make all install", as well as "make foo install" (where foo would be
installed by "make install") without setting of BUILD. All cases where BUILD
is already set are unchanged from the old behavior.

"make all install" is now practically equivalent to "make BUILD= all install",
but without actually setting build.

Fixes pr's 8313, 3894.
 1.42  21-Aug-1999  simonb Add ${INSTPRIV} to ${INSTALL} commands.
 1.41  12-Feb-1999  lukem branches: 1.41.2; 1.41.4;
* Add support for MKDOC MKLINKLIB MKLINT MKMAN MKNLS MKOBJ MKPIC MKPICINSTALL
MKPROFILE MKSHARE, which default to `yes' unless an equivalent NOxxx
variable is defined.
* Add MKCATPAGES, which if "no" prevents catpages from being built or installed

Users should use "MKxxx=no" instead of "NOxxx=" in /etc/mk.conf, because
this allows easy override on the make(1) command line (e.g 'make MKSHARE=yes'
to override MKSHARE=no in /etc/mk.conf).
 1.40  04-Feb-1999  christos PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added ${RENAME} flag to install, which when set
to -r installs on a temporary file and then renames to the final destination.
${RENAME} is currently set to nothing in bsd.own.mk, but one can turn it
on in /etc/mk.conf.
 1.39  29-Sep-1998  christos Missed a few preserve flags.
 1.38  27-Sep-1998  lukem don't build/install man pages or docs if NOSHARE defined
 1.37  09-Aug-1998  lukem add distclean as a synonym for cleandir
 1.36  21-Dec-1997  christos Add bsd.obj.mk and fix the rules to work with obj dirs.
 1.35  11-Oct-1997  mycroft Don't include bsd.obj.mk in these two files.
 1.34  11-Oct-1997  mycroft Several changes:
* Allow bsd.man.mk to be included separately.
* Always include bsd.own.mk and bsd.obj.mk.
* Include bsd.man.mk and bsd.nls.mk even if NOMAN or NONLS; just turn off
building of the affected files instead.
* Require bsd.subdir.mk to be included explicitly.
(Will make appropriate changes to Makefiles shortly.)
 1.33  28-Jun-1997  christos PR/3801: NAKAJIMA Yoshihiro: some documents are installed as executable
 1.32  09-May-1997  mycroft Automatically add the .c files corresponding to .l and .y files to DPSRCS.
Automatically add DPSRCS to CLEANFILES.
 1.31  07-May-1997  mycroft Add some dummy targets.
 1.30  07-May-1997  mycroft Don't use _SUBDIRUSE outside of bsd.subdir.mk.
 1.29  07-May-1997  mycroft Introduce a separate cleandoc target.
 1.28  07-May-1997  mycroft Various simplifications.
 1.27  06-May-1997  mycroft Make most of the install targets .PRECIOUS.
 1.26  06-May-1997  mycroft Add a pile of missing .PHONYs.
 1.25  15-Apr-1997  christos Make the `obj' target `.PHONY', so that does not get affected by .PATH/VPATH
This is not hurting things right now, and it will help things when path
searching for target nodes is enabled for make.
 1.24  29-Mar-1997  mikel merge lite-2 changes (mostly SCCSids)
 1.23  24-Mar-1997  christos make rules update:
- add UPDATE and BUILD features
- add new FILES, INCS, SCRIPTS variables
- allow man pages source installation
 1.22  17-Jan-1997  perry add NODOC -- if set, prevents installation of doc files
contributed by Brian de Alwis <bsdealwi@undergrad.math.uwaterloo.ca>
closes pr-2290 (per thorpej)
 1.21  18-Oct-1996  thorpej Use ${INSTALL} rather than "install".
From Simon J. Gerraty <sjg@zen.void.oz.au>, PR #1458.
 1.20  26-Jul-1994  mycroft Move the inclusion of bsd.own.mk to a better place.
 1.19  30-Jun-1994  cgd branches: 1.19.2;
RCSID frobbing, and minor sanity adjustments.
 1.18  19-Jun-1994  cgd Lite doc macros
 1.17  09-Feb-1994  cgd kill install -d's.
 1.16  24-Jan-1994  cgd change "PRINTER" to "PRINTER_TYPE" because people setenv PRINTER
 1.15  23-Aug-1993  mycroft Add empty `depend', `tags', and `lint' targets.
 1.14  15-Aug-1993  mycroft Move man rules to sys.mk.
Use bsd.subdir.mk for building subdirectories.
Don't forget to remove x.cc and x.C when using SHAREDSTRINGS.
Make ${PROG} always depend on ${LIBCRT0}.
Don't duplicate code between cleandir and clean.
Move tags target to bsd.dep.mk.
Move STRIP to bsd.own.mk.
Remove redundant definitions of {BIN,MAN}{DIR,GRP,OWN,MODE}.
Move {LIB,DOC}{DIR,GRP,OWN,MODE} defaults to bsd.own.mk.
 1.13  15-Aug-1993  mycroft Abstract out dependency stuff, and add RCS identifiers.
 1.12  15-Aug-1993  mycroft Create target directories with `install -d', and move `obj' targets into one
file.
 1.11  03-Aug-1993  mycroft Don't remove obj dir (or link) when doing `make cleandir'.
 1.10  29-Jul-1993  mycroft Don't print the `making ...' message if an obj dir already exists.
Also, a minor cleanup.
 1.9  04-Jul-1993  cgd allow docs to make an obj dir and build properly with it.
 1.8  09-Jun-1993  cgd make documentation build into ps files. this works, mostly...
 1.7  10-Apr-1993  cgd get rid of damned "d"foo
 1.6  09-Apr-1993  cgd oops; got rid of obj target -- that wasn't sensible!
 1.5  09-Apr-1993  cgd various changes to default make rules. from patch 101.
note that only the "sensible" changes in patch 101 are implemented.
 1.4  08-Apr-1993  cgd try to do the right thing, in terms making directories before we
install into them, and get the manpage cleans _OUT_ of "clean".
they don't belong there, only in cleandir, WFJ be damned.
 1.3  27-Mar-1993  nate Fixed the doc macros to call troff, eqn,and tbl instead of ditroff,
deqn, and dtbl.
Fixed make clean to remove the man pages (Bill fixed this in the distribution,
but not in the original source)
Changed install to leave the original file around, by using 'cp' instead of
'mv'. "install -c ..."
 1.2  23-Mar-1993  cgd added obj target so that docs make (well, actually don't make) obj dirs
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  29-Mar-1997  mikel import 4.4BSD-Lite2 versions
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.19.2.1  26-Jul-1994  cgd from trunk.
 1.41.4.1  10-Aug-1999  mcr added Makefile flag "MORTALINSTALL" which removes -o/-g from
install arguments:
MORTALINSTALL If "yes", then omit setting group and ownership on
all files that are installed. This can be used to
permit non-root to install files, particularly
useful when working across NFS, or when $DESTDIR
is local. Do not use on production systems.

This relates to PR bin/3563.
These files are being checked into a branch because I want
them carefully reviewed by various parties, and because they
are not fully tested.
 1.41.2.1  10-Sep-1999  he Pull up revision 1.43:
Allow natural use of multiple "make" targets in the main tree
without setting BUILD, fixing PR#8313 and PR#3894.
 1.45.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.64.60.1  10-Aug-2014  tls Rebase.
 1.64.48.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.

RSS XML Feed