bsd.own.mk revision 246131
150476Speter# $FreeBSD: head/share/mk/bsd.own.mk 246131 2013-01-30 19:51:16Z dim $
215903Swosch#
315903Swosch# The include file <bsd.own.mk> set common variables for owner,
415903Swosch# group, mode, and directories. Defaults are in brackets.
515903Swosch#
615903Swosch#
715903Swosch# +++ variables +++
815903Swosch#
915903Swosch# DESTDIR	Change the tree where the file gets installed. [not set]
1015903Swosch#
1115903Swosch# DISTDIR	Change the tree where the file for a distribution
1215903Swosch# 		gets installed (see /usr/src/release/Makefile). [not set]
1315903Swosch#
14139761Skrion# COMPRESS_CMD	Program to compress documents.
1534678Sbde#		Output is to stdout. [gzip -cn]
1623546Swosch#
1723546Swosch# COMPRESS_EXT	File name extension of ${COMPRESS_CMD} command. [.gz]
1823546Swosch#
1939161Sobrien# BINOWN	Binary owner. [root]
2015903Swosch#
2139161Sobrien# BINGRP	Binary group. [wheel]
2215903Swosch#
2315903Swosch# BINMODE	Binary mode. [555]
2415903Swosch#
2515903Swosch# NOBINMODE	Mode for non-executable files. [444]
2615903Swosch#
2715903Swosch# LIBDIR	Base path for libraries. [/usr/lib]
2815903Swosch#
2932216Swosch# LIBCOMPATDIR	Base path for compat libraries. [/usr/lib/compat]
3032216Swosch#
3132216Swosch# LIBDATADIR	Base path for misc. utility data files. [/usr/libdata]
3232216Swosch#
33218525Skeramida# LIBEXECDIR	Base path for system daemons and utilities. [/usr/libexec]
34218525Skeramida#
3515903Swosch# LINTLIBDIR	Base path for lint libraries. [/usr/libdata/lint]
3615903Swosch#
3715903Swosch# SHLIBDIR	Base path for shared libraries. [${LIBDIR}]
3815903Swosch#
39119057Sobrien# LIBOWN	Library owner. [${BINOWN}]
4015903Swosch#
4115903Swosch# LIBGRP	Library group. [${BINGRP}]
4215903Swosch#
4315903Swosch# LIBMODE	Library mode. [${NOBINMODE}]
4415903Swosch#
4515903Swosch#
4615903Swosch# KMODDIR	Base path for loadable kernel modules
4765501Sobrien#		(see kld(4)). [/boot/kernel]
4815903Swosch#
49186894Sbz# KMODOWN	Kernel and KLD owner. [${BINOWN}]
5015903Swosch#
51186894Sbz# KMODGRP	Kernel and KLD group. [${BINGRP}]
5215903Swosch#
5353033Sphantom# KMODMODE	KLD mode. [${BINMODE}]
5415903Swosch#
5515903Swosch#
5615903Swosch# SHAREDIR	Base path for architecture-independent ascii
5715903Swosch#		text files. [/usr/share]
5815903Swosch#
5939161Sobrien# SHAREOWN	ASCII text file owner. [root]
6015903Swosch#
6139161Sobrien# SHAREGRP	ASCII text file group. [wheel]
6215903Swosch#
6315903Swosch# SHAREMODE	ASCII text file mode. [${NOBINMODE}]
6415903Swosch#
6515903Swosch#
66223596Sse# CONFDIR	Base path for configuration files. [/etc]
67223596Sse#
68223596Sse# CONFOWN	Configuration file owner. [root]
69223596Sse#
70223596Sse# CONFGRP	Configuration file group. [wheel]
71223596Sse#
72223596Sse# CONFMODE	Configuration file mode. [644]
73223596Sse#
74223596Sse#
7515903Swosch# DOCDIR	Base path for system documentation (e.g. PSD, USD,
7615903Swosch#		handbook, FAQ etc.). [${SHAREDIR}/doc]
7715903Swosch#
7815903Swosch# DOCOWN	Documentation owner. [${SHAREOWN}]
7915903Swosch#
8015903Swosch# DOCGRP	Documentation group. [${SHAREGRP}]
8115903Swosch#
8215903Swosch# DOCMODE	Documentation mode. [${NOBINMODE}]
8315903Swosch#
8415903Swosch#
8515903Swosch# INFODIR	Base path for GNU's hypertext system
8615903Swosch#		called Info (see info(1)). [${SHAREDIR}/info]
8715903Swosch#
8815903Swosch# INFOOWN	Info owner. [${SHAREOWN}]
8915903Swosch#
9015903Swosch# INFOGRP	Info group. [${SHAREGRP}]
9115903Swosch#
9215903Swosch# INFOMODE	Info mode. [${NOBINMODE}]
9315903Swosch#
9415903Swosch#
9515903Swosch# MANDIR	Base path for manual installation. [${SHAREDIR}/man/man]
9615903Swosch#
9715903Swosch# MANOWN	Manual owner. [${SHAREOWN}]
9815903Swosch#
9915903Swosch# MANGRP	Manual group. [${SHAREGRP}]
10015903Swosch#
10115903Swosch# MANMODE	Manual mode. [${NOBINMODE}]
10215903Swosch#
10315903Swosch#
10415903Swosch# NLSDIR	Base path for National Language Support files
10590627Sphantom#		installation. [${SHAREDIR}/nls]
10615903Swosch#
10790626Sphantom# NLSOWN	National Language Support files owner. [${SHAREOWN}]
10815903Swosch#
10990626Sphantom# NLSGRP	National Language Support files group. [${SHAREGRP}]
11015903Swosch#
11161462Sghelmer# NLSMODE	National Language Support files mode. [${NOBINMODE}]
11215903Swosch#
11332216Swosch# INCLUDEDIR	Base path for standard C include files [/usr/include]
11415903Swosch
11594982Sru.if !target(__<bsd.own.mk>__)
11694982Sru__<bsd.own.mk>__:
11794982Sru
118164411Sru.if !defined(_WITHOUT_SRCCONF)
119156813SruSRCCONF?=	/etc/src.conf
120156836Sru.if exists(${SRCCONF})
121156836Sru.include "${SRCCONF}"
122156836Sru.endif
123164411Sru.endif
124156813Sru
12514968Swosch# Binaries
12639161SobrienBINOWN?=	root
12739161SobrienBINGRP?=	wheel
12814573SwoschBINMODE?=	555
12914968SwoschNOBINMODE?=	444
13014573Swosch
131111853Sru.if defined(MODULES_WITH_WORLD)
132111853SruKMODDIR?=	/boot/modules
133111853Sru.else
13465501SobrienKMODDIR?=	/boot/kernel
135111853Sru.endif
13648204SjmgKMODOWN?=	${BINOWN}
13748204SjmgKMODGRP?=	${BINGRP}
13848204SjmgKMODMODE?=	${BINMODE}
13948204Sjmg
14014573SwoschLIBDIR?=	/usr/lib
14132226SsteveLIBCOMPATDIR?=	/usr/lib/compat
14232226SsteveLIBDATADIR?=	/usr/libdata
143218525SkeramidaLIBEXECDIR?=	/usr/libexec
14414573SwoschLINTLIBDIR?=	/usr/libdata/lint
14514573SwoschSHLIBDIR?=	${LIBDIR}
14614968SwoschLIBOWN?=	${BINOWN}
14714968SwoschLIBGRP?=	${BINGRP}
14814968SwoschLIBMODE?=	${NOBINMODE}
14914573Swosch
15014968Swosch
15114968Swosch# Share files
15214968SwoschSHAREDIR?=	/usr/share
15339161SobrienSHAREOWN?=	root
15439161SobrienSHAREGRP?=	wheel
15514968SwoschSHAREMODE?=	${NOBINMODE}
15614968Swosch
157223596SseCONFDIR?=	/etc
158223596SseCONFOWN?=	root
159223596SseCONFGRP?=	wheel
160223596SseCONFMODE?=	644
161223596Sse
16214968SwoschMANDIR?=	${SHAREDIR}/man/man
16314968SwoschMANOWN?=	${SHAREOWN}
16414968SwoschMANGRP?=	${SHAREGRP}
16514968SwoschMANMODE?=	${NOBINMODE}
16614968Swosch
16714968SwoschDOCDIR?=	${SHAREDIR}/doc
16814968SwoschDOCOWN?=	${SHAREOWN}
16914968SwoschDOCGRP?=	${SHAREGRP}
17014968SwoschDOCMODE?=	${NOBINMODE}
17114968Swosch
17214968SwoschINFODIR?=	${SHAREDIR}/info
17314968SwoschINFOOWN?=	${SHAREOWN}
17414968SwoschINFOGRP?=	${SHAREGRP}
17514968SwoschINFOMODE?=	${NOBINMODE}
17614968Swosch
17714968SwoschNLSDIR?=	${SHAREDIR}/nls
17890626SphantomNLSOWN?=	${SHAREOWN}
17990626SphantomNLSGRP?=	${SHAREGRP}
18061462SghelmerNLSMODE?=	${NOBINMODE}
18114968Swosch
18232216SwoschINCLUDEDIR?=	/usr/include
18332216Swosch
184245752Sbrooks#
185245752Sbrooks# install(1) parameters.
186245752Sbrooks#
187245752SbrooksHRDLINK?=	-l h
188245752SbrooksSYMLINK?=	-l s
189245752Sbrooks
190245752SbrooksINSTALL_LINK?=		${INSTALL} ${HRDLINK}
191245752SbrooksINSTALL_SYMLINK?=	${INSTALL} ${SYMLINK}
192245752Sbrooks
19314968Swosch# Common variables
194125494Sru.if !defined(DEBUG_FLAGS)
195125494SruSTRIP?=		-s
196125494Sru.endif
197125494Sru
19834678SbdeCOMPRESS_CMD?=	gzip -cn
19923546SwoschCOMPRESS_EXT?=	.gz
20094982Sru
201164411Sru.if !defined(_WITHOUT_SRCCONF)
202156813Sru#
203156813Sru# Define MK_* variables (which are either "yes" or "no") for users
204156813Sru# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
205156813Sru# make(1) environment.
206156813Sru# These should be tested with `== "no"' or `!= "no"' in makefiles.
207156813Sru# The NO_* variables should only be set by makefiles.
208156813Sru#
209156813Sru
210156813Sru#
211156813Sru# Supported NO_* options (if defined, MK_* will be forced to "no",
212156813Sru# regardless of user's setting).
213156813Sru#
214156813Sru.for var in \
215228158Sfjoe    CTF \
216172832Sru    INSTALLLIB \
217156869Sru    MAN \
218156869Sru    PROFILE
219156813Sru.if defined(NO_${var})
220228120Sfjoe.if defined(WITH_${var})
221228120Sfjoe.undef WITH_${var}
222228120Sfjoe.endif
223156813SruWITHOUT_${var}=
224156813Sru.endif
225156813Sru.endfor
226156813Sru
227156813Sru#
228156813Sru# Older-style variables that enabled behaviour when set.
229156813Sru#
230156813Sru.if defined(YES_HESIOD)
231156813SruWITH_HESIOD=
232156813Sru.endif
233156813Sru.if defined(MAKE_IDEA)
234156813SruWITH_IDEA=
235156813Sru.endif
236156813Sru
237220359Simp__DEFAULT_YES_OPTIONS = \
238183242Ssam    ACCT \
239156813Sru    ACPI \
240183242Ssam    AMD \
241183242Ssam    APM \
242162210Simp    ASSERT_DEBUG \
243183242Ssam    AT \
244241823Smarcel    ATF \
245156813Sru    ATM \
246156813Sru    AUDIT \
247156813Sru    AUTHPF \
248156813Sru    BIND \
249156813Sru    BIND_DNSSEC \
250156813Sru    BIND_ETC \
251156813Sru    BIND_LIBS_LWRES \
252156813Sru    BIND_MTREE \
253156813Sru    BIND_NAMED \
254156813Sru    BIND_UTILS \
255222090Simp    BINUTILS \
256156813Sru    BLUETOOTH \
257156813Sru    BOOT \
258179815Sdougb    BSD_CPIO \
259183242Ssam    BSNMP \
260166255Sdelphij    BZIP2 \
261156813Sru    CALENDAR \
262229319Srwatson    CAPSICUM \
263163861Sjb    CDDL \
264156813Sru    CPP \
265156813Sru    CRYPT \
266183242Ssam    CTM \
267156813Sru    CVS \
268156813Sru    CXX \
269156813Sru    DICT \
270156813Sru    DYNAMICROOT \
271235654Smarcel    ED_CRYPTO \
272156813Sru    EXAMPLES \
273183242Ssam    FLOPPY \
274156813Sru    FORTH \
275156813Sru    FP_LIBC \
276183242Ssam    FREEBSD_UPDATE \
277156813Sru    GAMES \
278222090Simp    GCC \
279156813Sru    GCOV \
280156813Sru    GDB \
281156813Sru    GNU \
282156813Sru    GPIB \
283220359Simp    GPIO \
284156813Sru    GROFF \
285156813Sru    HTML \
286221266Sbz    INET \
287156813Sru    INET6 \
288156813Sru    INFO \
289172832Sru    INSTALLLIB \
290156813Sru    IPFILTER \
291183242Ssam    IPFW \
292156813Sru    IPX \
293183242Ssam    JAIL \
294240404Sobrien    KDUMP \
295156813Sru    KERBEROS \
296222185Simp    KERNEL_SYMBOLS \
297170644Ssepotvin    KVM \
298183242Ssam    LEGACY_CONSOLE \
299157115Sru    LIB32 \
300156813Sru    LIBPTHREAD \
301156813Sru    LIBTHR \
302156813Sru    LOCALES \
303183242Ssam    LOCATE \
304156813Sru    LPR \
305235655Smarcel    LS_COLORS \
306183242Ssam    MAIL \
307156813Sru    MAILWRAPPER \
308183242Ssam    MAKE \
309156813Sru    MAN \
310183242Ssam    NDIS \
311156813Sru    NETCAT \
312183242Ssam    NETGRAPH \
313156813Sru    NIS \
314156813Sru    NLS \
315156813Sru    NLS_CATALOGS \
316158115Sume    NS_CACHING \
317183242Ssam    NTP \
318156813Sru    OPENSSH \
319156813Sru    OPENSSL \
320156813Sru    PAM \
321245606Seadler    PC_SYSINSTALL \
322156813Sru    PF \
323238010Sglebius    PKGBOOTSTRAP \
324183242Ssam    PKGTOOLS \
325183242Ssam    PMC \
326183242Ssam    PORTSNAP \
327183242Ssam    PPP \
328228196Sfjoe    PROFILE \
329183242Ssam    QUOTAS \
330156813Sru    RCMDS \
331156813Sru    RCS \
332156813Sru    RESCUE \
333183242Ssam    ROUTED \
334156813Sru    SENDMAIL \
335156813Sru    SETUID_LOGIN \
336156813Sru    SHAREDOCS \
337244527Semaste    SOURCELESS \
338244527Semaste    SOURCELESS_HOST \
339244527Semaste    SOURCELESS_UCODE \
340169724Skan    SSP \
341169524Sdeischen    SYMVER \
342156813Sru    SYSCONS \
343244527Semaste    SYSINSTALL \
344156813Sru    TCSH \
345183242Ssam    TELNET \
346183242Ssam    TEXTPROC \
347156813Sru    TOOLCHAIN \
348156813Sru    USB \
349223209Sed    UTMPX \
350183242Ssam    WIRELESS \
351168409Spjd    WPA_SUPPLICANT_EAPOL \
352175617Sru    ZFS \
353175617Sru    ZONEINFO
354220359Simp
355220359Simp__DEFAULT_NO_OPTIONS = \
356245539Sandrew    ARM_EABI \
357246074Sgabor    BSD_PATCH \
358220359Simp    BIND_IDN \
359220359Simp    BIND_LARGE_FILE \
360220359Simp    BIND_LIBS \
361220359Simp    BIND_SIGCHASE \
362220359Simp    BIND_XML \
363244527Semaste    BMAKE \
364238438Sdteske    BSDCONFIG \
365244527Semaste    BSD_GREP \
366231057Sdim    CLANG_EXTRAS \
367228158Sfjoe    CTF \
368245803Stheraven    GPL_DTC \
369220359Simp    HESIOD \
370220359Simp    ICONV \
371220359Simp    IDEA \
372237612Sobrien    INSTALL_AS_USER \
373245241Sbrooks    NMTREE \
374235537Sgber    NAND \
375234782Skib    OFED \
376245527Sbz    OPENSSH_NONE_CIPHER \
377234782Skib    SHARED_TOOLCHAIN
378220359Simp
379220359Simp#
380220359Simp# Default behaviour of some options depends on the architecture.  Unfortunately
381220359Simp# this means that we have to test TARGET_ARCH (the buildworld case) as well
382220359Simp# as MACHINE_ARCH (the non-buildworld case).  Normally TARGET_ARCH is not
383220359Simp# used at all in bsd.*.mk, but we have to make an exception here if we want
384221726Sru# to allow defaults for some things like clang and fdt to vary by target
385220359Simp# architecture.
386220359Simp#
387220359Simp.if defined(TARGET_ARCH)
388220359Simp__T=${TARGET_ARCH}
389220359Simp.else
390220359Simp__T=${MACHINE_ARCH}
391220359Simp.endif
392227775Snwhitehorn# Clang is only for x86 and powerpc right now, by default.
393235133Sdim.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*}
394220359Simp__DEFAULT_YES_OPTIONS+=CLANG
395220359Simp.else
396220359Simp__DEFAULT_NO_OPTIONS+=CLANG
397220359Simp.endif
398242624Sbrooks# Clang the default system compiler only on x86.
399242624Sbrooks.if ${__T} == "amd64" || ${__T} == "i386"
400242624Sbrooks__DEFAULT_YES_OPTIONS+=CLANG_IS_CC
401242624Sbrooks.else
402242624Sbrooks__DEFAULT_NO_OPTIONS+=CLANG_IS_CC
403242624Sbrooks.endif
404227775Snwhitehorn# FDT is needed only for arm, mips and powerpc
405227775Snwhitehorn.if ${__T:Marm*} || ${__T:Mpowerpc*} || ${__T:Mmips*}
406220359Simp__DEFAULT_YES_OPTIONS+=FDT
407220359Simp.else
408220359Simp__DEFAULT_NO_OPTIONS+=FDT
409220359Simp.endif
410220359Simp.undef __T
411220359Simp
412220359Simp#
413220359Simp# MK_* options which default to "yes".
414220359Simp#
415220359Simp.for var in ${__DEFAULT_YES_OPTIONS}
416156813Sru.if defined(WITH_${var}) && defined(WITHOUT_${var})
417156813Sru.error WITH_${var} and WITHOUT_${var} can't both be set.
418156813Sru.endif
419156813Sru.if defined(MK_${var})
420156813Sru.error MK_${var} can't be set by a user.
421156813Sru.endif
422156813Sru.if defined(WITHOUT_${var})
423156813SruMK_${var}:=	no
424156813Sru.else
425156813SruMK_${var}:=	yes
426156813Sru.endif
427156813Sru.endfor
428220359Simp.undef __DEFAULT_YES_OPTIONS
429156813Sru
430156813Sru#
431156813Sru# MK_* options which default to "no".
432156813Sru#
433220359Simp.for var in ${__DEFAULT_NO_OPTIONS}
434156813Sru.if defined(WITH_${var}) && defined(WITHOUT_${var})
435156813Sru.error WITH_${var} and WITHOUT_${var} can't both be set.
436156813Sru.endif
437156813Sru.if defined(MK_${var})
438156813Sru.error MK_${var} can't be set by a user.
439156813Sru.endif
440156813Sru.if defined(WITH_${var})
441156813SruMK_${var}:=	yes
442156813Sru.else
443156813SruMK_${var}:=	no
444156813Sru.endif
445156813Sru.endfor
446220359Simp.undef __DEFAULT_NO_OPTIONS
447156813Sru
448156813Sru#
449156813Sru# Force some options off if their dependencies are off.
450172571Sru# Order is somewhat important.
451156813Sru#
452172571Sru.if ${MK_LIBPTHREAD} == "no"
453172571SruMK_LIBTHR:=	no
454172571Sru.endif
455172571Sru
456177714Sru.if ${MK_LIBTHR} == "no"
457172571SruMK_BIND:=	no
458172571Sru.endif
459172571Sru
460156813Sru.if ${MK_BIND} == "no"
461156813SruMK_BIND_DNSSEC:= no
462156813SruMK_BIND_ETC:=	no
463156813SruMK_BIND_LIBS:=	no
464156813SruMK_BIND_LIBS_LWRES:= no
465156813SruMK_BIND_MTREE:=	no
466156813SruMK_BIND_NAMED:=	no
467156813SruMK_BIND_UTILS:=	no
468156813Sru.endif
469156813Sru
470157378Sphk.if ${MK_BIND_MTREE} == "no"
471157378SphkMK_BIND_ETC:=	no
472157378Sphk.endif
473157378Sphk
474230972Srmh.if ${MK_SOURCELESS} == "no"
475230972SrmhMK_SOURCELESS_HOST:=	no
476230972SrmhMK_SOURCELESS_UCODE:= no
477230972Srmh.endif
478230972Srmh
479168409Spjd.if ${MK_CDDL} == "no"
480168409SpjdMK_ZFS:=	no
481228158SfjoeMK_CTF:=	no
482168409Spjd.endif
483168409Spjd
484156813Sru.if ${MK_CRYPT} == "no"
485156813SruMK_OPENSSL:=	no
486156813SruMK_OPENSSH:=	no
487156813SruMK_KERBEROS:=	no
488156813Sru.endif
489156813Sru
490220401Suqs.if ${MK_CXX} == "no"
491220401SuqsMK_CLANG:=	no
492220401SuqsMK_GROFF:=	no
493220401Suqs.endif
494220401Suqs
495183242Ssam.if ${MK_MAIL} == "no"
496183242SsamMK_MAILWRAPPER:= no
497183242SsamMK_SENDMAIL:=	no
498183242Ssam.endif
499183242Ssam
500202440Santoine.if ${MK_NETGRAPH} == "no"
501202440SantoineMK_ATM:=	no
502202440SantoineMK_BLUETOOTH:=	no
503202440Santoine.endif
504202440Santoine
505156813Sru.if ${MK_OPENSSL} == "no"
506156813SruMK_OPENSSH:=	no
507156813SruMK_KERBEROS:=	no
508156813Sru.endif
509156813Sru
510156813Sru.if ${MK_PF} == "no"
511156813SruMK_AUTHPF:=	no
512156813Sru.endif
513156813Sru
514183242Ssam.if ${MK_TEXTPROC} == "no"
515183242SsamMK_GROFF:=	no
516183242Ssam.endif
517183242Ssam
518156813Sru.if ${MK_TOOLCHAIN} == "no"
519222090SimpMK_BINUTILS:=	no
520208964SrdivackyMK_CLANG:=	no
521222090SimpMK_GCC:=	no
522156813SruMK_GDB:=	no
523156813Sru.endif
524156813Sru
525232322Sdim.if ${MK_CLANG} == "no"
526246131SdimMK_CLANG_EXTRAS:= no
527232322SdimMK_CLANG_IS_CC:= no
528232322Sdim.endif
529232322Sdim
530156813Sru#
531156813Sru# Set defaults for the MK_*_SUPPORT variables.
532156813Sru#
533156813Sru
534156813Sru#
535156813Sru# MK_*_SUPPORT options which default to "yes" unless their corresponding
536156813Sru# MK_* variable is set to "no".
537156813Sru#
538156813Sru.for var in \
539166255Sdelphij    BZIP2 \
540156813Sru    GNU \
541221266Sbz    INET \
542156813Sru    INET6 \
543156813Sru    IPX \
544156813Sru    KERBEROS \
545170644Ssepotvin    KVM \
546183242Ssam    NETGRAPH \
547183242Ssam    PAM \
548183242Ssam    WIRELESS
549156813Sru.if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT)
550156813Sru.error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set.
551156813Sru.endif
552156813Sru.if defined(MK_${var}_SUPPORT)
553156813Sru.error MK_${var}_SUPPORT can't be set by a user.
554156813Sru.endif
555156813Sru.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
556156813SruMK_${var}_SUPPORT:= no
557156813Sru.else
558156813SruMK_${var}_SUPPORT:= yes
559156813Sru.endif
560156813Sru.endfor
561174548Sru
562174548Sru#
563174548Sru# MK_* options whose default value depends on another option.
564174548Sru#
565174548Sru.for vv in \
566208320Sjkim    GSSAPI/KERBEROS \
567208320Sjkim    MAN_UTILS/MAN
568174548Sru.if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H})
569174548Sru.error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set.
570174548Sru.endif
571174548Sru.if defined(MK_${vv:H})
572174548Sru.error MK_${vv:H} can't be set by a user.
573174548Sru.endif
574174548Sru.if defined(WITH_${vv:H})
575174548SruMK_${vv:H}:=	yes
576174548Sru.elif defined(WITHOUT_${vv:H})
577174548SruMK_${vv:H}:=	no
578174548Sru.else
579174548SruMK_${vv:H}:=	${MK_${vv:T}}
580174548Sru.endif
581174548Sru.endfor
582174548Sru
583240966Sbrooks#
584240966Sbrooks# MK_* options that default to "yes" if the compiler is a C++11 compiler.
585240966Sbrooks#
586240966Sbrooks.include <bsd.compiler.mk>
587240966Sbrooks.for var in \
588240966Sbrooks    LIBCPLUSPLUS
589240966Sbrooks.if defined(WITH_${var}) && defined(WITHOUT_${var})
590240966Sbrooks.error WITH_${var} and WITHOUT_${var} can't both be set.
591240966Sbrooks.endif
592240966Sbrooks.if defined(MK_${var})
593240966Sbrooks.error MK_${var} can't be set by a user.
594240966Sbrooks.endif
595240966Sbrooks.if ${COMPILER_FEATURES:Mc++11}
596240966Sbrooks.if defined(WITHOUT_${var})
597240966SbrooksMK_${var}:=	no
598240966Sbrooks.else
599240966SbrooksMK_${var}:=	yes
600240966Sbrooks.endif
601240966Sbrooks.else
602240966Sbrooks.if defined(WITH_${var})
603240966SbrooksMK_${var}:=	yes
604240966Sbrooks.else
605240966SbrooksMK_${var}:=	no
606240966Sbrooks.endif
607240966Sbrooks.endif
608240966Sbrooks.endfor
609240966Sbrooks
610228158Sfjoe.if ${MK_CTF} != "no"
611228158SfjoeCTFCONVERT_CMD=	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
612243393Ssjg.elif defined(.PARSEDIR) || (defined(MAKE_VERSION) && ${MAKE_VERSION} >= 5201111300)
613228158SfjoeCTFCONVERT_CMD=
614228158Sfjoe.else
615228158SfjoeCTFCONVERT_CMD=	@:
616228158Sfjoe.endif 
617228158Sfjoe
618237612Sobrien.if ${MK_INSTALL_AS_USER} != "no"
619243392Ssjg_uid!=	id -u
620237612Sobrien.if ${_uid} != 0
621243392Ssjg.if !defined(USER)
622243392SsjgUSER!=	id -un
623243392Ssjg.endif
624237612Sobrien_gid!=	id -gn
625237612Sobrien.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE
626243392Ssjg$xOWN=	${USER}
627237612Sobrien$xGRP=	${_gid}
628237612Sobrien.endfor
629237612Sobrien.endif
630237612Sobrien.endif
631237612Sobrien
632164411Sru.endif # !_WITHOUT_SRCCONF
633156813Sru
634144893Sharti.endif	# !target(__<bsd.own.mk>__)
635