History log of /freebsd-current/share/mk/bsd.man.mk
Revision Date Author Comments
# d2a824c2 14-Mar-2024 Warner Losh <imp@FreeBSD.org>

share/mk: Don't install only differing in case files on case insensitive fs

MacOS has case insensitive filesystems by default. So trying to link
between foo.X and FOO.X causes an error of some sort since we unlink the
old foo file destroying the newly installed foo due to the insensitive
nature of the FS. Assume that this is true on darwin/macos, though it is
only try by default there.

Perhaps install should grow smarts to know when this is the case, though
that looked much trickier. There didn't seem to be a flag to check. This
would be better, imho, since we could still write the METALOG data
correctly (images created from these metalogs are imperfect due to this
relatively issue...).

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D44347


# 4d08b569 30-Dec-2023 Simon J. Gerraty <sjg@FreeBSD.org>

bsd.man.mk allow staging compressed pages

In the DIRDEPS_BUILD we use staging.
The staging logic in bsd.man.mk was in the wrong place, shift it
and add compressed man pages to the stage set if appropriate.

Reviewed by: stevek
Differential Revision: https://reviews.freebsd.org/D43238


# ea9a7058 22-Oct-2023 Simon J. Gerraty <sjg@FreeBSD.org>

bsd.man.mk guard against empty vars in MLINKS

share/man/man4/Makefile adds a number of
variables to MAN and MLINKS, which are only set for
certain architectures.

The empty variables wreak havoc when := is used.

Add :M*.[1-9] to MLINKS reference for STAGE_LINKS.mlinks
to avoid invalid results.

Reviewed by: stevek


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# c7e6cb9e 16-Mar-2021 Emmanuel Vadot <manu@FreeBSD.org>

pkgbase: Add an src.conf option for splitting man pages

Man pages can be big in total, add an options to split man pages
in -man packages so we produce smaller packages.
This is useful for small jails or mfsroot produced of pkgbase.
The option is off by default.

Reviewed by: bapt, Mina Galić <me@igalic.co>
Differential Revision: https://reviews.freebsd.org/D29169
MFC after: 2 weeks


# fa8c921e 29-Jun-2018 Brooks Davis <brooks@FreeBSD.org>

Correct link metadata created when installing with -DNO_ROOT.

Explicitly specify owner/group/mode metadata when creating links.

More consistently use INSTALL_SYMLINK to install symlinks.

Reviewed by: bdrewery
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11231


# 5852ae2d 03-Jun-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Revert r301079.

This breaks cross-building with WITH_META_MODE since it will rebuild
'build-tools' during the 'everything' phase.

A more proper fix is coming to bmake to implicitly require .META unless
.NOMETA (and other restrictions) are in place.


# 28849c57 31-May-2016 Bryan Drewery <bdrewery@FreeBSD.org>

WITH_META_MODE: Mitigate switching from without to with META_MODE.

Adding .META to targets-to-build will ensure that they will rebuild if there
is no .meta file.

Adding it to all SUFFIXES and objects ensures that at least objects will
rebuild if there is no .meta file.

This will be reverted if bmake's behavior changes to rebuild on missing .meta
files.

Sponsored by: EMC / Isilon Storage Division


# f1702f87 26-Feb-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Remove _manpages and _maninstall targets as they are no longer needed.

r96164 added them to avoid recursing twice with _SUBDIR. That issue was
fixed in bsd.subdir.mk in r291635 for all targets.

Sponsored by: EMC / Isilon Storage Division


# 5f3a77a5 03-Feb-2016 Bryan Drewery <bdrewery@FreeBSD.org>

MLINKS: Deduplicate some of the logic, simplify, and unhide install commands.

Sponsored by: EMC / Isilon Storage Division


# 88612bc6 03-Feb-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Fix cat files being installed to wrong place since r284685.

Sponsored by: EMC / Isilon Storage Division


# c22afe52 22-Oct-2015 Bryan Drewery <bdrewery@FreeBSD.org>

Fix installation of manpages with WITHOUT_COMPRESS broken since r284685.

This partially reverts r284685. An attempt was made in r285295 to fix this
but was not enough. There were still $${} vars in the code that should have
been using the ${_page} and ${_sect} vars, but the bigger problem was that
.for cannot be used on .ALLSRC as it is not defined when the .for is evaluated.

Using ${MAN} here in a .for loop doesn't work either as the paths are not
expanded right for lib/libc/ subdirs despite having a .PATH set for all
of them.

Add some comments around long .else and .endif as well.

Sponsored by: EMC / Isilon Storage Division


# 61c20fc7 15-Oct-2015 Bryan Drewery <bdrewery@FreeBSD.org>

Make installing to a non-existent directory an error.

Before this, if a file was installed to DESTDIR/some/dir and that directory
was missing due to not having ran 'make distrib-dirs' yet, the file would
be installed as 'some/dir'. For something like bsd.incs.mk with INCLUDEDIR
being a sub-directory of /usr/include, this could result in all of the headers
being installed to a file rather than getting a directory of them.

Now it will error that the file/directory does not exist rather than hide
the issue.

Another option being discussed is to implement GNU's install -D flag which
would auto create any missing directories.

This is a mitigation of the problem. The proper order to the build is to
run 'make distrib-dirs' first, but that can be forgotten if building from
a sub-directory after updating the source code to the latest revision.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division


# eef72759 06-Oct-2015 Simon J. Gerraty <sjg@FreeBSD.org>

In jobs mode we can use .ORDER to force stage_links to run after other
stage_* targets.
In non-jobs mode we can achieve the same result by simply introducing
the targets in the correct order.
Thus in bsd*.mk we simply add targets to STAGE_TARGETS which we
realize in meta.stage.mk

Reviewed by: bdrewery


# f9b9c070 08-Jul-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Fix typo which breaks build of manpages when WITHOUT_MANCOMPRESS is set

PR: 201153
Reported by: Andriy Voskoboinyk <s3erios@gmail.com>


# a82117a6 21-Jun-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Simplify code to install manpages and it symlinks

Use the bmake's .for multi variable loops to simplify and make the code more
readable


# 924b88f6 08-Jun-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Watchout for bogus MAN


# 1e344376 04-Jun-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Add dependent option STAGING_MAN/STAGING

Use a single mlinks set, since some libs (eg. libc) do cross section
links.


# 8bf4a1b8 31-May-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Handle multiple sections in MLINKS


# 09cdd180 30-May-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Stage man pages.


# dc6d22c9 12-Feb-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Makes it more flexible to tag and define a target package


# 25998b2a 10-Feb-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Tag the metalog with a global default sets of tags that will be used to decide
what will go in which package, more finer grain tagging to come


# 0df7827e 02-Jan-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Use mandoc to generate cat pages


# 2f335df9 02-Jan-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Use mandoc -Tlint instead of groff for manlint target


# 0abe2561 18-Apr-2014 Warner Losh <imp@FreeBSD.org>

Convert NO_MANCOMPRESSED to MK_MANCOMPRESSED.


# a0f4cb1e 13-Apr-2014 Warner Losh <imp@FreeBSD.org>

r264402 builds fine, but turns out there are problems with
install. Back it out until they can be tracked down.


# 5bce9711 12-Apr-2014 Warner Losh <imp@FreeBSD.org>

Convert NO_MANCOMPRESS to normal convention.


# 12dd8cb1 21-Jan-2013 Brooks Davis <brooks@FreeBSD.org>

Replace all known uses of ln in the build process with appropriate
install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
variables.

Sponsored by: DARPA, AFRL
Reviewed by: ian, ray, rpaulo


# 8b4f1f91 16-Jan-2013 Brooks Davis <brooks@FreeBSD.org>

Remove support for installing 1aout section manpages.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 5b83a06c 12-Mar-2007 Ruslan Ermilov <ru@FreeBSD.org>

Stop clobberring the application namespace with local
variables such as "sect", "page", and "target"; use
underscored versions instead.

Discussed with: kan
MFC after: 3 days


# d966048e 06-Jan-2005 Kirill Ponomarev <krion@FreeBSD.org>

Remove trailing spaces.


# 9a9bc31f 21-Dec-2004 Ruslan Ermilov <ru@FreeBSD.org>

NOMLINKS -> NO_MLINKS


# e653b48c 21-Dec-2004 Ruslan Ermilov <ru@FreeBSD.org>

Start the dreaded NOFOO -> NO_FOO conversion.

OK'ed by: core


# 68de25dd 06-Sep-2003 Ruslan Ermilov <ru@FreeBSD.org>

Implement sed(1) commands using the make(1)'s RE variable modifier.
(This almost eliminates the need of a sed(1) during installworld.)


# b17996a4 18-Oct-2002 Ruslan Ermilov <ru@FreeBSD.org>

Revert last delta. SGR support in grotty(1) is disabled system-wide
in /usr/share/tmac/troffrc pending the issue resolution on -arch.


# 65b1f0f7 11-Oct-2002 Ruslan Ermilov <ru@FreeBSD.org>

Groff 1.18.1 comes in with ANSI color support, enabled by default.
In "nroff" mode, italic font renders as an underlined text, which
makes it indistinguishable from the bold text on color monitors
(cons25 terminal type), yet it requires the less(1)'s -R option.
(Refer to the new grotty(1) manpage for details.)

So turn off the color support for now (when generating catpages),
until we figure out what do we do with this new feature. I have
a patch for grotty(1) that tells it to use the "reverse video"
attribute to render the italic font. Once this is accepted, we
can turn color support back on (if there won't be any objections
from the community).


# 81c06103 20-Aug-2002 Ruslan Ermilov <ru@FreeBSD.org>

Allow one to override ${MINSTALL} in /etc/make.conf.

Prompted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>


# d2893b16 29-Jul-2002 Ruslan Ermilov <ru@FreeBSD.org>

Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by: bde


# 8f08b6b2 13-May-2002 Ruslan Ermilov <ru@FreeBSD.org>

Ensure manpages are built with the all-man in the
NOMANCOMPRESS && !MANFILTER && !MANBUILDCAT case.

PR: bin/37360
Prodded by: cjc


# afeaaa84 07-May-2002 Ruslan Ermilov <ru@FreeBSD.org>

Added internal, non-recursive (SUBDIR) versions of the `all-man'
and `maninstall' targets. This fixes the issue where each subdir
was descended into twice during "make all", and also resurrects
the standardization of `maninstall'.

Urged by: bde


# b25a566d 23-Apr-2002 Ruslan Ermilov <ru@FreeBSD.org>

Merge bsd.obj.mk's version of the _SUBDIR target with bsd.subdir.mk.

Ensure all standard targets honor SUBDIR. Now `make obj' descends into
SUBDIRs even if NOOBJ is set (some descendants may still need an object
directory, but we do not have such precedents). Now `make install' in
non-bsd.subdir.mk makefiles runs `afterinstall' target _after_ `install'
in SUBDIRs, like we do in bsd.subdir.mk. Nothing depended on the wrong
order anyway.

Fixed `distribute' targets (except for the bsd.subdir.mk version) so that
they do not depend on _SUBDIR; `distribute' calls `install' which already
depends on _SUBDIR.

De-standardize `maninstall', otherwise manpages would be installed twice.
(To be revised later.)


# 2bdaf7e8 17-Apr-2002 Ruslan Ermilov <ru@FreeBSD.org>

Don't include bsd.own.mk from sys.mk, this makes it impossible
to use ``.if defined()'' inside bsd.own.mk to test for defines
in individual makefiles. For example, setting DEBUG_FLAGS in
Makefile didn't take the desired effect on the STRIP assignment.

Added bsd.init.mk (like in NetBSD) that handles the inclusion
of ../Makefile.inc and bsd.own.mk from all bsd.*.mk files that
"build something".

Back out bsd.own.mk,v 1.15: moved OBJFORMAT initialization back
to sys.mk (several source tree makefiles want to check it early)
and removed MACHINE_ARCH initialization (it's hard to see from
looking at the commitlogs what the problem was at the time, but
now it serves no purpose).

Prohibit the direct inclusion of bsd.man.mk and bsd.libnames.mk.

Protect bsd.obj.mk from repetitive inclusion. Prohibiting the
direct inclusion of bsd.obj.mk might be a good idea too.


# d0a19329 16-Apr-2002 Ruslan Ermilov <ru@FreeBSD.org>

Revert to the ordinary `:' dependency operator for `mainstall'.
Revision 1.7 had "maninstall::" inside a loop. Revision 1.36
unrolled the loop.

Reviewed by: bde


# a5772968 15-Apr-2002 Ruslan Ermilov <ru@FreeBSD.org>

Fix all-man to look into the SUBDIR subdirs as well.


# 80503035 05-Sep-2001 Ruslan Ermilov <ru@FreeBSD.org>

There is a better way to suppress groff(1) output.

Submitted by: okazaki


# 59e44d72 05-Sep-2001 Ruslan Ermilov <ru@FreeBSD.org>

Implement the `manlint' target, for minimal validity checking of
the manual pages. Mostly useful with mdoc(7) formatted manuals.

Requested by: murray


# b19ea0bb 12-Jul-2001 Ruslan Ermilov <ru@FreeBSD.org>

Always preprocess manpages with tbl(1).


# 9b031443 30-May-2001 Ruslan Ermilov <ru@FreeBSD.org>

Do not clobber COPY, it may be set differently in /etc/make.conf.

This is not the problem for NOMANCOMPRESS, as install(1) does not
delete the originals anymore (-c is the default now).


# d1a0f91d 17-Apr-2001 Ruslan Ermilov <ru@FreeBSD.org>

Add missing -mtty-char for MANBUILDCAT.


# 09fa52f8 28-Mar-2001 Ruslan Ermilov <ru@FreeBSD.org>

- Removed `n' from the list of manpage sections.

- Only support the old syntax for manpage declarations
(MAN1...MAN9) if no MAN is defined.


# 862d3dea 26-Mar-2001 Ruslan Ermilov <ru@FreeBSD.org>

Removed _MANPAGES, MANDEPEND and MANSRC.

Added MAN which will eventually replace MAN[0-9] and MAN1aout.
For now, the old syntax is still supported.

Reviewed by: bde


# 0a3a9126 23-Feb-2001 Ruslan Ermilov <ru@FreeBSD.org>

Make ``groff -man'' work again for both man(7) and mdoc(7) manpages.
The new Groff release will support this feature.

Requested by: peter


# 4c5804ea 06-Dec-2000 Ruslan Ermilov <ru@FreeBSD.org>

Install the stock (as supplied by groff(1) distribution) tmac.an
and tmac.andoc files. The man(1), catman(1) and bsd.man.mk have
been modified to call groff(1) with -mandoc argument.


# fe409e49 05-Dec-2000 Ruslan Ermilov <ru@FreeBSD.org>

groff does not use MANDEPEND anymore.


# 1663ea58 20-May-2000 Tim Vanderhoek <hoek@FreeBSD.org>

Typo in comments explaining what MAN_FILTER is.


# 7f3dea24 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# def151a8 09-Sep-1998 Bruce Evans <bde@FreeBSD.org>

Backed out rev.1.28. It was bogus because bsd.man.mk is only used
(and only usable) by other .mk files that have their own multiple
inclusion protection.


# c908270e 06-Sep-1998 John Birrell <jb@FreeBSD.org>

Add a man section 1aout for the legacy man files to avoid them being
installed over the ones from binutils.


# e0301e5d 08-Aug-1998 Peter Wemm <peter@FreeBSD.org>

Make ../Makefile.inc handling more consistant to prevent multiple includes
when certain .mk files include other .mk files. This will remove the
need for multiple include protection in some other makefiles around the
tree (and helps some elf conditionals).


# 55137cdb 27-Apr-1998 Bruce Evans <bde@FreeBSD.org>

Don't include ../Makefile.inc here. bsd.man.mk is always included
in another .mk file which has already included ../Makefile.inc, so
including ../Makefike.inc again mainly messed up `+=' definitions.


# 70e244f8 09-Nov-1997 Wolfram Schneider <wosch@FreeBSD.org>

Remove the comments hat just list the nested includes.
The lists don't provide significantly more information than
grep '\.include', and grep gives lists that are actually correct.
Submitted by: Bruce


# 5d08f311 25-Jul-1997 Bruce Evans <bde@FreeBSD.org>

Don't use !empty() on the potentially unset variable MANBUILDCAT. Using
it broke "everything" unless MANBUILDCAT was set.


# 87d75709 25-Jul-1997 Bruce Evans <bde@FreeBSD.org>

Removed a stray `.if' that broke everything.


# 5191ded8 24-Jul-1997 Paul Traina <pst@FreeBSD.org>

Allow optional building of preformatted manual pages.
Reviewed by: wosch


# 7c0c241d 19-Apr-1997 Bruce Evans <bde@FreeBSD.org>

Updated comment about MANDEPEND (it was misplaced in bsd.prog.mk).


# f7ea12a0 08-Mar-1997 Wolfram Schneider <wosch@FreeBSD.org>

Add new variables COMPRESS_CMD and COMPRESS_EXT.

bsd.doc.mk:
rename GZIPCMD to DCOMPRESS_CMD, add DCOMPRESS_EXT
bsd.info.mk:
rename GZIPCMD to ICOMPRESS_CMD, add ICOMPRESS_EXT
set INFOTMPL to ${INFODIR}/dir-tmpl
bsd.man.mk
rename ZEXTENSION to MCOMPRESS_EXT, MCOMPRESS to MCOMPRESS_CMD


# b97fa2ef 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# d4be2259 16-Feb-1997 Wolfram Schneider <wosch@FreeBSD.org>

Remove unsupported man section 3f


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 236fc12a 26-Dec-1996 Wolfram Schneider <wosch@FreeBSD.org>

add new variable NOMLINKS
NOMLINKS If you do not want install manual page links. [not set]


# eb0085f4 16-Sep-1996 Peter Wemm <peter@FreeBSD.org>

Workaround to (hopefully) fix the NOMANCOMPRESS case of the MANFILTER-using
man pages (eg: named/bind/etc). In order to get (say) dig.1 to pass
through the filter and produce a new dig.1 for installing, I used an
intermediate file at build time, similar to the way the .gz man pages are
built.

I've not extensively tested this, but it seems to work for the known
cases where it was failing, and it only affects the NOMANCOMPRESS case
which was already broken.

Pointed out by: "Ph. Charnier" <charnier@xp11.frmug.org>, PR#1612


# 5e7d3aff 26-Aug-1996 Peter Wemm <peter@FreeBSD.org>

Use MANFILTER everywhere instead of a couple of MANFILT typos..


# d5dcd8e6 10-Aug-1996 Peter Wemm <peter@FreeBSD.org>

Add a hook ``MANFILTER''. This optionally specifies a command to
pipe the man page source through before compressing or installing.
This can be used to do do (eg) sed substitution on man pages from
3rd party packages (in particular, ncurses and bind-4.9.4)

This should not affect anything already in the source tree.


# e767093f 22-Jun-1996 Poul-Henning Kamp <phk@FreeBSD.org>

Add man-page section 'n' and LIBTCL macro.


# 53996fad 25-May-1996 Wolfram Schneider <wosch@FreeBSD.org>

Add some comments for variables and targets.


# d8982a6a 25-May-1996 Wolfram Schneider <wosch@FreeBSD.org>

speedup MLINKS


# bd063a9d 09-Apr-1996 Wolfram Schneider <wosch@FreeBSD.org>

Add variable ``_MANPAGES'' This will be replace the
.if !defined(MAN1) && !defined(MAN2) ... orgy in bsd.prog.mk and
bsd.kmod.mk


# 9c6fe31f 23-Mar-1996 Wolfram Schneider <wosch@FreeBSD.org>

delete MANGRP?=, MANOWN?=, MANMODE?=, MANDIR?=


# 429544bb 14-Dec-1995 Bruce Evans <bde@FreeBSD.org>

Added `9' to ${SECTIONS}.


# eb896871 21-Oct-1995 Bruce Evans <bde@FreeBSD.org>

Fix maninstall target for the NOMANCOMPRESS case. The previous revision
failed when there was an obj directory. Use .PATH.n for installing too
so that make can find the source files. This allows the source files to
be in several directories (the old method using cd only works well for
a single directory). The dependencies are on the source files even for
the compressed case, although it would be more flexible to depend on the
files being installed, so that `make install' doesn't attempt to build
things

Force COPY to -c for the NOMANCOMPRESS case. Then the files to be installed
are always sources, so they must not be moved.


# e8f9a073 14-Oct-1995 Bruce Evans <bde@FreeBSD.org>

Fix the support for MANSRC (it was broken by the compression changes):
use .PATH.n to get the dependencies right and to avoid some shell tests.

Remove bogus dependency of individual compressed man pages on MANDEPEND.

Use for loops to avoid duplicated code.

Combine some rm steps in installation of links. Linking still takes too
long.


# 973f098a 02-Oct-1995 Garrett Wollman <wollman@FreeBSD.org>

Compress manual pages (if desired) in the obj directory rather
than in the installation destination. Should make release-building
substantially faster. The msun Makefile changes simple adapt to the new
scheme.


# c7499507 27-Dec-1994 Andrey A. Chernov <ache@FreeBSD.org>

Move INSTALL?=install line duplicated into each .mk to sys.mk
instead


# 80c02d59 28-Aug-1994 Bruce Evans <bde@FreeBSD.org>

Use ${ECHO} instead of `echo' so that `make -s' is fairly quiet.


# 3585b293 04-Aug-1994 Garrett Wollman <wollman@FreeBSD.org>

Spplat our 1.1.5 `mk' ifiles over the top of the 4.4 ones. So far
as I can tell, this is ts the right thing to do.


# afe61c15 30-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Share Sources