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 Kernel and KLD owner. [${BINOWN}] 48# 49# KMODGRP Kernel and 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.if !defined(_WITHOUT_SRCCONF) 108SRCCONF?= /etc/src.conf 109.if exists(${SRCCONF}) 110.include "${SRCCONF}" 111.endif 112.endif 113 114# Binaries 115BINOWN?= root 116BINGRP?= wheel 117BINMODE?= 555 118NOBINMODE?= 444 119 120.if defined(MODULES_WITH_WORLD) 121KMODDIR?= /boot/modules 122.else 123KMODDIR?= /boot/kernel 124.endif 125KMODOWN?= ${BINOWN} 126KMODGRP?= ${BINGRP} 127KMODMODE?= ${BINMODE} 128 129LIBDIR?= /usr/lib 130LIBCOMPATDIR?= /usr/lib/compat 131LIBDATADIR?= /usr/libdata 132LINTLIBDIR?= /usr/libdata/lint 133SHLIBDIR?= ${LIBDIR} 134LIBOWN?= ${BINOWN} 135LIBGRP?= ${BINGRP} 136LIBMODE?= ${NOBINMODE} 137 138 139# Share files 140SHAREDIR?= /usr/share 141SHAREOWN?= root 142SHAREGRP?= wheel 143SHAREMODE?= ${NOBINMODE} 144 145MANDIR?= ${SHAREDIR}/man/man 146MANOWN?= ${SHAREOWN} 147MANGRP?= ${SHAREGRP} 148MANMODE?= ${NOBINMODE} 149 150DOCDIR?= ${SHAREDIR}/doc 151DOCOWN?= ${SHAREOWN} 152DOCGRP?= ${SHAREGRP} 153DOCMODE?= ${NOBINMODE} 154 155INFODIR?= ${SHAREDIR}/info 156INFOOWN?= ${SHAREOWN} 157INFOGRP?= ${SHAREGRP} 158INFOMODE?= ${NOBINMODE} 159 160NLSDIR?= ${SHAREDIR}/nls 161NLSOWN?= ${SHAREOWN} 162NLSGRP?= ${SHAREGRP} 163NLSMODE?= ${NOBINMODE} 164 165INCLUDEDIR?= /usr/include 166 167# Common variables 168.if !defined(DEBUG_FLAGS) 169STRIP?= -s 170.endif 171 172COMPRESS_CMD?= gzip -cn 173COMPRESS_EXT?= .gz 174 175.if !defined(_WITHOUT_SRCCONF) 176# 177# Define MK_* variables (which are either "yes" or "no") for users 178# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the 179# make(1) environment. 180# These should be tested with `== "no"' or `!= "no"' in makefiles. 181# The NO_* variables should only be set by makefiles. 182# 183 184# 185# Supported NO_* options (if defined, MK_* will be forced to "no", 186# regardless of user's setting). 187# 188.for var in \ 189 INSTALLLIB \ 190 MAN \ 191 PROFILE 192.if defined(NO_${var}) 193WITHOUT_${var}= 194.endif 195.endfor 196 197# 198# Compat NO_* options (same as above, except their use is deprecated). 199# 200.if !defined(BURN_BRIDGES) 201.for var in \ 202 ACPI \ 203 ATM \ 204 AUDIT \ 205 AUTHPF \ 206 BIND \ 207 BIND_DNSSEC \ 208 BIND_ETC \ 209 BIND_LIBS_LWRES \ 210 BIND_MTREE \ 211 BIND_NAMED \ 212 BIND_UTILS \ 213 BLUETOOTH \ 214 BOOT \ 215 CALENDAR \ 216 CPP \ 217 CRYPT \ 218 CVS \ 219 CXX \ 220 DICT \ 221 DYNAMICROOT \ 222 EXAMPLES \ 223 FORTH \ 224 FP_LIBC \ 225 GAMES \ 226 GCOV \ 227 GDB \ 228 GNU \ 229 GPIB \ 230 GROFF \ 231 HTML \ 232 INET6 \ 233 INFO \ 234 IPFILTER \ 235 IPX \ 236 KERBEROS \ 237 LIB32 \ 238 LIBPTHREAD \ 239 LIBTHR \ 240 LOCALES \ 241 LPR \ 242 MAILWRAPPER \ 243 NETCAT \ 244 NIS \ 245 NLS \ 246 NLS_CATALOGS \ 247 NS_CACHING \ 248 OBJC \ 249 OPENSSH \ 250 OPENSSL \ 251 PAM \ 252 PF \ 253 RCMDS \ 254 RCS \ 255 RESCUE \ 256 SENDMAIL \ 257 SETUID_LOGIN \ 258 SHAREDOCS \ 259 SYSCONS \ 260 TCSH \ 261 TOOLCHAIN \ 262 USB \ 263 WPA_SUPPLICANT_EAPOL 264.if defined(NO_${var}) 265#.warning NO_${var} is deprecated in favour of WITHOUT_${var}= 266WITHOUT_${var}= 267.endif 268.endfor 269.endif # !defined(BURN_BRIDGES) 270 271# 272# Older-style variables that enabled behaviour when set. 273# 274.if defined(YES_HESIOD) 275WITH_HESIOD= 276.endif 277.if defined(MAKE_IDEA) 278WITH_IDEA= 279.endif 280 281# 282# MK_* options which default to "yes". 283# 284.for var in \ 285 ACCT \ 286 ACPI \ 287 AMD \ 288 APM \ 289 ASSERT_DEBUG \ 290 AT \ 291 ATM \ 292 AUDIT \ 293 AUTHPF \ 294 BIND \ 295 BIND_DNSSEC \ 296 BIND_ETC \ 297 BIND_LIBS_LWRES \ 298 BIND_MTREE \ 299 BIND_NAMED \ 300 BIND_UTILS \ 301 BLUETOOTH \ 302 BOOT \ 303 BSD_CPIO \ 304 BSNMP \ 305 BZIP2 \ 306 CALENDAR \ 307 CDDL \ 308 CPP \ 309 CRYPT \ 310 CTM \ 311 CVS \ 312 CXX \ 313 DICT \ 314 DYNAMICROOT \ 315 EXAMPLES \ 316 FLOPPY \ 317 FORTH \ 318 FP_LIBC \ 319 FREEBSD_UPDATE \ 320 GAMES \ 321 GCOV \ 322 GDB \ 323 GNU \ 324 GNU_GREP \ 325 GPIB \ 326 GROFF \ 327 HTML \ 328 INET6 \ 329 INFO \ 330 INSTALLLIB \ 331 IPFILTER \ 332 IPFW \ 333 IPX \ 334 JAIL \ 335 KERBEROS \ 336 KVM \ 337 LEGACY_CONSOLE \ 338 LIB32 \ 339 LIBPTHREAD \ 340 LIBTHR \ 341 LOCALES \ 342 LOCATE \ 343 LPR \ 344 MAIL \ 345 MAILWRAPPER \ 346 MAKE \ 347 MAN \ 348 NCP \ 349 NDIS \ 350 NETCAT \ 351 NETGRAPH \ 352 NIS \ 353 NLS \ 354 NLS_CATALOGS \ 355 NS_CACHING \ 356 NTP \ 357 OBJC \ 358 OPENSSH \ 359 OPENSSL \ 360 PAM \ 361 PF \ 362 PKGTOOLS \ 363 PMC \ 364 PORTSNAP \ 365 PPP \ 366 PROFILE \ 367 QUOTAS \ 368 RCMDS \ 369 RCS \ 370 RESCUE \ 371 ROUTED \ 372 SENDMAIL \ 373 SETUID_LOGIN \ 374 SHAREDOCS \ 375 SSP \ 376 SYSINSTALL \ 377 SYMVER \ 378 SYSCONS \ 379 TCSH \ 380 TELNET \ 381 TEXTPROC \ 382 TOOLCHAIN \ 383 USB \ 384 WIRELESS \ 385 WPA_SUPPLICANT_EAPOL \ 386 ZFS \ 387 ZONEINFO 388.if defined(WITH_${var}) && defined(WITHOUT_${var}) 389.error WITH_${var} and WITHOUT_${var} can't both be set. 390.endif 391.if defined(MK_${var}) 392.error MK_${var} can't be set by a user. 393.endif 394.if defined(WITHOUT_${var}) 395MK_${var}:= no 396.else 397MK_${var}:= yes 398.endif 399.endfor 400 401# 402# MK_* options which default to "no". 403# 404.for var in \ 405 BIND_IDN \ 406 BIND_LARGE_FILE \ 407 BIND_LIBS \ 408 BIND_SIGCHASE \ 409 BIND_XML \ 410 GNU_CPIO \ 411 HESIOD \ 412 IDEA 413.if defined(WITH_${var}) && defined(WITHOUT_${var}) 414.error WITH_${var} and WITHOUT_${var} can't both be set. 415.endif 416.if defined(MK_${var}) 417.error MK_${var} can't be set by a user. 418.endif 419.if defined(WITH_${var}) 420MK_${var}:= yes 421.else 422MK_${var}:= no 423.endif 424.endfor 425 426# 427# Force some options off if their dependencies are off. 428# Order is somewhat important. 429# 430.if ${MK_LIBPTHREAD} == "no" 431MK_LIBTHR:= no 432.endif 433 434.if ${MK_LIBTHR} == "no" 435MK_BIND:= no 436.endif 437 438.if ${MK_BIND} == "no" 439MK_BIND_DNSSEC:= no 440MK_BIND_ETC:= no 441MK_BIND_LIBS:= no 442MK_BIND_LIBS_LWRES:= no 443MK_BIND_MTREE:= no 444MK_BIND_NAMED:= no 445MK_BIND_UTILS:= no 446.endif 447 448.if ${MK_BIND_MTREE} == "no" 449MK_BIND_ETC:= no 450.endif 451 452.if ${MK_CDDL} == "no" 453MK_ZFS:= no 454.endif 455 456.if ${MK_CRYPT} == "no" 457MK_OPENSSL:= no 458MK_OPENSSH:= no 459MK_KERBEROS:= no 460.endif 461 462.if ${MK_IPX} == "no" 463MK_NCP:= no 464.endif 465 466.if ${MK_MAIL} == "no" 467MK_MAILWRAPPER:= no 468MK_SENDMAIL:= no 469.endif 470 471.if ${MK_OPENSSL} == "no" 472MK_OPENSSH:= no 473MK_KERBEROS:= no 474.endif 475 476.if ${MK_PF} == "no" 477MK_AUTHPF:= no 478.endif 479 480.if ${MK_TEXTPROC} == "no" 481MK_GROFF:= no 482.endif 483 484.if ${MK_TOOLCHAIN} == "no" 485MK_GDB:= no 486.endif 487 488# 489# Set defaults for the MK_*_SUPPORT variables. 490# 491 492# 493# MK_*_SUPPORT options which default to "yes" unless their corresponding 494# MK_* variable is set to "no". 495# 496.for var in \ 497 BZIP2 \ 498 GNU \ 499 INET6 \ 500 IPX \ 501 KERBEROS \ 502 KVM \ 503 NETGRAPH \ 504 PAM \ 505 WIRELESS 506.if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT) 507.error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set. 508.endif 509.if defined(MK_${var}_SUPPORT) 510.error MK_${var}_SUPPORT can't be set by a user. 511.endif 512.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" 513MK_${var}_SUPPORT:= no 514.else 515MK_${var}_SUPPORT:= yes 516.endif 517.endfor 518 519# 520# MK_* options whose default value depends on another option. 521# 522.for vv in \ 523 GSSAPI/KERBEROS 524.if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H}) 525.error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set. 526.endif 527.if defined(MK_${vv:H}) 528.error MK_${vv:H} can't be set by a user. 529.endif 530.if defined(WITH_${vv:H}) 531MK_${vv:H}:= yes 532.elif defined(WITHOUT_${vv:H}) 533MK_${vv:H}:= no 534.else 535MK_${vv:H}:= ${MK_${vv:T}} 536.endif 537.endfor 538 539.endif # !_WITHOUT_SRCCONF 540 541.endif # !target(__<bsd.own.mk>__) 542