150476Speter# $FreeBSD$ 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# 31255384Sdes# LIBPRIVATEDIR Base path for private libraries. [/usr/lib/private] 32255384Sdes# 3332216Swosch# LIBDATADIR Base path for misc. utility data files. [/usr/libdata] 3432216Swosch# 35218525Skeramida# LIBEXECDIR Base path for system daemons and utilities. [/usr/libexec] 36218525Skeramida# 3715903Swosch# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] 3815903Swosch# 3915903Swosch# SHLIBDIR Base path for shared libraries. [${LIBDIR}] 4015903Swosch# 41119057Sobrien# LIBOWN Library owner. [${BINOWN}] 4215903Swosch# 4315903Swosch# LIBGRP Library group. [${BINGRP}] 4415903Swosch# 4515903Swosch# LIBMODE Library mode. [${NOBINMODE}] 4615903Swosch# 4715903Swosch# 48251512Semaste# DEBUGDIR Base path for standalone debug files. [/usr/lib/debug] 49251512Semaste# 50251512Semaste# DEBUGMODE Mode for debug files. [${NOBINMODE}] 51251512Semaste# 52251512Semaste# 5315903Swosch# KMODDIR Base path for loadable kernel modules 5465501Sobrien# (see kld(4)). [/boot/kernel] 5515903Swosch# 56186894Sbz# KMODOWN Kernel and KLD owner. [${BINOWN}] 5715903Swosch# 58186894Sbz# KMODGRP Kernel and KLD group. [${BINGRP}] 5915903Swosch# 6053033Sphantom# KMODMODE KLD mode. [${BINMODE}] 6115903Swosch# 6215903Swosch# 6315903Swosch# SHAREDIR Base path for architecture-independent ascii 6415903Swosch# text files. [/usr/share] 6515903Swosch# 6639161Sobrien# SHAREOWN ASCII text file owner. [root] 6715903Swosch# 6839161Sobrien# SHAREGRP ASCII text file group. [wheel] 6915903Swosch# 7015903Swosch# SHAREMODE ASCII text file mode. [${NOBINMODE}] 7115903Swosch# 7215903Swosch# 73223596Sse# CONFDIR Base path for configuration files. [/etc] 74223596Sse# 75223596Sse# CONFOWN Configuration file owner. [root] 76223596Sse# 77223596Sse# CONFGRP Configuration file group. [wheel] 78223596Sse# 79223596Sse# CONFMODE Configuration file mode. [644] 80223596Sse# 81223596Sse# 8215903Swosch# DOCDIR Base path for system documentation (e.g. PSD, USD, 8315903Swosch# handbook, FAQ etc.). [${SHAREDIR}/doc] 8415903Swosch# 8515903Swosch# DOCOWN Documentation owner. [${SHAREOWN}] 8615903Swosch# 8715903Swosch# DOCGRP Documentation group. [${SHAREGRP}] 8815903Swosch# 8915903Swosch# DOCMODE Documentation mode. [${NOBINMODE}] 9015903Swosch# 9115903Swosch# 9215903Swosch# INFODIR Base path for GNU's hypertext system 9315903Swosch# called Info (see info(1)). [${SHAREDIR}/info] 9415903Swosch# 9515903Swosch# INFOOWN Info owner. [${SHAREOWN}] 9615903Swosch# 9715903Swosch# INFOGRP Info group. [${SHAREGRP}] 9815903Swosch# 9915903Swosch# INFOMODE Info mode. [${NOBINMODE}] 10015903Swosch# 10115903Swosch# 10215903Swosch# MANDIR Base path for manual installation. [${SHAREDIR}/man/man] 10315903Swosch# 10415903Swosch# MANOWN Manual owner. [${SHAREOWN}] 10515903Swosch# 10615903Swosch# MANGRP Manual group. [${SHAREGRP}] 10715903Swosch# 10815903Swosch# MANMODE Manual mode. [${NOBINMODE}] 10915903Swosch# 11015903Swosch# 11115903Swosch# NLSDIR Base path for National Language Support files 11290627Sphantom# installation. [${SHAREDIR}/nls] 11315903Swosch# 11490626Sphantom# NLSOWN National Language Support files owner. [${SHAREOWN}] 11515903Swosch# 11690626Sphantom# NLSGRP National Language Support files group. [${SHAREGRP}] 11715903Swosch# 11861462Sghelmer# NLSMODE National Language Support files mode. [${NOBINMODE}] 11915903Swosch# 12032216Swosch# INCLUDEDIR Base path for standard C include files [/usr/include] 12115903Swosch 12294982Sru.if !target(__<bsd.own.mk>__) 12394982Sru__<bsd.own.mk>__: 12494982Sru 125164411Sru.if !defined(_WITHOUT_SRCCONF) 126156813SruSRCCONF?= /etc/src.conf 127248751Semaste.if exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf" 128156836Sru.include "${SRCCONF}" 129156836Sru.endif 130164411Sru.endif 131156813Sru 13214968Swosch# Binaries 13339161SobrienBINOWN?= root 13439161SobrienBINGRP?= wheel 13514573SwoschBINMODE?= 555 13614968SwoschNOBINMODE?= 444 13714573Swosch 138111853Sru.if defined(MODULES_WITH_WORLD) 139111853SruKMODDIR?= /boot/modules 140111853Sru.else 14165501SobrienKMODDIR?= /boot/kernel 142111853Sru.endif 14348204SjmgKMODOWN?= ${BINOWN} 14448204SjmgKMODGRP?= ${BINGRP} 14548204SjmgKMODMODE?= ${BINMODE} 14648204Sjmg 14714573SwoschLIBDIR?= /usr/lib 14832226SsteveLIBCOMPATDIR?= /usr/lib/compat 149255384SdesLIBPRIVATEDIR?= /usr/lib/private 15032226SsteveLIBDATADIR?= /usr/libdata 151218525SkeramidaLIBEXECDIR?= /usr/libexec 15214573SwoschLINTLIBDIR?= /usr/libdata/lint 15314573SwoschSHLIBDIR?= ${LIBDIR} 15414968SwoschLIBOWN?= ${BINOWN} 15514968SwoschLIBGRP?= ${BINGRP} 15614968SwoschLIBMODE?= ${NOBINMODE} 15714573Swosch 158251512SemasteDEBUGDIR?= /usr/lib/debug 159251512SemasteDEBUGMODE?= ${NOBINMODE} 16014968Swosch 161251512Semaste 16214968Swosch# Share files 16314968SwoschSHAREDIR?= /usr/share 16439161SobrienSHAREOWN?= root 16539161SobrienSHAREGRP?= wheel 16614968SwoschSHAREMODE?= ${NOBINMODE} 16714968Swosch 168223596SseCONFDIR?= /etc 169223596SseCONFOWN?= root 170223596SseCONFGRP?= wheel 171223596SseCONFMODE?= 644 172223596Sse 17314968SwoschMANDIR?= ${SHAREDIR}/man/man 17414968SwoschMANOWN?= ${SHAREOWN} 17514968SwoschMANGRP?= ${SHAREGRP} 17614968SwoschMANMODE?= ${NOBINMODE} 17714968Swosch 17814968SwoschDOCDIR?= ${SHAREDIR}/doc 17914968SwoschDOCOWN?= ${SHAREOWN} 18014968SwoschDOCGRP?= ${SHAREGRP} 18114968SwoschDOCMODE?= ${NOBINMODE} 18214968Swosch 18314968SwoschINFODIR?= ${SHAREDIR}/info 18414968SwoschINFOOWN?= ${SHAREOWN} 18514968SwoschINFOGRP?= ${SHAREGRP} 18614968SwoschINFOMODE?= ${NOBINMODE} 18714968Swosch 18814968SwoschNLSDIR?= ${SHAREDIR}/nls 18990626SphantomNLSOWN?= ${SHAREOWN} 19090626SphantomNLSGRP?= ${SHAREGRP} 19161462SghelmerNLSMODE?= ${NOBINMODE} 19214968Swosch 19332216SwoschINCLUDEDIR?= /usr/include 19432216Swosch 195245752Sbrooks# 196245752Sbrooks# install(1) parameters. 197245752Sbrooks# 198245752SbrooksHRDLINK?= -l h 199245752SbrooksSYMLINK?= -l s 200245752Sbrooks 201245752SbrooksINSTALL_LINK?= ${INSTALL} ${HRDLINK} 202245752SbrooksINSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} 203245752Sbrooks 20414968Swosch# Common variables 205125494Sru.if !defined(DEBUG_FLAGS) 206125494SruSTRIP?= -s 207125494Sru.endif 208125494Sru 20934678SbdeCOMPRESS_CMD?= gzip -cn 21023546SwoschCOMPRESS_EXT?= .gz 21194982Sru 212164411Sru.if !defined(_WITHOUT_SRCCONF) 213156813Sru# 214156813Sru# Define MK_* variables (which are either "yes" or "no") for users 215156813Sru# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the 216156813Sru# make(1) environment. 217156813Sru# These should be tested with `== "no"' or `!= "no"' in makefiles. 218156813Sru# The NO_* variables should only be set by makefiles. 219156813Sru# 220156813Sru 221156813Sru# 222156813Sru# Supported NO_* options (if defined, MK_* will be forced to "no", 223156813Sru# regardless of user's setting). 224156813Sru# 225156813Sru.for var in \ 226228158Sfjoe CTF \ 227251512Semaste DEBUG_FILES \ 228172832Sru INSTALLLIB \ 229156869Sru MAN \ 230156869Sru PROFILE 231156813Sru.if defined(NO_${var}) 232228120Sfjoe.if defined(WITH_${var}) 233228120Sfjoe.undef WITH_${var} 234228120Sfjoe.endif 235156813SruWITHOUT_${var}= 236156813Sru.endif 237156813Sru.endfor 238156813Sru 239156813Sru# 240156813Sru# Older-style variables that enabled behaviour when set. 241156813Sru# 242156813Sru.if defined(YES_HESIOD) 243156813SruWITH_HESIOD= 244156813Sru.endif 245156813Sru 246220359Simp__DEFAULT_YES_OPTIONS = \ 247183242Ssam ACCT \ 248156813Sru ACPI \ 249183242Ssam AMD \ 250183242Ssam APM \ 251253396Sandrew ARM_EABI \ 252162210Simp ASSERT_DEBUG \ 253183242Ssam AT \ 254156813Sru ATM \ 255156813Sru AUDIT \ 256156813Sru AUTHPF \ 257222090Simp BINUTILS \ 258156813Sru BLUETOOTH \ 259250699Ssjg BMAKE \ 260156813Sru BOOT \ 261179815Sdougb BSD_CPIO \ 262183242Ssam BSNMP \ 263166255Sdelphij BZIP2 \ 264156813Sru CALENDAR \ 265229319Srwatson CAPSICUM \ 266163861Sjb CDDL \ 267156813Sru CPP \ 268250659Sbrooks CROSS_COMPILER \ 269156813Sru CRYPT \ 270183242Ssam CTM \ 271156813Sru CXX \ 272156813Sru DICT \ 273156813Sru DYNAMICROOT \ 274235654Smarcel ED_CRYPTO \ 275156813Sru EXAMPLES \ 276183242Ssam FLOPPY \ 277262650Sbrooks FMTREE \ 278250658Sbrooks FORMAT_EXTENSIONS \ 279156813Sru FORTH \ 280156813Sru FP_LIBC \ 281183242Ssam FREEBSD_UPDATE \ 282156813Sru GAMES \ 283156813Sru GCOV \ 284156813Sru GDB \ 285156813Sru GNU \ 286156813Sru GPIB \ 287220359Simp GPIO \ 288266251Sian GPL_DTC \ 289156813Sru GROFF \ 290156813Sru HTML \ 291254273Speter ICONV \ 292221266Sbz INET \ 293156813Sru INET6 \ 294156813Sru INFO \ 295172832Sru INSTALLLIB \ 296156813Sru IPFILTER \ 297183242Ssam IPFW \ 298156813Sru IPX \ 299183242Ssam JAIL \ 300240404Sobrien KDUMP \ 301156813Sru KERBEROS \ 302222185Simp KERNEL_SYMBOLS \ 303170644Ssepotvin KVM \ 304246827Sdes LDNS \ 305255850Sdes LDNS_UTILS \ 306183242Ssam LEGACY_CONSOLE \ 307157115Sru LIB32 \ 308156813Sru LIBPTHREAD \ 309156813Sru LIBTHR \ 310156813Sru LOCALES \ 311183242Ssam LOCATE \ 312156813Sru LPR \ 313235655Smarcel LS_COLORS \ 314183242Ssam MAIL \ 315156813Sru MAILWRAPPER \ 316183242Ssam MAKE \ 317156813Sru MAN \ 318262643Sbrooks NCURSESW \ 319183242Ssam NDIS \ 320156813Sru NETCAT \ 321183242Ssam NETGRAPH \ 322156813Sru NIS \ 323156813Sru NLS \ 324156813Sru NLS_CATALOGS \ 325257460Sbrooks NMTREE \ 326158115Sume NS_CACHING \ 327183242Ssam NTP \ 328156813Sru OPENSSH \ 329156813Sru OPENSSL \ 330156813Sru PAM \ 331245606Seadler PC_SYSINSTALL \ 332156813Sru PF \ 333238010Sglebius PKGBOOTSTRAP \ 334183242Ssam PMC \ 335183242Ssam PORTSNAP \ 336183242Ssam PPP \ 337228196Sfjoe PROFILE \ 338183242Ssam QUOTAS \ 339156813Sru RCMDS \ 340256198Sgjb RCS \ 341156813Sru RESCUE \ 342183242Ssam ROUTED \ 343156813Sru SENDMAIL \ 344156813Sru SETUID_LOGIN \ 345156813Sru SHAREDOCS \ 346244527Semaste SOURCELESS \ 347244527Semaste SOURCELESS_HOST \ 348244527Semaste SOURCELESS_UCODE \ 349169724Skan SSP \ 350251886Speter SVNLITE \ 351169524Sdeischen SYMVER \ 352156813Sru SYSCONS \ 353244527Semaste SYSINSTALL \ 354156813Sru TCSH \ 355183242Ssam TELNET \ 356183242Ssam TEXTPROC \ 357156813Sru TOOLCHAIN \ 358255597Sdes UNBOUND \ 359156813Sru USB \ 360223209Sed UTMPX \ 361268399Semaste VT \ 362183242Ssam WIRELESS \ 363168409Spjd WPA_SUPPLICANT_EAPOL \ 364175617Sru ZFS \ 365175617Sru ZONEINFO 366220359Simp 367220359Simp__DEFAULT_NO_OPTIONS = \ 368244527Semaste BSD_GREP \ 369231057Sdim CLANG_EXTRAS \ 370228158Sfjoe CTF \ 371251512Semaste DEBUG_FILES \ 372220359Simp HESIOD \ 373237612Sobrien INSTALL_AS_USER \ 374255722Semaste LLDB \ 375235537Sgber NAND \ 376234782Skib OFED \ 377245527Sbz OPENSSH_NONE_CIPHER \ 378254654Sae PKGTOOLS \ 379251886Speter SHARED_TOOLCHAIN \ 380253546Sglebius SVN \ 381260013Sjmmv TESTS \ 382253546Sglebius USB_GADGET_EXAMPLES 383220359Simp 384220359Simp# 385220359Simp# Default behaviour of some options depends on the architecture. Unfortunately 386220359Simp# this means that we have to test TARGET_ARCH (the buildworld case) as well 387220359Simp# as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not 388220359Simp# used at all in bsd.*.mk, but we have to make an exception here if we want 389221726Sru# to allow defaults for some things like clang and fdt to vary by target 390220359Simp# architecture. 391220359Simp# 392220359Simp.if defined(TARGET_ARCH) 393220359Simp__T=${TARGET_ARCH} 394220359Simp.else 395220359Simp__T=${MACHINE_ARCH} 396220359Simp.endif 397255321Stheraven.if defined(TARGET) 398255321Stheraven__TT=${TARGET} 399255321Stheraven.else 400255322Stheraven__TT=${MACHINE} 401255321Stheraven.endif 402246354Sandrew# Clang is only for x86, powerpc and little-endian arm right now, by default. 403235133Sdim.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} 404246259Sdim__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL 405246354Sandrew.elif ${__T} == "arm" || ${__T} == "armv6" 406246354Sandrew__DEFAULT_YES_OPTIONS+=CLANG 407246354Sandrew# GCC is unable to build the full clang on arm, disable it by default. 408246354Sandrew__DEFAULT_NO_OPTIONS+=CLANG_FULL 409220359Simp.else 410246259Sdim__DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL 411220359Simp.endif 412248856Sandrew# Clang the default system compiler only on little-endian arm and x86. 413248856Sandrew.if ${__T} == "amd64" || ${__T} == "arm" || ${__T} == "armv6" || \ 414248856Sandrew ${__T} == "i386" 415242624Sbrooks__DEFAULT_YES_OPTIONS+=CLANG_IS_CC 416255321Stheraven# The pc98 bootloader requires gcc to build and so we must leave gcc enabled 417255321Stheraven# for pc98 for now. 418255321Stheraven.if ${__TT} == "pc98" 419255321Stheraven__DEFAULT_NO_OPTIONS+=GNUCXX 420255321Stheraven__DEFAULT_YES_OPTIONS+=GCC 421242624Sbrooks.else 422255321Stheraven__DEFAULT_NO_OPTIONS+=GCC GNUCXX 423255321Stheraven.endif 424255321Stheraven.else 425255321Stheraven# If clang is not cc, then build gcc by default 426242624Sbrooks__DEFAULT_NO_OPTIONS+=CLANG_IS_CC 427255321Stheraven__DEFAULT_YES_OPTIONS+=GCC 428255321Stheraven# And if g++ is c++, build the rest of the GNU C++ stack 429255321Stheraven.if defined(WITHOUT_CXX) 430255321Stheraven__DEFAULT_NO_OPTIONS+=GNUCXX 431255321Stheraven.else 432255321Stheraven__DEFAULT_YES_OPTIONS+=GNUCXX 433242624Sbrooks.endif 434255321Stheraven.endif 435227775Snwhitehorn# FDT is needed only for arm, mips and powerpc 436227775Snwhitehorn.if ${__T:Marm*} || ${__T:Mpowerpc*} || ${__T:Mmips*} 437220359Simp__DEFAULT_YES_OPTIONS+=FDT 438220359Simp.else 439220359Simp__DEFAULT_NO_OPTIONS+=FDT 440220359Simp.endif 441272322Sdelphij# HyperV is only available for x86 and amd64. 442272322Sdelphij.if ${__T} == "amd64" || ${__T} == "i386" 443272322Sdelphij__DEFAULT_YES_OPTIONS+=HYPERV 444272322Sdelphij.else 445272322Sdelphij__DEFAULT_NO_OPTIONS+=HYPERV 446272322Sdelphij.endif 447220359Simp.undef __T 448220359Simp 449220359Simp# 450220359Simp# MK_* options which default to "yes". 451220359Simp# 452220359Simp.for var in ${__DEFAULT_YES_OPTIONS} 453156813Sru.if defined(WITH_${var}) && defined(WITHOUT_${var}) 454156813Sru.error WITH_${var} and WITHOUT_${var} can't both be set. 455156813Sru.endif 456156813Sru.if defined(MK_${var}) 457156813Sru.error MK_${var} can't be set by a user. 458156813Sru.endif 459156813Sru.if defined(WITHOUT_${var}) 460156813SruMK_${var}:= no 461156813Sru.else 462156813SruMK_${var}:= yes 463156813Sru.endif 464156813Sru.endfor 465220359Simp.undef __DEFAULT_YES_OPTIONS 466156813Sru 467156813Sru# 468156813Sru# MK_* options which default to "no". 469156813Sru# 470220359Simp.for var in ${__DEFAULT_NO_OPTIONS} 471156813Sru.if defined(WITH_${var}) && defined(WITHOUT_${var}) 472156813Sru.error WITH_${var} and WITHOUT_${var} can't both be set. 473156813Sru.endif 474156813Sru.if defined(MK_${var}) 475156813Sru.error MK_${var} can't be set by a user. 476156813Sru.endif 477156813Sru.if defined(WITH_${var}) 478156813SruMK_${var}:= yes 479156813Sru.else 480156813SruMK_${var}:= no 481156813Sru.endif 482156813Sru.endfor 483220359Simp.undef __DEFAULT_NO_OPTIONS 484156813Sru 485156813Sru# 486156813Sru# Force some options off if their dependencies are off. 487172571Sru# Order is somewhat important. 488156813Sru# 489172571Sru.if ${MK_LIBPTHREAD} == "no" 490172571SruMK_LIBTHR:= no 491172571Sru.endif 492172571Sru 493246827Sdes.if ${MK_LDNS} == "no" 494246827SdesMK_LDNS_UTILS:= no 495255597SdesMK_UNBOUND:= no 496246827Sdes.endif 497246827Sdes 498230972Srmh.if ${MK_SOURCELESS} == "no" 499230972SrmhMK_SOURCELESS_HOST:= no 500230972SrmhMK_SOURCELESS_UCODE:= no 501230972Srmh.endif 502230972Srmh 503168409Spjd.if ${MK_CDDL} == "no" 504168409SpjdMK_ZFS:= no 505228158SfjoeMK_CTF:= no 506168409Spjd.endif 507168409Spjd 508156813Sru.if ${MK_CRYPT} == "no" 509156813SruMK_OPENSSL:= no 510156813SruMK_OPENSSH:= no 511156813SruMK_KERBEROS:= no 512156813Sru.endif 513156813Sru 514220401Suqs.if ${MK_CXX} == "no" 515220401SuqsMK_CLANG:= no 516220401SuqsMK_GROFF:= no 517220401Suqs.endif 518220401Suqs 519183242Ssam.if ${MK_MAIL} == "no" 520183242SsamMK_MAILWRAPPER:= no 521183242SsamMK_SENDMAIL:= no 522183242Ssam.endif 523183242Ssam 524202440Santoine.if ${MK_NETGRAPH} == "no" 525202440SantoineMK_ATM:= no 526202440SantoineMK_BLUETOOTH:= no 527202440Santoine.endif 528202440Santoine 529156813Sru.if ${MK_OPENSSL} == "no" 530156813SruMK_OPENSSH:= no 531156813SruMK_KERBEROS:= no 532156813Sru.endif 533156813Sru 534156813Sru.if ${MK_PF} == "no" 535156813SruMK_AUTHPF:= no 536156813Sru.endif 537156813Sru 538183242Ssam.if ${MK_TEXTPROC} == "no" 539183242SsamMK_GROFF:= no 540183242Ssam.endif 541183242Ssam 542156813Sru.if ${MK_TOOLCHAIN} == "no" 543222090SimpMK_BINUTILS:= no 544208964SrdivackyMK_CLANG:= no 545222090SimpMK_GCC:= no 546156813SruMK_GDB:= no 547156813Sru.endif 548156813Sru 549232322Sdim.if ${MK_CLANG} == "no" 550246131SdimMK_CLANG_EXTRAS:= no 551246259SdimMK_CLANG_FULL:= no 552232322Sdim.endif 553232322Sdim 554255722Semaste.if ${MK_CLANG_IS_CC} == "no" 555255722SemasteMK_LLDB:= no 556255722Semaste.endif 557255722Semaste 558260013Sjmmv.if defined(NO_TESTS) 559260013Sjmmv# This should be handled above along the handling of all other NO_* options. 560260013Sjmmv# However, the above is broken when WITH_*=yes are passed to make(1) as 561260013Sjmmv# command line arguments. See PR bin/183762. 562156813Sru# 563260013Sjmmv# Because the TESTS option is new and it will default to yes, it's likely 564260013Sjmmv# that people will pass WITHOUT_TESTS=yes to make(1) directly and get a broken 565260013Sjmmv# build. So, just in case, it's better to explicitly handle this case here. 566260013Sjmmv# 567260013Sjmmv# TODO(jmmv): Either fix make to allow us putting this override where it 568260013Sjmmv# belongs above or fix this file to cope with the make bug. 569260013SjmmvMK_TESTS:= no 570260013Sjmmv.endif 571260013Sjmmv 572260013Sjmmv# 573156813Sru# Set defaults for the MK_*_SUPPORT variables. 574156813Sru# 575156813Sru 576156813Sru# 577156813Sru# MK_*_SUPPORT options which default to "yes" unless their corresponding 578156813Sru# MK_* variable is set to "no". 579156813Sru# 580156813Sru.for var in \ 581166255Sdelphij BZIP2 \ 582156813Sru GNU \ 583221266Sbz INET \ 584156813Sru INET6 \ 585156813Sru IPX \ 586156813Sru KERBEROS \ 587170644Ssepotvin KVM \ 588183242Ssam NETGRAPH \ 589183242Ssam PAM \ 590183242Ssam WIRELESS 591156813Sru.if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT) 592156813Sru.error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set. 593156813Sru.endif 594156813Sru.if defined(MK_${var}_SUPPORT) 595156813Sru.error MK_${var}_SUPPORT can't be set by a user. 596156813Sru.endif 597156813Sru.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" 598156813SruMK_${var}_SUPPORT:= no 599156813Sru.else 600156813SruMK_${var}_SUPPORT:= yes 601156813Sru.endif 602156813Sru.endfor 603174548Sru 604174548Sru# 605174548Sru# MK_* options whose default value depends on another option. 606174548Sru# 607174548Sru.for vv in \ 608208320Sjkim GSSAPI/KERBEROS \ 609208320Sjkim MAN_UTILS/MAN 610174548Sru.if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H}) 611174548Sru.error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set. 612174548Sru.endif 613174548Sru.if defined(MK_${vv:H}) 614174548Sru.error MK_${vv:H} can't be set by a user. 615174548Sru.endif 616174548Sru.if defined(WITH_${vv:H}) 617174548SruMK_${vv:H}:= yes 618174548Sru.elif defined(WITHOUT_${vv:H}) 619174548SruMK_${vv:H}:= no 620174548Sru.else 621174548SruMK_${vv:H}:= ${MK_${vv:T}} 622174548Sru.endif 623174548Sru.endfor 624174548Sru 625240966Sbrooks# 626240966Sbrooks# MK_* options that default to "yes" if the compiler is a C++11 compiler. 627240966Sbrooks# 628240966Sbrooks.include <bsd.compiler.mk> 629240966Sbrooks.for var in \ 630240966Sbrooks LIBCPLUSPLUS 631240966Sbrooks.if defined(WITH_${var}) && defined(WITHOUT_${var}) 632240966Sbrooks.error WITH_${var} and WITHOUT_${var} can't both be set. 633240966Sbrooks.endif 634240966Sbrooks.if defined(MK_${var}) 635240966Sbrooks.error MK_${var} can't be set by a user. 636240966Sbrooks.endif 637240966Sbrooks.if ${COMPILER_FEATURES:Mc++11} 638240966Sbrooks.if defined(WITHOUT_${var}) 639240966SbrooksMK_${var}:= no 640240966Sbrooks.else 641240966SbrooksMK_${var}:= yes 642240966Sbrooks.endif 643240966Sbrooks.else 644240966Sbrooks.if defined(WITH_${var}) 645240966SbrooksMK_${var}:= yes 646240966Sbrooks.else 647240966SbrooksMK_${var}:= no 648240966Sbrooks.endif 649240966Sbrooks.endif 650240966Sbrooks.endfor 651240966Sbrooks 652228158Sfjoe.if ${MK_CTF} != "no" 653228158SfjoeCTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} 654243393Ssjg.elif defined(.PARSEDIR) || (defined(MAKE_VERSION) && ${MAKE_VERSION} >= 5201111300) 655228158SfjoeCTFCONVERT_CMD= 656228158Sfjoe.else 657228158SfjoeCTFCONVERT_CMD= @: 658228158Sfjoe.endif 659228158Sfjoe 660237612Sobrien.if ${MK_INSTALL_AS_USER} != "no" 661243392Ssjg_uid!= id -u 662237612Sobrien.if ${_uid} != 0 663243392Ssjg.if !defined(USER) 664243392SsjgUSER!= id -un 665243392Ssjg.endif 666237612Sobrien_gid!= id -gn 667237612Sobrien.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE 668243392Ssjg$xOWN= ${USER} 669237612Sobrien$xGRP= ${_gid} 670237612Sobrien.endfor 671237612Sobrien.endif 672237612Sobrien.endif 673237612Sobrien 674164411Sru.endif # !_WITHOUT_SRCCONF 675156813Sru 676259962Sjmmv# Pointer to the top directory into which tests are installed. Should not be 677259962Sjmmv# overriden by Makefiles, but the user may choose to set this in src.conf(5). 678259962SjmmvTESTSBASE?= /usr/tests 679259962Sjmmv 680144893Sharti.endif # !target(__<bsd.own.mk>__) 681