bsd.own.mk revision 156836
11834Swollman# $FreeBSD: head/share/mk/bsd.own.mk 156836 2006-03-18 10:54:09Z ru $
21834Swollman#
31834Swollman# The include file <bsd.own.mk> set common variables for owner,
41834Swollman# group, mode, and directories. Defaults are in brackets.
51834Swollman#
61834Swollman#
71834Swollman# +++ variables +++
81834Swollman#
91834Swollman# DESTDIR	Change the tree where the file gets installed. [not set]
101834Swollman#
111834Swollman# DISTDIR	Change the tree where the file for a distribution
121834Swollman# 		gets installed (see /usr/src/release/Makefile). [not set]
131834Swollman#
141834Swollman# COMPRESS_CMD	Program to compress documents.
151834Swollman#		Output is to stdout. [gzip -cn]
161834Swollman#
171834Swollman# COMPRESS_EXT	File name extension of ${COMPRESS_CMD} command. [.gz]
181834Swollman#
191834Swollman# BINOWN	Binary owner. [root]
201834Swollman#
211834Swollman# BINGRP	Binary group. [wheel]
221834Swollman#
231834Swollman# BINMODE	Binary mode. [555]
241834Swollman#
251834Swollman# NOBINMODE	Mode for non-executable files. [444]
261834Swollman#
271834Swollman# LIBDIR	Base path for libraries. [/usr/lib]
281834Swollman#
291834Swollman# LIBCOMPATDIR	Base path for compat libraries. [/usr/lib/compat]
301834Swollman#
311834Swollman# LIBDATADIR	Base path for misc. utility data files. [/usr/libdata]
321834Swollman#
331834Swollman# LINTLIBDIR	Base path for lint libraries. [/usr/libdata/lint]
3450477Speter#
351834Swollman# SHLIBDIR	Base path for shared libraries. [${LIBDIR}]
361834Swollman#
371834Swollman# LIBOWN	Library owner. [${BINOWN}]
381834Swollman#
391834Swollman# LIBGRP	Library group. [${BINGRP}]
401834Swollman#
411862Swollman# LIBMODE	Library mode. [${NOBINMODE}]
421862Swollman#
431834Swollman#
441834Swollman# KMODDIR	Base path for loadable kernel modules
451834Swollman#		(see kld(4)). [/boot/kernel]
461834Swollman#
471834Swollman# KMODOWN	KLD owner. [${BINOWN}]
481834Swollman#
491834Swollman# KMODGRP	KLD group. [${BINGRP}]
501834Swollman#
511834Swollman# KMODMODE	KLD mode. [${BINMODE}]
521834Swollman#
531834Swollman#
541834Swollman# SHAREDIR	Base path for architecture-independent ascii
5513765Smpp#		text files. [/usr/share]
561834Swollman#
571834Swollman# SHAREOWN	ASCII text file owner. [root]
5813765Smpp#
591834Swollman# SHAREGRP	ASCII text file group. [wheel]
601834Swollman#
6113765Smpp# SHAREMODE	ASCII text file mode. [${NOBINMODE}]
621834Swollman#
631834Swollman#
641834Swollman# DOCDIR	Base path for system documentation (e.g. PSD, USD,
651834Swollman#		handbook, FAQ etc.). [${SHAREDIR}/doc]
661834Swollman#
671834Swollman# DOCOWN	Documentation owner. [${SHAREOWN}]
681834Swollman#
691834Swollman# DOCGRP	Documentation group. [${SHAREGRP}]
701834Swollman#
711834Swollman# DOCMODE	Documentation mode. [${NOBINMODE}]
721834Swollman#
731834Swollman#
741834Swollman# INFODIR	Base path for GNU's hypertext system
7549081Scracauer#		called Info (see info(1)). [${SHAREDIR}/info]
761834Swollman#
771834Swollman# INFOOWN	Info owner. [${SHAREOWN}]
781834Swollman#
791834Swollman# INFOGRP	Info group. [${SHAREGRP}]
801834Swollman#
811834Swollman# INFOMODE	Info mode. [${NOBINMODE}]
821834Swollman#
831834Swollman#
841834Swollman# MANDIR	Base path for manual installation. [${SHAREDIR}/man/man]
851834Swollman#
861834Swollman# MANOWN	Manual owner. [${SHAREOWN}]
871834Swollman#
881834Swollman# MANGRP	Manual group. [${SHAREGRP}]
891834Swollman#
901834Swollman# MANMODE	Manual mode. [${NOBINMODE}]
911834Swollman#
921834Swollman#
931834Swollman# NLSDIR	Base path for National Language Support files
941834Swollman#		installation. [${SHAREDIR}/nls]
951834Swollman#
961834Swollman# NLSOWN	National Language Support files owner. [${SHAREOWN}]
971834Swollman#
981834Swollman# NLSGRP	National Language Support files group. [${SHAREGRP}]
991834Swollman#
1001834Swollman# NLSMODE	National Language Support files mode. [${NOBINMODE}]
101109520Smarcel#
102109520Smarcel# INCLUDEDIR	Base path for standard C include files [/usr/include]
103109520Smarcel
104109520Smarcel.if !target(__<bsd.own.mk>__)
105109520Smarcel__<bsd.own.mk>__:
106109520Smarcel
107109520SmarcelSRCCONF?=	/etc/src.conf
108109520Smarcel.if exists(${SRCCONF})
109109520Smarcel.include "${SRCCONF}"
110109520Smarcel.endif
111109520Smarcel
112109520Smarcel# Binaries
113109520SmarcelBINOWN?=	root
114109520SmarcelBINGRP?=	wheel
115109520SmarcelBINMODE?=	555
116109520SmarcelNOBINMODE?=	444
117109520Smarcel
118109520Smarcel.if defined(MODULES_WITH_WORLD)
119109520SmarcelKMODDIR?=	/boot/modules
120109520Smarcel.else
121109520SmarcelKMODDIR?=	/boot/kernel
122109520Smarcel.endif
123109520SmarcelKMODOWN?=	${BINOWN}
124109520SmarcelKMODGRP?=	${BINGRP}
125109520SmarcelKMODMODE?=	${BINMODE}
126109520Smarcel
127109520SmarcelLIBDIR?=	/usr/lib
128109520SmarcelLIBCOMPATDIR?=	/usr/lib/compat
129109520SmarcelLIBDATADIR?=	/usr/libdata
130109520SmarcelLINTLIBDIR?=	/usr/libdata/lint
131109520SmarcelSHLIBDIR?=	${LIBDIR}
132109520SmarcelLIBOWN?=	${BINOWN}
133109520SmarcelLIBGRP?=	${BINGRP}
134109520SmarcelLIBMODE?=	${NOBINMODE}
135109520Smarcel
136109520Smarcel
137109520Smarcel# Share files
138109520SmarcelSHAREDIR?=	/usr/share
139109520SmarcelSHAREOWN?=	root
140109520SmarcelSHAREGRP?=	wheel
141109520SmarcelSHAREMODE?=	${NOBINMODE}
142109520Smarcel
143109520SmarcelMANDIR?=	${SHAREDIR}/man/man
144109520SmarcelMANOWN?=	${SHAREOWN}
145109520SmarcelMANGRP?=	${SHAREGRP}
146109520SmarcelMANMODE?=	${NOBINMODE}
147109520Smarcel
148109520SmarcelDOCDIR?=	${SHAREDIR}/doc
149109520SmarcelDOCOWN?=	${SHAREOWN}
150109520SmarcelDOCGRP?=	${SHAREGRP}
151109520SmarcelDOCMODE?=	${NOBINMODE}
152109520Smarcel
153109520SmarcelINFODIR?=	${SHAREDIR}/info
154109520SmarcelINFOOWN?=	${SHAREOWN}
155109520SmarcelINFOGRP?=	${SHAREGRP}
156109520SmarcelINFOMODE?=	${NOBINMODE}
157109520Smarcel
158109520SmarcelNLSDIR?=	${SHAREDIR}/nls
159109520SmarcelNLSOWN?=	${SHAREOWN}
160109520SmarcelNLSGRP?=	${SHAREGRP}
161109520SmarcelNLSMODE?=	${NOBINMODE}
162109520Smarcel
163109520SmarcelINCLUDEDIR?=	/usr/include
164109520Smarcel
165109520Smarcel# Common variables
166109520Smarcel.if !defined(DEBUG_FLAGS)
167109520SmarcelSTRIP?=		-s
168109520Smarcel.endif
169109520Smarcel
170109520SmarcelCOMPRESS_CMD?=	gzip -cn
171109520SmarcelCOMPRESS_EXT?=	.gz
172109520Smarcel
173109520Smarcel#
174109520Smarcel# Define MK_* variables (which are either "yes" or "no") for users
175109520Smarcel# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
176109520Smarcel# make(1) environment.
177109520Smarcel# These should be tested with `== "no"' or `!= "no"' in makefiles.
178109520Smarcel# The NO_* variables should only be set by makefiles.
179109520Smarcel#
180109520Smarcel
1811862Swollman#
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.if defined(NO_${var})
188WITHOUT_${var}=
189.endif
190.endfor
191
192#
193# Compat NO_* options (same as above, except their use is deprecated).
194#
195.if !defined(BURN_BRIDGES)
196.for var in \
197    ACPI \
198    ATM \
199    AUDIT \
200    AUTHPF \
201    BIND \
202    BIND_DNSSEC \
203    BIND_ETC \
204    BIND_LIBS_LWRES \
205    BIND_MTREE \
206    BIND_NAMED \
207    BIND_UTILS \
208    BLUETOOTH \
209    BOOT \
210    CALENDAR \
211    COLLECT2 \
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    LIBC_R \
236    LIBPTHREAD \
237    LIBTHR \
238    LOCALES \
239    LPR \
240    MAILWRAPPER \
241    NETCAT \
242    NIS \
243    NLS \
244    NLS_CATALOGS \
245    OBJC \
246    OPENSSH \
247    OPENSSL \
248    PAM \
249    PCVT \
250    PF \
251    RCMDS \
252    RCS \
253    RESCUE \
254    SENDMAIL \
255    SETUID_LOGIN \
256    SHAREDOCS \
257    SYSCONS \
258    TCSH \
259    TOOLCHAIN \
260    USB \
261    WPA_SUPPLICANT_EAPOL
262.if defined(NO_${var})
263#.warning NO_${var} is deprecated in favour of WITHOUT_${var}=
264WITHOUT_${var}=
265.endif
266.endfor
267.endif # !defined(BURN_BRIDGES)
268
269#
270# Older-style variables that enabled behaviour when set.
271#
272.if defined(YES_HESIOD)
273WITH_HESIOD=
274.endif
275.if defined(MAKE_IDEA)
276WITH_IDEA=
277.endif
278
279#
280# MK_* options which default to "yes".
281#
282.for var in \
283    ACPI \
284    ATM \
285    AUDIT \
286    AUTHPF \
287    BIND \
288    BIND_DNSSEC \
289    BIND_ETC \
290    BIND_LIBS_LWRES \
291    BIND_MTREE \
292    BIND_NAMED \
293    BIND_UTILS \
294    BLUETOOTH \
295    BOOT \
296    CALENDAR \
297    COLLECT2 \
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    LIBC_R \
322    LIBPTHREAD \
323    LIBTHR \
324    LOCALES \
325    LPR \
326    MAILWRAPPER \
327    MAN \
328    NETCAT \
329    NIS \
330    NLS \
331    NLS_CATALOGS \
332    OBJC \
333    OPENSSH \
334    OPENSSL \
335    PAM \
336    PCVT \
337    PF \
338    RCMDS \
339    RCS \
340    RESCUE \
341    SENDMAIL \
342    SETUID_LOGIN \
343    SHAREDOCS \
344    SYSCONS \
345    TCSH \
346    TOOLCHAIN \
347    USB \
348    WPA_SUPPLICANT_EAPOL
349.if defined(WITH_${var}) && defined(WITHOUT_${var})
350.error WITH_${var} and WITHOUT_${var} can't both be set.
351.endif
352.if defined(MK_${var})
353.error MK_${var} can't be set by a user.
354.endif
355.if defined(WITHOUT_${var})
356MK_${var}:=	no
357.else
358MK_${var}:=	yes
359.endif
360.endfor
361
362#
363# MK_* options which default to "no".
364#
365.for var in \
366    BIND_LIBS \
367    HESIOD \
368    IDEA
369.if defined(WITH_${var}) && defined(WITHOUT_${var})
370.error WITH_${var} and WITHOUT_${var} can't both be set.
371.endif
372.if defined(MK_${var})
373.error MK_${var} can't be set by a user.
374.endif
375.if defined(WITH_${var})
376MK_${var}:=	yes
377.else
378MK_${var}:=	no
379.endif
380.endfor
381
382#
383# Force some options off if their dependencies are off.
384#
385.if ${MK_BIND} == "no"
386MK_BIND_DNSSEC:= no
387MK_BIND_ETC:=	no
388MK_BIND_LIBS:=	no
389MK_BIND_LIBS_LWRES:= no
390MK_BIND_MTREE:=	no
391MK_BIND_NAMED:=	no
392MK_BIND_UTILS:=	no
393.endif
394
395.if ${MK_CRYPT} == "no"
396MK_OPENSSL:=	no
397MK_OPENSSH:=	no
398MK_KERBEROS:=	no
399.endif
400
401.if ${MK_CXX} == "no"
402MK_COLLECT2:=	no
403.endif
404
405.if ${MK_OPENSSL} == "no"
406MK_OPENSSH:=	no
407MK_KERBEROS:=	no
408.endif
409
410.if ${MK_PF} == "no"
411MK_AUTHPF:=	no
412.endif
413
414.if ${MK_TOOLCHAIN} == "no"
415MK_GDB:=	no
416.endif
417
418#
419# Set defaults for the MK_*_SUPPORT variables.
420#
421
422#
423# MK_*_SUPPORT options which default to "yes" unless their corresponding
424# MK_* variable is set to "no".
425#
426.for var in \
427    GNU \
428    HESIOD \
429    INET6 \
430    IPX \
431    KERBEROS \
432    PAM
433.if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT)
434.error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set.
435.endif
436.if defined(MK_${var}_SUPPORT)
437.error MK_${var}_SUPPORT can't be set by a user.
438.endif
439.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
440MK_${var}_SUPPORT:= no
441.else
442MK_${var}_SUPPORT:= yes
443.endif
444.endfor
445
446.endif	# !target(__<bsd.own.mk>__)
447