freebsd-dev/share/mk/bsd.own.mk
Ruslan Ermilov 2bdaf7e81c 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.
2002-04-17 13:49:29 +00:00

193 lines
4.2 KiB
Makefile

# $FreeBSD$
#
# The include file <bsd.own.mk> set common variables for owner,
# group, mode, and directories. Defaults are in brackets.
#
#
# +++ variables +++
#
# DESTDIR Change the tree where the file gets installed. [not set]
#
# DISTDIR Change the tree where the file for a distribution
# gets installed (see /usr/src/release/Makefile). [not set]
#
#
# COPY The flag passed to the install program to cause the binary
# to be copied rather than moved. This is to be used when
# building our own install script so that the entire system
# can either be installed with copies, or with moves using
# a single knob. [-c]
#
# COMPRESS_CMD Program to compress documents.
# Output is to stdout. [gzip -cn]
#
# COMPRESS_EXT File name extension of ${COMPRESS_CMD} command. [.gz]
#
# STRIP The flag passed to the install program to cause the binary
# to be stripped. This is to be used when building your
# own install script so that the entire system can be made
# stripped/not-stripped using a single knob. [-s]
#
# OBJFORMAT Default object format that selects which set of tools to run.
# [elf]
#
# BINOWN Binary owner. [root]
#
# BINGRP Binary group. [wheel]
#
# BINMODE Binary mode. [555]
#
# NOBINMODE Mode for non-executable files. [444]
#
# INCOWN Include owner. [root]
#
# INCGRP Include group. [wheel]
#
# INCMODE Include mode. [444]
#
# INCDIR Base path for include files. [/usr/include]
#
# LIBDIR Base path for libraries. [/usr/lib]
#
# LIBCOMPATDIR Base path for compat libraries. [/usr/lib/compat]
#
# LIBDATADIR Base path for misc. utility data files. [/usr/libdata]
#
# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint]
#
# SHLIBDIR Base path for shared libraries. [${LIBDIR}]
#
# LIBOWN Library mode. [${BINOWN}]
#
# LIBGRP Library group. [${BINGRP}]
#
# LIBMODE Library mode. [${NOBINMODE}]
#
#
# KMODDIR Base path for loadable kernel modules
# (see kld(4)). [/boot/kernel]
#
# KMODOWN KLD owner. [${BINOWN}]
#
# KMODGRP KLD group. [${BINGRP}]
#
# KMODMODE KLD mode. [${BINMODE}]
#
#
# SHAREDIR Base path for architecture-independent ascii
# text files. [/usr/share]
#
# SHAREOWN ASCII text file owner. [root]
#
# SHAREGRP ASCII text file group. [wheel]
#
# SHAREMODE ASCII text file mode. [${NOBINMODE}]
#
#
# DOCDIR Base path for system documentation (e.g. PSD, USD,
# handbook, FAQ etc.). [${SHAREDIR}/doc]
#
# DOCOWN Documentation owner. [${SHAREOWN}]
#
# DOCGRP Documentation group. [${SHAREGRP}]
#
# DOCMODE Documentation mode. [${NOBINMODE}]
#
#
# INFODIR Base path for GNU's hypertext system
# called Info (see info(1)). [${SHAREDIR}/info]
#
# INFOOWN Info owner. [${SHAREOWN}]
#
# INFOGRP Info group. [${SHAREGRP}]
#
# INFOMODE Info mode. [${NOBINMODE}]
#
#
# MANDIR Base path for manual installation. [${SHAREDIR}/man/man]
#
# MANOWN Manual owner. [${SHAREOWN}]
#
# MANGRP Manual group. [${SHAREGRP}]
#
# MANMODE Manual mode. [${NOBINMODE}]
#
#
# NLSDIR Base path for National Language Support files
# installation. [${SHAREDIR}/nls]
#
# NLSOWN National Language Support files owner. [${SHAREOWN}]
#
# NLSGRP National Language Support files group. [${SHAREGRP}]
#
# NLSMODE National Language Support files mode. [${NOBINMODE}]
#
# INCLUDEDIR Base path for standard C include files [/usr/include]
# Binaries
BINOWN?= root
BINGRP?= wheel
BINMODE?= 555
NOBINMODE?= 444
INCOWN?= root
INCGRP?= wheel
INCMODE?= 444
INCDIR?= /usr/include
KMODDIR?= /boot/kernel
KMODOWN?= ${BINOWN}
KMODGRP?= ${BINGRP}
KMODMODE?= ${BINMODE}
.if ${OBJFORMAT} == aout
LIBDIR?= /usr/lib/aout
.else
LIBDIR?= /usr/lib
.endif
LIBCOMPATDIR?= /usr/lib/compat
LIBDATADIR?= /usr/libdata
LINTLIBDIR?= /usr/libdata/lint
SHLIBDIR?= ${LIBDIR}
LIBOWN?= ${BINOWN}
LIBGRP?= ${BINGRP}
LIBMODE?= ${NOBINMODE}
# Share files
SHAREDIR?= /usr/share
SHAREOWN?= root
SHAREGRP?= wheel
SHAREMODE?= ${NOBINMODE}
MANDIR?= ${SHAREDIR}/man/man
MANOWN?= ${SHAREOWN}
MANGRP?= ${SHAREGRP}
MANMODE?= ${NOBINMODE}
DOCDIR?= ${SHAREDIR}/doc
DOCOWN?= ${SHAREOWN}
DOCGRP?= ${SHAREGRP}
DOCMODE?= ${NOBINMODE}
INFODIR?= ${SHAREDIR}/info
INFOOWN?= ${SHAREOWN}
INFOGRP?= ${SHAREGRP}
INFOMODE?= ${NOBINMODE}
NLSDIR?= ${SHAREDIR}/nls
NLSOWN?= ${SHAREOWN}
NLSGRP?= ${SHAREGRP}
NLSMODE?= ${NOBINMODE}
INCLUDEDIR?= /usr/include
# Common variables
.if !defined(DEBUG_FLAGS)
STRIP?= -s
.endif
COPY?= -c
COMPRESS_CMD?= gzip -cn
COMPRESS_EXT?= .gz