Merge from vendor branch GCC:
[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.10 2004/04/05 05:30:13 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 #               Typical usage is ${DESTDIR}/usr/bin/...  Note that this
12 #               variable is not used to determine where programs access
13 #               auxillary data, only where everything is installed.
14 #
15 # DISTDIR       Change the tree where the file for a distribution
16 #               gets installed (see /usr/src/release/Makefile). [not set]
17 #
18 # TOOLS_PREFIX  Change the tree where the program will search for auxillary
19 #               program binaries.  Defaults to <empty>.  e.g. usage is in
20 #               the typical form ${TOOLS_PREFIX}/usr/libexec/...
21 #
22 #               This is primarily used when generating cross-building tools
23 #               where the cross-building tools must exec auxillary binaries
24 #               which are themselves cross-built tools.
25 #
26 #               This variable specifies how a program looks for data, it does
27 #               NOT specify where a program installs data.
28 #
29 # USRDATA_PREFIX
30 #               Change the tree where the program will search for auxillary
31 #               data files.  Defaults to ${TOOLS_PREFIX}
32 #
33 #               Note that while auxillary program binaries and auxillary
34 #               data files are usually installed in the same tree, there
35 #               are cases where they might not be.  For example, when
36 #               buildworld generates the cross compile tools it must install
37 #               auxillary binaries in the ctools obj hiearchy but those
38 #               binaries must access data from the world obj hierarchy.
39 #
40 #               This variable specifies how a program looks for data, it does
41 #               NOT specify where a program installs data.
42 #
43 # INCLUDEDIR
44 #               Change the tree where header files are to be installed.
45 #               Defaults to /usr/include.  Note that use of INCLUDEDIR
46 #               is typically prefixed by ${DESTDIR}.
47 #
48 # COPY          The flag passed to the install program to cause the binary
49 #               to be copied rather than moved.  This is to be used when
50 #               building our own install script so that the entire system
51 #               can either be installed with copies, or with moves using
52 #               a single knob. [-c]
53 #
54 # COMPRESS_CMD  Program to compress documents. 
55 #               Output is to stdout. [gzip -cn]
56 #
57 # COMPRESS_EXT  File name extension of ${COMPRESS_CMD} command. [.gz]
58 #
59 # STRIP         The flag passed to the install program to cause the binary
60 #               to be stripped.  This is to be used when building your
61 #               own install script so that the entire system can be made
62 #               stripped/not-stripped using a single knob. [-s]
63 #
64 # BINOWN        Binary owner. [root]
65 #
66 # BINGRP        Binary group. [wheel]
67 #
68 # BINMODE       Binary mode. [555]
69 #
70 # CCVER         Default compiler version
71 # GCCLIBDIR     Default gcc subdirectory [${LIBDIR}/${CCVER}]
72 # GCCSHLIBDIR   Default gcc subdirectory [${SHLIBDIR}/${CCVER}]
73 #
74 # NOBINMODE     Mode for non-executable files. [444]
75 #
76 # LIBDIR        Base path for libraries. [/usr/lib]
77 #
78 # LIBCOMPATDIR  Base path for compat libraries. [/usr/lib/compat]
79 #
80 # LIBDATADIR    Base path for misc. utility data files. [/usr/libdata]
81 #
82 # LINTLIBDIR    Base path for lint libraries. [/usr/libdata/lint]
83 #
84 # SHLIBDIR      Base path for shared libraries. [${LIBDIR}]
85 #
86 # LIBOWN        Library mode. [${BINOWN}]
87 #
88 # LIBGRP        Library group. [${BINGRP}]
89 #
90 # LIBMODE       Library mode. [${NOBINMODE}]
91 #
92 #
93 # KMODDIR       Base path for loadable kernel modules
94 #               (see kld(4)). [/modules]
95 #
96 # KMODOWN       KLD owner. [${BINOWN}]
97 #
98 # KMODGRP       KLD group. [${BINGRP}]
99 #
100 # KMODMODE      KLD mode. [${BINMODE}]
101 #
102 #
103 # SHAREDIR      Base path for architecture-independent ascii
104 #               text files. [/usr/share]
105 #
106 # SHAREOWN      ASCII text file owner. [root]
107 #
108 # SHAREGRP      ASCII text file group. [wheel]
109 #
110 # SHAREMODE     ASCII text file mode. [${NOBINMODE}]
111 #
112 #
113 # DOCDIR        Base path for system documentation (e.g. PSD, USD,
114 #               handbook, FAQ etc.). [${SHAREDIR}/doc]
115 #
116 # DOCOWN        Documentation owner. [${SHAREOWN}]
117 #
118 # DOCGRP        Documentation group. [${SHAREGRP}]
119 #
120 # DOCMODE       Documentation mode. [${NOBINMODE}]
121 #
122 #
123 # INFODIR       Base path for GNU's hypertext system
124 #               called Info (see info(1)). [${SHAREDIR}/info]
125 #
126 # INFOOWN       Info owner. [${SHAREOWN}]
127 #
128 # INFOGRP       Info group. [${SHAREGRP}]
129 #
130 # INFOMODE      Info mode. [${NOBINMODE}]
131 #
132 #
133 # MANDIR        Base path for manual installation. [${SHAREDIR}/man/man]
134 #
135 # MANOWN        Manual owner. [${SHAREOWN}]
136 #
137 # MANGRP        Manual group. [${SHAREGRP}]
138 #
139 # MANMODE       Manual mode. [${NOBINMODE}]
140 #
141 #
142 # NLSDIR        Base path for National Language Support files
143 #               installation (see mklocale(1)). [${SHAREDIR}/nls]
144 #
145 # NLSGRP        National Language Support files group. [${SHAREOWN}]
146 #
147 # NLSOWN        National Language Support files owner. [${SHAREGRP}]
148 #
149 # NLSMODE       National Language Support files mode. [${NOBINMODE}]
150
151 .if !target(__<bsd.own.mk>__)
152 __<bsd.own.mk>__:
153
154 # Binaries
155 BINOWN?=        root
156 BINGRP?=        wheel
157 BINMODE?=       555
158 NOBINMODE?=     444
159
160 KMODDIR?=       /modules
161 KMODOWN?=       ${BINOWN}
162 KMODGRP?=       ${BINGRP}
163 KMODMODE?=      ${BINMODE}
164
165 LIBDIR?=        /usr/lib
166 GCCLIBDIR?=     ${LIBDIR}/${CCVER}
167 LIBCOMPATDIR?=  /usr/lib/compat
168 LIBDATADIR?=    /usr/libdata
169 LINTLIBDIR?=    /usr/libdata/lint
170 SHLIBDIR?=      ${LIBDIR}
171 GCCSHLIBDIR?=   ${SHLIBDIR}/${CCVER}
172 LIBOWN?=        ${BINOWN}
173 LIBGRP?=        ${BINGRP}
174 LIBMODE?=       ${NOBINMODE}
175
176 TOOLS_PREFIX?=
177 USRDATA_PREFIX?= ${TOOLS_PREFIX}
178 INCLUDEDIR?=    /usr/include
179
180 # Share files
181 SHAREDIR?=      /usr/share
182 SHAREOWN?=      root
183 SHAREGRP?=      wheel
184 SHAREMODE?=     ${NOBINMODE}
185
186 MANDIR?=        ${SHAREDIR}/man/man
187 MANOWN?=        ${SHAREOWN}
188 MANGRP?=        ${SHAREGRP}
189 MANMODE?=       ${NOBINMODE}
190
191 DOCDIR?=        ${SHAREDIR}/doc
192 DOCOWN?=        ${SHAREOWN}
193 DOCGRP?=        ${SHAREGRP}
194 DOCMODE?=       ${NOBINMODE}
195
196 INFODIR?=       ${SHAREDIR}/info
197 INFOOWN?=       ${SHAREOWN}
198 INFOGRP?=       ${SHAREGRP}
199 INFOMODE?=      ${NOBINMODE}
200
201 NLSDIR?=        ${SHAREDIR}/nls
202 NLSGRP?=        ${SHAREOWN}
203 NLSOWN?=        ${SHAREGRP}
204 NLSMODE?=       ${NOBINMODE}
205
206 # Common variables
207 .if !defined(DEBUG_FLAGS)
208 STRIP?=         -s
209 .endif
210
211 COPY?=          -c
212 COMPRESS_CMD?=  gzip -cn
213 COMPRESS_EXT?=  .gz
214
215 .endif !target(__<bsd.own.mk>__)