]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/bsd.own.mk
This commit was generated by cvs2svn to compensate for changes in r161651,
[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 # LINTLIBDIR    Base path for lint libraries. [/usr/libdata/lint]
34 #
35 # SHLIBDIR      Base path for shared libraries. [${LIBDIR}]
36 #
37 # LIBOWN        Library owner. [${BINOWN}]
38 #
39 # LIBGRP        Library group. [${BINGRP}]
40 #
41 # LIBMODE       Library mode. [${NOBINMODE}]
42 #
43 #
44 # KMODDIR       Base path for loadable kernel modules
45 #               (see kld(4)). [/boot/kernel]
46 #
47 # KMODOWN       KLD owner. [${BINOWN}]
48 #
49 # KMODGRP       KLD group. [${BINGRP}]
50 #
51 # KMODMODE      KLD mode. [${BINMODE}]
52 #
53 #
54 # SHAREDIR      Base path for architecture-independent ascii
55 #               text files. [/usr/share]
56 #
57 # SHAREOWN      ASCII text file owner. [root]
58 #
59 # SHAREGRP      ASCII text file group. [wheel]
60 #
61 # SHAREMODE     ASCII text file mode. [${NOBINMODE}]
62 #
63 #
64 # DOCDIR        Base path for system documentation (e.g. PSD, USD,
65 #               handbook, FAQ etc.). [${SHAREDIR}/doc]
66 #
67 # DOCOWN        Documentation owner. [${SHAREOWN}]
68 #
69 # DOCGRP        Documentation group. [${SHAREGRP}]
70 #
71 # DOCMODE       Documentation mode. [${NOBINMODE}]
72 #
73 #
74 # INFODIR       Base path for GNU's hypertext system
75 #               called Info (see info(1)). [${SHAREDIR}/info]
76 #
77 # INFOOWN       Info owner. [${SHAREOWN}]
78 #
79 # INFOGRP       Info group. [${SHAREGRP}]
80 #
81 # INFOMODE      Info mode. [${NOBINMODE}]
82 #
83 #
84 # MANDIR        Base path for manual installation. [${SHAREDIR}/man/man]
85 #
86 # MANOWN        Manual owner. [${SHAREOWN}]
87 #
88 # MANGRP        Manual group. [${SHAREGRP}]
89 #
90 # MANMODE       Manual mode. [${NOBINMODE}]
91 #
92 #
93 # NLSDIR        Base path for National Language Support files
94 #               installation. [${SHAREDIR}/nls]
95 #
96 # NLSOWN        National Language Support files owner. [${SHAREOWN}]
97 #
98 # NLSGRP        National Language Support files group. [${SHAREGRP}]
99 #
100 # NLSMODE       National Language Support files mode. [${NOBINMODE}]
101 #
102 # INCLUDEDIR    Base path for standard C include files [/usr/include]
103
104 .if !target(__<bsd.own.mk>__)
105 __<bsd.own.mk>__:
106
107 SRCCONF?=       /etc/src.conf
108 .if exists(${SRCCONF})
109 .include "${SRCCONF}"
110 .endif
111
112 # Binaries
113 BINOWN?=        root
114 BINGRP?=        wheel
115 BINMODE?=       555
116 NOBINMODE?=     444
117
118 .if defined(MODULES_WITH_WORLD)
119 KMODDIR?=       /boot/modules
120 .else
121 KMODDIR?=       /boot/kernel
122 .endif
123 KMODOWN?=       ${BINOWN}
124 KMODGRP?=       ${BINGRP}
125 KMODMODE?=      ${BINMODE}
126
127 LIBDIR?=        /usr/lib
128 LIBCOMPATDIR?=  /usr/lib/compat
129 LIBDATADIR?=    /usr/libdata
130 LINTLIBDIR?=    /usr/libdata/lint
131 SHLIBDIR?=      ${LIBDIR}
132 LIBOWN?=        ${BINOWN}
133 LIBGRP?=        ${BINGRP}
134 LIBMODE?=       ${NOBINMODE}
135
136
137 # Share files
138 SHAREDIR?=      /usr/share
139 SHAREOWN?=      root
140 SHAREGRP?=      wheel
141 SHAREMODE?=     ${NOBINMODE}
142
143 MANDIR?=        ${SHAREDIR}/man/man
144 MANOWN?=        ${SHAREOWN}
145 MANGRP?=        ${SHAREGRP}
146 MANMODE?=       ${NOBINMODE}
147
148 DOCDIR?=        ${SHAREDIR}/doc
149 DOCOWN?=        ${SHAREOWN}
150 DOCGRP?=        ${SHAREGRP}
151 DOCMODE?=       ${NOBINMODE}
152
153 INFODIR?=       ${SHAREDIR}/info
154 INFOOWN?=       ${SHAREOWN}
155 INFOGRP?=       ${SHAREGRP}
156 INFOMODE?=      ${NOBINMODE}
157
158 NLSDIR?=        ${SHAREDIR}/nls
159 NLSOWN?=        ${SHAREOWN}
160 NLSGRP?=        ${SHAREGRP}
161 NLSMODE?=       ${NOBINMODE}
162
163 INCLUDEDIR?=    /usr/include
164
165 # Common variables
166 .if !defined(DEBUG_FLAGS)
167 STRIP?=         -s
168 .endif
169
170 COMPRESS_CMD?=  gzip -cn
171 COMPRESS_EXT?=  .gz
172
173 #
174 # Define MK_* variables (which are either "yes" or "no") for users
175 # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
176 # make(1) environment.
177 # These should be tested with `== "no"' or `!= "no"' in makefiles.
178 # The NO_* variables should only be set by makefiles.
179 #
180
181 #
182 # Supported NO_* options (if defined, MK_* will be forced to "no",
183 # regardless of user's setting).
184 #
185 .for var in \
186     MAN \
187     PROFILE
188 .if defined(NO_${var})
189 WITHOUT_${var}=
190 .endif
191 .endfor
192
193 #
194 # Compat NO_* options (same as above, except their use is deprecated).
195 #
196 .if !defined(BURN_BRIDGES)
197 .for var in \
198     ACPI \
199     ATM \
200     AUDIT \
201     AUTHPF \
202     BIND \
203     BIND_DNSSEC \
204     BIND_ETC \
205     BIND_LIBS_LWRES \
206     BIND_MTREE \
207     BIND_NAMED \
208     BIND_UTILS \
209     BLUETOOTH \
210     BOOT \
211     CALENDAR \
212     CPP \
213     CRYPT \
214     CVS \
215     CXX \
216     DICT \
217     DYNAMICROOT \
218     EXAMPLES \
219     FORTH \
220     FORTRAN \
221     FP_LIBC \
222     GAMES \
223     GCOV \
224     GDB \
225     GNU \
226     GPIB \
227     GROFF \
228     HTML \
229     I4B \
230     INET6 \
231     INFO \
232     IPFILTER \
233     IPX \
234     KERBEROS \
235     LIB32 \
236     LIBC_R \
237     LIBPTHREAD \
238     LIBTHR \
239     LOCALES \
240     LPR \
241     MAILWRAPPER \
242     NETCAT \
243     NIS \
244     NLS \
245     NLS_CATALOGS \
246     NS_CACHING \
247     OBJC \
248     OPENSSH \
249     OPENSSL \
250     PAM \
251     PF \
252     RCMDS \
253     RCS \
254     RESCUE \
255     SENDMAIL \
256     SETUID_LOGIN \
257     SHAREDOCS \
258     SYSCONS \
259     TCSH \
260     TOOLCHAIN \
261     USB \
262     WPA_SUPPLICANT_EAPOL
263 .if defined(NO_${var})
264 #.warning NO_${var} is deprecated in favour of WITHOUT_${var}=
265 WITHOUT_${var}=
266 .endif
267 .endfor
268 .endif # !defined(BURN_BRIDGES)
269
270 #
271 # Older-style variables that enabled behaviour when set.
272 #
273 .if defined(YES_HESIOD)
274 WITH_HESIOD=
275 .endif
276 .if defined(MAKE_IDEA)
277 WITH_IDEA=
278 .endif
279
280 #
281 # MK_* options which default to "yes".
282 #
283 .for var in \
284     ACPI \
285     ATM \
286     AUDIT \
287     AUTHPF \
288     BIND \
289     BIND_DNSSEC \
290     BIND_ETC \
291     BIND_LIBS_LWRES \
292     BIND_MTREE \
293     BIND_NAMED \
294     BIND_UTILS \
295     BLUETOOTH \
296     BOOT \
297     CALENDAR \
298     CPP \
299     CRYPT \
300     CVS \
301     CXX \
302     DICT \
303     DYNAMICROOT \
304     EXAMPLES \
305     FORTH \
306     FORTRAN \
307     FP_LIBC \
308     GAMES \
309     GCOV \
310     GDB \
311     GNU \
312     GPIB \
313     GROFF \
314     HTML \
315     I4B \
316     INET6 \
317     INFO \
318     IPFILTER \
319     IPX \
320     KERBEROS \
321     LIB32 \
322     LIBC_R \
323     LIBPTHREAD \
324     LIBTHR \
325     LOCALES \
326     LPR \
327     MAILWRAPPER \
328     MAN \
329     NCP \
330     NETCAT \
331     NIS \
332     NLS \
333     NLS_CATALOGS \
334     NS_CACHING \
335     OBJC \
336     OPENSSH \
337     OPENSSL \
338     PAM \
339     PF \
340     PROFILE \
341     RCMDS \
342     RCS \
343     RESCUE \
344     SENDMAIL \
345     SETUID_LOGIN \
346     SHAREDOCS \
347     SYSCONS \
348     TCSH \
349     TOOLCHAIN \
350     USB \
351     WPA_SUPPLICANT_EAPOL
352 .if defined(WITH_${var}) && defined(WITHOUT_${var})
353 .error WITH_${var} and WITHOUT_${var} can't both be set.
354 .endif
355 .if defined(MK_${var})
356 .error MK_${var} can't be set by a user.
357 .endif
358 .if defined(WITHOUT_${var})
359 MK_${var}:=     no
360 .else
361 MK_${var}:=     yes
362 .endif
363 .endfor
364
365 #
366 # MK_* options which default to "no".
367 #
368 .for var in \
369     BIND_LIBS \
370     HESIOD \
371     IDEA
372 .if defined(WITH_${var}) && defined(WITHOUT_${var})
373 .error WITH_${var} and WITHOUT_${var} can't both be set.
374 .endif
375 .if defined(MK_${var})
376 .error MK_${var} can't be set by a user.
377 .endif
378 .if defined(WITH_${var})
379 MK_${var}:=     yes
380 .else
381 MK_${var}:=     no
382 .endif
383 .endfor
384
385 #
386 # Force some options off if their dependencies are off.
387 #
388 .if ${MK_BIND} == "no"
389 MK_BIND_DNSSEC:= no
390 MK_BIND_ETC:=   no
391 MK_BIND_LIBS:=  no
392 MK_BIND_LIBS_LWRES:= no
393 MK_BIND_MTREE:= no
394 MK_BIND_NAMED:= no
395 MK_BIND_UTILS:= no
396 .endif
397
398 .if ${MK_BIND_MTREE} == "no"
399 MK_BIND_ETC:=   no
400 .endif
401
402 .if ${MK_CRYPT} == "no"
403 MK_OPENSSL:=    no
404 MK_OPENSSH:=    no
405 MK_KERBEROS:=   no
406 .endif
407
408 .if ${MK_IPX} == "no"
409 MK_NCP:=        no
410 .endif
411
412 .if ${MK_OPENSSL} == "no"
413 MK_OPENSSH:=    no
414 MK_KERBEROS:=   no
415 .endif
416
417 .if ${MK_PF} == "no"
418 MK_AUTHPF:=     no
419 .endif
420
421 .if ${MK_TOOLCHAIN} == "no"
422 MK_GDB:=        no
423 .endif
424
425 #
426 # Set defaults for the MK_*_SUPPORT variables.
427 #
428
429 #
430 # MK_*_SUPPORT options which default to "yes" unless their corresponding
431 # MK_* variable is set to "no".
432 #
433 .for var in \
434     GNU \
435     INET6 \
436     IPX \
437     KERBEROS \
438     PAM
439 .if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT)
440 .error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set.
441 .endif
442 .if defined(MK_${var}_SUPPORT)
443 .error MK_${var}_SUPPORT can't be set by a user.
444 .endif
445 .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
446 MK_${var}_SUPPORT:= no
447 .else
448 MK_${var}_SUPPORT:= yes
449 .endif
450 .endfor
451
452 .endif  # !target(__<bsd.own.mk>__)