]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/bsd.own.mk
Fix Makefiles which override LIBDIR to not add incorrect dependencies into .depend.
[FreeBSD/FreeBSD.git] / share / mk / bsd.own.mk
1 # $FreeBSD$
2 #
3 # The include file <bsd.own.mk> set common variables for owner,
4 # group, mode, and directories. Defaults are in brackets.
5 #
6 #
7 # +++ variables +++
8 #
9 # DESTDIR       Change the tree where the file gets installed. [not set]
10 #
11 # DISTDIR       Change the tree where the file for a distribution
12 #               gets installed (see /usr/src/release/Makefile). [not set]
13 #
14 # COMPRESS_CMD  Program to compress documents.
15 #               Output is to stdout. [gzip -cn]
16 #
17 # COMPRESS_EXT  File name extension of ${COMPRESS_CMD} command. [.gz]
18 #
19 # BINOWN        Binary owner. [root]
20 #
21 # BINGRP        Binary group. [wheel]
22 #
23 # BINMODE       Binary mode. [555]
24 #
25 # NOBINMODE     Mode for non-executable files. [444]
26 #
27 # LIBDIR        Base path for libraries. [/usr/lib]
28 #
29 # LIBCOMPATDIR  Base path for compat libraries. [/usr/lib/compat]
30 #
31 # LIBDATADIR    Base path for misc. utility data files. [/usr/libdata]
32 #
33 # LIBEXECDIR    Base path for system daemons and utilities. [/usr/libexec]
34 #
35 # LINTLIBDIR    Base path for lint libraries. [/usr/libdata/lint]
36 #
37 # SHLIBDIR      Base path for shared libraries. [${LIBDIR}]
38 #
39 # LIBOWN        Library owner. [${BINOWN}]
40 #
41 # LIBGRP        Library group. [${BINGRP}]
42 #
43 # LIBMODE       Library mode. [${NOBINMODE}]
44 #
45 #
46 # DEBUGDIR      Base path for standalone debug files. [/usr/lib/debug]
47 #
48 # DEBUGMODE     Mode for debug files. [${NOBINMODE}]
49 #
50 #
51 # KMODDIR       Base path for loadable kernel modules
52 #               (see kld(4)). [/boot/module]
53 #
54 # KMODOWN       Kernel and KLD owner. [${BINOWN}]
55 #
56 # KMODGRP       Kernel and KLD group. [${BINGRP}]
57 #
58 # KMODMODE      KLD mode. [${BINMODE}]
59 #
60 #
61 # SHAREDIR      Base path for architecture-independent ascii
62 #               text files. [/usr/share]
63 #
64 # SHAREOWN      ASCII text file owner. [root]
65 #
66 # SHAREGRP      ASCII text file group. [wheel]
67 #
68 # SHAREMODE     ASCII text file mode. [${NOBINMODE}]
69 #
70 #
71 # CONFDIR       Base path for configuration files. [/etc]
72 #
73 # CONFOWN       Configuration file owner. [root]
74 #
75 # CONFGRP       Configuration file group. [wheel]
76 #
77 # CONFMODE      Configuration file mode. [644]
78 #
79 #
80 # DOCDIR        Base path for system documentation (e.g. PSD, USD,
81 #               handbook, FAQ etc.). [${SHAREDIR}/doc]
82 #
83 # DOCOWN        Documentation owner. [${SHAREOWN}]
84 #
85 # DOCGRP        Documentation group. [${SHAREGRP}]
86 #
87 # DOCMODE       Documentation mode. [${NOBINMODE}]
88 #
89 #
90 # INFODIR       Base path for GNU's hypertext system
91 #               called Info (see info(1)). [${SHAREDIR}/info]
92 #
93 # INFOOWN       Info owner. [${SHAREOWN}]
94 #
95 # INFOGRP       Info group. [${SHAREGRP}]
96 #
97 # INFOMODE      Info mode. [${NOBINMODE}]
98 #
99 #
100 # MANDIR        Base path for manual installation. [${SHAREDIR}/man/man]
101 #
102 # MANOWN        Manual owner. [${SHAREOWN}]
103 #
104 # MANGRP        Manual group. [${SHAREGRP}]
105 #
106 # MANMODE       Manual mode. [${NOBINMODE}]
107 #
108 #
109 # NLSDIR        Base path for National Language Support files
110 #               installation. [${SHAREDIR}/nls]
111 #
112 # NLSOWN        National Language Support files owner. [${SHAREOWN}]
113 #
114 # NLSGRP        National Language Support files group. [${SHAREGRP}]
115 #
116 # NLSMODE       National Language Support files mode. [${NOBINMODE}]
117 #
118 # INCLUDEDIR    Base path for standard C include files [/usr/include]
119 #
120 # PKG_CMD       Program for creating and manipulating packages.
121 #               [pkg] 
122
123 .if !target(__<bsd.own.mk>__)
124 __<bsd.own.mk>__:
125
126 .include <bsd.opts.mk>          # options now here or src.opts.mk
127
128 .if !defined(_WITHOUT_SRCCONF)
129
130 .if ${MK_CTF} != "no"
131 CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
132 .elif defined(.PARSEDIR) || (defined(MAKE_VERSION) && ${MAKE_VERSION} >= 5201111300)
133 CTFCONVERT_CMD=
134 .else
135 CTFCONVERT_CMD= @:
136 .endif 
137
138 .endif # !_WITHOUT_SRCCONF
139
140 # Binaries
141 BINOWN?=        root
142 BINGRP?=        wheel
143 BINMODE?=       555
144 NOBINMODE?=     444
145
146 KMODDIR?=       /boot/modules
147 KMODOWN?=       ${BINOWN}
148 KMODGRP?=       ${BINGRP}
149 KMODMODE?=      ${BINMODE}
150 DTBDIR?=        /boot/dtb
151 DTBOWN?=        root
152 DTBGRP?=        wheel
153 DTBMODE?=       444
154
155 LIBDIR_BASE?=   /usr/lib
156 LIBDIR?=        ${LIBDIR_BASE}
157 LIBCOMPATDIR?=  /usr/lib/compat
158 LIBDATADIR?=    /usr/libdata
159 LIBEXECDIR?=    /usr/libexec
160 LINTLIBDIR?=    /usr/libdata/lint
161 SHLIBDIR?=      ${LIBDIR}
162 LIBOWN?=        ${BINOWN}
163 LIBGRP?=        ${BINGRP}
164 LIBMODE?=       ${NOBINMODE}
165
166 DEBUGDIR?=      /usr/lib/debug
167 DEBUGMODE?=     ${NOBINMODE}
168
169
170 # Share files
171 SHAREDIR?=      /usr/share
172 SHAREOWN?=      root
173 SHAREGRP?=      wheel
174 SHAREMODE?=     ${NOBINMODE}
175
176 CONFDIR?=       /etc
177 CONFOWN?=       root
178 CONFGRP?=       wheel
179 CONFMODE?=      644
180
181 MANDIR?=        ${SHAREDIR}/man/man
182 MANOWN?=        ${SHAREOWN}
183 MANGRP?=        ${SHAREGRP}
184 MANMODE?=       ${NOBINMODE}
185
186 DOCDIR?=        ${SHAREDIR}/doc
187 DOCOWN?=        ${SHAREOWN}
188 DOCGRP?=        ${SHAREGRP}
189 DOCMODE?=       ${NOBINMODE}
190
191 INFODIR?=       ${SHAREDIR}/info
192 INFOOWN?=       ${SHAREOWN}
193 INFOGRP?=       ${SHAREGRP}
194 INFOMODE?=      ${NOBINMODE}
195
196 NLSDIR?=        ${SHAREDIR}/nls
197 NLSOWN?=        ${SHAREOWN}
198 NLSGRP?=        ${SHAREGRP}
199 NLSMODE?=       ${NOBINMODE}
200
201 INCLUDEDIR?=    /usr/include
202
203 #
204 # install(1) parameters.
205 #
206 HRDLINK?=       -l h
207 SYMLINK?=       -l s
208 RSYMLINK?=      -l rs
209
210 INSTALL_LINK?=          ${INSTALL} ${HRDLINK}
211 INSTALL_SYMLINK?=       ${INSTALL} ${SYMLINK}
212 INSTALL_RSYMLINK?=      ${INSTALL} ${RSYMLINK}
213
214 # Common variables
215 .if !defined(DEBUG_FLAGS)
216 STRIP?=         -s
217 .endif
218
219 COMPRESS_CMD?=  gzip -cn
220 COMPRESS_EXT?=  .gz
221
222 # Set XZ_THREADS to 1 to disable multi-threading.
223 XZ_THREADS?=    0
224
225 .if !empty(XZ_THREADS)
226 XZ_CMD?=        xz -T ${XZ_THREADS}
227 .else
228 XZ_CMD?=        xz
229 .endif
230
231 PKG_CMD?=       pkg
232
233 # Pointer to the top directory into which tests are installed.  Should not be
234 # overriden by Makefiles, but the user may choose to set this in src.conf(5).
235 TESTSBASE?= /usr/tests
236
237 DEPENDFILE?=    .depend
238
239 # Compat for the moment -- old bsd.own.mk only included this when _WITHOUT_SRCCONF
240 # wasn't defined. bsd.ports.mk and friends depend on this behavior. Remove in 12.
241 .if !defined(_WITHOUT_SRCCONF)
242 .include <bsd.compiler.mk>
243 .endif # !_WITHOUT_SRCCONF
244
245 .endif  # !target(__<bsd.own.mk>__)