This represents a major update to the buildworld subsystem.
[dragonfly.git] / share / mk / bsd.own.mk
1 # $FreeBSD: src/share/mk/bsd.own.mk,v 1.27.2.4 2002/07/22 14:21:51 ru Exp $
2 # $DragonFly: src/share/mk/bsd.own.mk,v 1.9 2004/03/22 20:58:15 dillon Exp $
3 #
4 # The include file <bsd.own.mk> set common variables for owner,
5 # group, mode, and directories. Defaults are in brackets.
6 #
7 #
8 # +++ variables +++
9 #
10 # DESTDIR       Change the tree where the file gets installed. [not set]
11 #
12 # DISTDIR       Change the tree where the file for a distribution
13 #               gets installed (see /usr/src/release/Makefile). [not set]
14 #
15 # USRDATA_PREFIX This is a companion to TOOLS_PREFIX, and is set to
16 #               TOOLS_PREFIX by default.  It controls where an entity
17 #               should look for ${USRDATA_PREFIX}/usr/... data.  For
18 #               example in a buildworld the compiler and includes are
19 #               installed in one place (in /usr/obj somewhere), but
20 #               will eventually be installworld'd and so these programs
21 #               are expected to access /usr data from somewhere other
22 #               then where they were initially built/installed.
23 #
24 # COPY          The flag passed to the install program to cause the binary
25 #               to be copied rather than moved.  This is to be used when
26 #               building our own install script so that the entire system
27 #               can either be installed with copies, or with moves using
28 #               a single knob. [-c]
29 #
30 # COMPRESS_CMD  Program to compress documents. 
31 #               Output is to stdout. [gzip -cn]
32 #
33 # COMPRESS_EXT  File name extension of ${COMPRESS_CMD} command. [.gz]
34 #
35 # STRIP         The flag passed to the install program to cause the binary
36 #               to be stripped.  This is to be used when building your
37 #               own install script so that the entire system can be made
38 #               stripped/not-stripped using a single knob. [-s]
39 #
40 # BINOWN        Binary owner. [root]
41 #
42 # BINGRP        Binary group. [wheel]
43 #
44 # BINMODE       Binary mode. [555]
45 #
46 # CCVER         Default compiler version
47 # GCCLIBDIR     Default gcc subdirectory [${LIBDIR}/${CCVER}]
48 # GCCSHLIBDIR   Default gcc subdirectory [${SHLIBDIR}/${CCVER}]
49 #
50 # NOBINMODE     Mode for non-executable files. [444]
51 #
52 # LIBDIR        Base path for libraries. [/usr/lib]
53 #
54 # LIBCOMPATDIR  Base path for compat libraries. [/usr/lib/compat]
55 #
56 # LIBDATADIR    Base path for misc. utility data files. [/usr/libdata]
57 #
58 # LINTLIBDIR    Base path for lint libraries. [/usr/libdata/lint]
59 #
60 # SHLIBDIR      Base path for shared libraries. [${LIBDIR}]
61 #
62 # LIBOWN        Library mode. [${BINOWN}]
63 #
64 # LIBGRP        Library group. [${BINGRP}]
65 #
66 # LIBMODE       Library mode. [${NOBINMODE}]
67 #
68 #
69 # KMODDIR       Base path for loadable kernel modules
70 #               (see kld(4)). [/modules]
71 #
72 # KMODOWN       KLD owner. [${BINOWN}]
73 #
74 # KMODGRP       KLD group. [${BINGRP}]
75 #
76 # KMODMODE      KLD mode. [${BINMODE}]
77 #
78 #
79 # SHAREDIR      Base path for architecture-independent ascii
80 #               text files. [/usr/share]
81 #
82 # SHAREOWN      ASCII text file owner. [root]
83 #
84 # SHAREGRP      ASCII text file group. [wheel]
85 #
86 # SHAREMODE     ASCII text file mode. [${NOBINMODE}]
87 #
88 #
89 # DOCDIR        Base path for system documentation (e.g. PSD, USD,
90 #               handbook, FAQ etc.). [${SHAREDIR}/doc]
91 #
92 # DOCOWN        Documentation owner. [${SHAREOWN}]
93 #
94 # DOCGRP        Documentation group. [${SHAREGRP}]
95 #
96 # DOCMODE       Documentation mode. [${NOBINMODE}]
97 #
98 #
99 # INFODIR       Base path for GNU's hypertext system
100 #               called Info (see info(1)). [${SHAREDIR}/info]
101 #
102 # INFOOWN       Info owner. [${SHAREOWN}]
103 #
104 # INFOGRP       Info group. [${SHAREGRP}]
105 #
106 # INFOMODE      Info mode. [${NOBINMODE}]
107 #
108 #
109 # MANDIR        Base path for manual installation. [${SHAREDIR}/man/man]
110 #
111 # MANOWN        Manual owner. [${SHAREOWN}]
112 #
113 # MANGRP        Manual group. [${SHAREGRP}]
114 #
115 # MANMODE       Manual mode. [${NOBINMODE}]
116 #
117 #
118 # NLSDIR        Base path for National Language Support files
119 #               installation (see mklocale(1)). [${SHAREDIR}/nls]
120 #
121 # NLSGRP        National Language Support files group. [${SHAREOWN}]
122 #
123 # NLSOWN        National Language Support files owner. [${SHAREGRP}]
124 #
125 # NLSMODE       National Language Support files mode. [${NOBINMODE}]
126 #
127 # INCLUDEDIR    Base path for standard C include files [/usr/include]
128
129 .if !target(__<bsd.own.mk>__)
130 __<bsd.own.mk>__:
131
132 # Binaries
133 BINOWN?=        root
134 BINGRP?=        wheel
135 BINMODE?=       555
136 NOBINMODE?=     444
137
138 KMODDIR?=       /modules
139 KMODOWN?=       ${BINOWN}
140 KMODGRP?=       ${BINGRP}
141 KMODMODE?=      ${BINMODE}
142
143 LIBDIR?=        /usr/lib
144 GCCLIBDIR?=     ${LIBDIR}/${CCVER}
145 LIBCOMPATDIR?=  /usr/lib/compat
146 LIBDATADIR?=    /usr/libdata
147 LINTLIBDIR?=    /usr/libdata/lint
148 SHLIBDIR?=      ${LIBDIR}
149 GCCSHLIBDIR?=   ${SHLIBDIR}/${CCVER}
150 LIBOWN?=        ${BINOWN}
151 LIBGRP?=        ${BINGRP}
152 LIBMODE?=       ${NOBINMODE}
153
154 USRDATA_PREFIX?= ${TOOLS_PREFIX}
155
156 # Share files
157 SHAREDIR?=      /usr/share
158 SHAREOWN?=      root
159 SHAREGRP?=      wheel
160 SHAREMODE?=     ${NOBINMODE}
161
162 MANDIR?=        ${SHAREDIR}/man/man
163 MANOWN?=        ${SHAREOWN}
164 MANGRP?=        ${SHAREGRP}
165 MANMODE?=       ${NOBINMODE}
166
167 DOCDIR?=        ${SHAREDIR}/doc
168 DOCOWN?=        ${SHAREOWN}
169 DOCGRP?=        ${SHAREGRP}
170 DOCMODE?=       ${NOBINMODE}
171
172 INFODIR?=       ${SHAREDIR}/info
173 INFOOWN?=       ${SHAREOWN}
174 INFOGRP?=       ${SHAREGRP}
175 INFOMODE?=      ${NOBINMODE}
176
177 NLSDIR?=        ${SHAREDIR}/nls
178 NLSGRP?=        ${SHAREOWN}
179 NLSOWN?=        ${SHAREGRP}
180 NLSMODE?=       ${NOBINMODE}
181
182 INCLUDEDIR?=    /usr/include
183
184 # Common variables
185 .if !defined(DEBUG_FLAGS)
186 STRIP?=         -s
187 .endif
188
189 COPY?=          -c
190 COMPRESS_CMD?=  gzip -cn
191 COMPRESS_EXT?=  .gz
192
193 .endif !target(__<bsd.own.mk>__)