bsd.own.mk revision 158687
1195534Sscottl# $FreeBSD: head/share/mk/bsd.own.mk 158687 2006-05-17 09:33:15Z phk $ 2195534Sscottl# 3195534Sscottl# The include file <bsd.own.mk> set common variables for owner, 4195534Sscottl# group, mode, and directories. Defaults are in brackets. 5195534Sscottl# 6195534Sscottl# 7195534Sscottl# +++ variables +++ 8195534Sscottl# 9195534Sscottl# DESTDIR Change the tree where the file gets installed. [not set] 10195534Sscottl# 11195534Sscottl# DISTDIR Change the tree where the file for a distribution 12195534Sscottl# gets installed (see /usr/src/release/Makefile). [not set] 13195534Sscottl# 14195534Sscottl# COMPRESS_CMD Program to compress documents. 15195534Sscottl# Output is to stdout. [gzip -cn] 16195534Sscottl# 17195534Sscottl# COMPRESS_EXT File name extension of ${COMPRESS_CMD} command. [.gz] 18195534Sscottl# 19195534Sscottl# BINOWN Binary owner. [root] 20195534Sscottl# 21195534Sscottl# BINGRP Binary group. [wheel] 22195534Sscottl# 23195534Sscottl# BINMODE Binary mode. [555] 24195534Sscottl# 25195534Sscottl# NOBINMODE Mode for non-executable files. [444] 26195534Sscottl# 27195534Sscottl# LIBDIR Base path for libraries. [/usr/lib] 28195534Sscottl# 29195534Sscottl# LIBCOMPATDIR Base path for compat libraries. [/usr/lib/compat] 30195534Sscottl# 31195534Sscottl# LIBDATADIR Base path for misc. utility data files. [/usr/libdata] 32195534Sscottl# 33195534Sscottl# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] 34195534Sscottl# 35195534Sscottl# SHLIBDIR Base path for shared libraries. [${LIBDIR}] 36195534Sscottl# 37195534Sscottl# LIBOWN Library owner. [${BINOWN}] 38195534Sscottl# 39195534Sscottl# LIBGRP Library group. [${BINGRP}] 40195534Sscottl# 41195534Sscottl# LIBMODE Library mode. [${NOBINMODE}] 42195534Sscottl# 43195534Sscottl# 44195534Sscottl# KMODDIR Base path for loadable kernel modules 45195534Sscottl# (see kld(4)). [/boot/kernel] 46195534Sscottl# 47195534Sscottl# KMODOWN KLD owner. [${BINOWN}] 48195534Sscottl# 49195534Sscottl# KMODGRP KLD group. [${BINGRP}] 50195534Sscottl# 51195534Sscottl# KMODMODE KLD mode. [${BINMODE}] 52195534Sscottl# 53195534Sscottl# 54195534Sscottl# SHAREDIR Base path for architecture-independent ascii 55195534Sscottl# text files. [/usr/share] 56195534Sscottl# 57195534Sscottl# SHAREOWN ASCII text file owner. [root] 58195534Sscottl# 59195534Sscottl# SHAREGRP ASCII text file group. [wheel] 60195534Sscottl# 61195534Sscottl# SHAREMODE ASCII text file mode. [${NOBINMODE}] 62195534Sscottl# 63208375Smav# 64208375Smav# DOCDIR Base path for system documentation (e.g. PSD, USD, 65195534Sscottl# handbook, FAQ etc.). [${SHAREDIR}/doc] 66195534Sscottl# 67196656Smav# DOCOWN Documentation owner. [${SHAREOWN}] 68195534Sscottl# 69195534Sscottl# DOCGRP Documentation group. [${SHAREGRP}] 70195534Sscottl# 71205422Smav# DOCMODE Documentation mode. [${NOBINMODE}] 72195534Sscottl# 73195534Sscottl# 74195534Sscottl# INFODIR Base path for GNU's hypertext system 75195534Sscottl# called Info (see info(1)). [${SHAREDIR}/info] 76195534Sscottl# 77199821Smav# INFOOWN Info owner. [${SHAREOWN}] 78195534Sscottl# 79195534Sscottl# INFOGRP Info group. [${SHAREGRP}] 80195534Sscottl# 81195534Sscottl# INFOMODE Info mode. [${NOBINMODE}] 82195534Sscottl# 83195534Sscottl# 84203123Smav# MANDIR Base path for manual installation. [${SHAREDIR}/man/man] 85195534Sscottl# 86195534Sscottl# MANOWN Manual owner. [${SHAREOWN}] 87195534Sscottl# 88195534Sscottl# MANGRP Manual group. [${SHAREGRP}] 89195534Sscottl# 90195534Sscottl# MANMODE Manual mode. [${NOBINMODE}] 91203108Smav# 92203123Smav# 93195534Sscottl# NLSDIR Base path for National Language Support files 94195534Sscottl# installation. [${SHAREDIR}/nls] 95195534Sscottl# 96195534Sscottl# NLSOWN National Language Support files owner. [${SHAREOWN}] 97195534Sscottl# 98195534Sscottl# NLSGRP National Language Support files group. [${SHAREGRP}] 99195534Sscottl# 100195534Sscottl# NLSMODE National Language Support files mode. [${NOBINMODE}] 101195534Sscottl# 102199176Smav# INCLUDEDIR Base path for standard C include files [/usr/include] 103199176Smav 104203030Smav.if !target(__<bsd.own.mk>__) 105199176Smav__<bsd.own.mk>__: 106199322Smav 107199322SmavSRCCONF?= /etc/src.conf 108199322Smav.if exists(${SRCCONF}) 109199322Smav.include "${SRCCONF}" 110199322Smav.endif 111199322Smav 112199322Smav# Binaries 113199322SmavBINOWN?= root 114203030SmavBINGRP?= wheel 115203123SmavBINMODE?= 555 116207499SmavNOBINMODE?= 444 117199176Smav 118203030Smav.if defined(MODULES_WITH_WORLD) 119203030SmavKMODDIR?= /boot/modules 120203030Smav.else 121203030SmavKMODDIR?= /boot/kernel 122203030Smav.endif 123203030SmavKMODOWN?= ${BINOWN} 124203030SmavKMODGRP?= ${BINGRP} 125203030SmavKMODMODE?= ${BINMODE} 126203030Smav 127203030SmavLIBDIR?= /usr/lib 128203030SmavLIBCOMPATDIR?= /usr/lib/compat 129203030SmavLIBDATADIR?= /usr/libdata 130203030SmavLINTLIBDIR?= /usr/libdata/lint 131203030SmavSHLIBDIR?= ${LIBDIR} 132203030SmavLIBOWN?= ${BINOWN} 133203030SmavLIBGRP?= ${BINGRP} 134203030SmavLIBMODE?= ${NOBINMODE} 135203030Smav 136203030Smav 137203030Smav# Share files 138203030SmavSHAREDIR?= /usr/share 139203030SmavSHAREOWN?= root 140203030SmavSHAREGRP?= wheel 141203030SmavSHAREMODE?= ${NOBINMODE} 142203030Smav 143203030SmavMANDIR?= ${SHAREDIR}/man/man 144203030SmavMANOWN?= ${SHAREOWN} 145203030SmavMANGRP?= ${SHAREGRP} 146203030SmavMANMODE?= ${NOBINMODE} 147203030Smav 148203030SmavDOCDIR?= ${SHAREDIR}/doc 149203030SmavDOCOWN?= ${SHAREOWN} 150203030SmavDOCGRP?= ${SHAREGRP} 151203030SmavDOCMODE?= ${NOBINMODE} 152203030Smav 153203030SmavINFODIR?= ${SHAREDIR}/info 154211922SmavINFOOWN?= ${SHAREOWN} 155211922SmavINFOGRP?= ${SHAREGRP} 156211922SmavINFOMODE?= ${NOBINMODE} 157211922Smav 158211922SmavNLSDIR?= ${SHAREDIR}/nls 159211922SmavNLSOWN?= ${SHAREOWN} 160211922SmavNLSGRP?= ${SHAREGRP} 161211922SmavNLSMODE?= ${NOBINMODE} 162211922Smav 163211922SmavINCLUDEDIR?= /usr/include 164203030Smav 165203030Smav# Common variables 166203030Smav.if !defined(DEBUG_FLAGS) 167203030SmavSTRIP?= -s 168203030Smav.endif 169203030Smav 170203030SmavCOMPRESS_CMD?= gzip -cn 171203030SmavCOMPRESS_EXT?= .gz 172203030Smav 173203123Smav# 174203123Smav# Define MK_* variables (which are either "yes" or "no") for users 175207499Smav# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the 176207499Smav# make(1) environment. 177207499Smav# These should be tested with `== "no"' or `!= "no"' in makefiles. 178207499Smav# The NO_* variables should only be set by makefiles. 179207499Smav# 180207499Smav 181207499Smav# 182207499Smav# Supported NO_* options (if defined, MK_* will be forced to "no", 183207499Smav# regardless of user's setting). 184207499Smav# 185207499Smav.for var in \ 186207499Smav MAN \ 187207499Smav PROFILE 188207499Smav.if defined(NO_${var}) 189207499SmavWITHOUT_${var}= 190207499Smav.endif 191207499Smav.endfor 192207499Smav 193207499Smav# 194207499Smav# Compat NO_* options (same as above, except their use is deprecated). 195207499Smav# 196207499Smav.if !defined(BURN_BRIDGES) 197207499Smav.for var in \ 198207499Smav ACPI \ 199207499Smav ATM \ 200207499Smav AUDIT \ 201207499Smav AUTHPF \ 202207499Smav BIND \ 203207499Smav BIND_DNSSEC \ 204207499Smav BIND_ETC \ 205207499Smav BIND_LIBS_LWRES \ 206207499Smav BIND_MTREE \ 207207499Smav BIND_NAMED \ 208207499Smav BIND_UTILS \ 209207499Smav BLUETOOTH \ 210207499Smav BOOT \ 211207499Smav CALENDAR \ 212207499Smav CPP \ 213207499Smav CRYPT \ 214207499Smav CVS \ 215207499Smav CXX \ 216207499Smav DICT \ 217207499Smav DYNAMICROOT \ 218207499Smav EXAMPLES \ 219207499Smav FORTH \ 220207499Smav FORTRAN \ 221207499Smav FP_LIBC \ 222207499Smav GAMES \ 223207499Smav GCOV \ 224207499Smav GDB \ 225207499Smav GNU \ 226207499Smav GPIB \ 227207499Smav GROFF \ 228207499Smav HTML \ 229207499Smav I4B \ 230207499Smav INET6 \ 231207499Smav INFO \ 232207499Smav IPFILTER \ 233207499Smav IPX \ 234207499Smav KERBEROS \ 235207499Smav LIB32 \ 236207499Smav LIBC_R \ 237207499Smav LIBPTHREAD \ 238207499Smav LIBTHR \ 239207499Smav LOCALES \ 240207499Smav LPR \ 241207499Smav MAILWRAPPER \ 242207499Smav NETCAT \ 243207499Smav NIS \ 244208907Smav NLS \ 245208907Smav NLS_CATALOGS \ 246203030Smav NS_CACHING \ 247203030Smav OBJC \ 248203030Smav OPENSSH \ 249203030Smav OPENSSL \ 250199176Smav PAM \ 251199176Smav PF \ 252195534Sscottl RCMDS \ 253195534Sscottl RCS \ 254195534Sscottl RESCUE \ 255199176Smav SENDMAIL \ 256199322Smav SETUID_LOGIN \ 257199322Smav SHAREDOCS \ 258203030Smav SYSCONS \ 259199322Smav TCSH \ 260199322Smav TOOLCHAIN \ 261199322Smav USB \ 262199322Smav WPA_SUPPLICANT_EAPOL 263199322Smav.if defined(NO_${var}) 264199322Smav#.warning NO_${var} is deprecated in favour of WITHOUT_${var}= 265199322SmavWITHOUT_${var}= 266199322Smav.endif 267199322Smav.endfor 268203030Smav.endif # !defined(BURN_BRIDGES) 269199322Smav 270199717Smav# 271199717Smav# Older-style variables that enabled behaviour when set. 272199717Smav# 273199717Smav.if defined(YES_HESIOD) 274199322SmavWITH_HESIOD= 275199322Smav.endif 276199322Smav.if defined(MAKE_IDEA) 277199322SmavWITH_IDEA= 278199322Smav.endif 279199322Smav 280199322Smav# 281199322Smav# MK_* options which default to "yes". 282199322Smav# 283199322Smav.for var in \ 284199322Smav ACPI \ 285199322Smav ATM \ 286199322Smav AUDIT \ 287199322Smav AUTHPF \ 288199322Smav BIND \ 289199322Smav BIND_DNSSEC \ 290199176Smav BIND_ETC \ 291199176Smav BIND_LIBS_LWRES \ 292203030Smav BIND_MTREE \ 293195534Sscottl BIND_NAMED \ 294199322Smav BIND_UTILS \ 295199322Smav BLUETOOTH \ 296199176Smav BOOT \ 297199176Smav CALENDAR \ 298203030Smav CPP \ 299203030Smav CRYPT \ 300199176Smav CVS \ 301199176Smav CXX \ 302199176Smav DICT \ 303199176Smav DYNAMICROOT \ 304199176Smav EXAMPLES \ 305199176Smav FORTH \ 306199176Smav FORTRAN \ 307195534Sscottl FP_LIBC \ 308195534Sscottl GAMES \ 309195534Sscottl GCOV \ 310195534Sscottl GDB \ 311195534Sscottl GNU \ 312195534Sscottl GPIB \ 313195534Sscottl GROFF \ 314195534Sscottl HTML \ 315199322Smav I4B \ 316199322Smav INET6 \ 317203030Smav INFO \ 318196656Smav IPFILTER \ 319195534Sscottl IPX \ 320195534Sscottl KERBEROS \ 321199322Smav LIB32 \ 322203030Smav LIBC_R \ 323203030Smav LIBPTHREAD \ 324203030Smav LIBTHR \ 325199322Smav LOCALES \ 326199322Smav LPR \ 327196656Smav MAILWRAPPER \ 328196656Smav MAN \ 329195534Sscottl NCP \ 330195534Sscottl NETCAT \ 331195534Sscottl NIS \ 332195534Sscottl NLS \ 333195534Sscottl NLS_CATALOGS \ 334195534Sscottl NS_CACHING \ 335208414Smav OBJC \ 336208414Smav OPENSSH \ 337195534Sscottl OPENSSL \ 338195534Sscottl PAM \ 339195534Sscottl PF \ 340195534Sscottl PROFILE \ 341195534Sscottl RCMDS \ 342195534Sscottl RCS \ 343195534Sscottl RESCUE \ 344195534Sscottl SENDMAIL \ 345195534Sscottl SETUID_LOGIN \ 346195534Sscottl SHAREDOCS \ 347195534Sscottl SYSCONS \ 348195534Sscottl TCSH \ 349207511Smav TOOLCHAIN \ 350195534Sscottl USB \ 351195534Sscottl WPA_SUPPLICANT_EAPOL 352195534Sscottl.if defined(WITH_${var}) && defined(WITHOUT_${var}) 353195534Sscottl.error WITH_${var} and WITHOUT_${var} can't both be set. 354195534Sscottl.endif 355195534Sscottl.if defined(MK_${var}) 356199322Smav.error MK_${var} can't be set by a user. 357199322Smav.endif 358199322Smav.if defined(WITHOUT_${var}) 359199322SmavMK_${var}:= no 360199322Smav.else 361203108SmavMK_${var}:= yes 362203108Smav.endif 363195534Sscottl.endfor 364199322Smav 365199322Smav# 366199322Smav# MK_* options which default to "no". 367199322Smav# 368199322Smav.for var in \ 369199322Smav BIND_LIBS \ 370199322Smav HESIOD \ 371199322Smav IDEA 372199322Smav.if defined(WITH_${var}) && defined(WITHOUT_${var}) 373199322Smav.error WITH_${var} and WITHOUT_${var} can't both be set. 374199322Smav.endif 375199322Smav.if defined(MK_${var}) 376199322Smav.error MK_${var} can't be set by a user. 377199322Smav.endif 378195534Sscottl.if defined(WITH_${var}) 379199322SmavMK_${var}:= yes 380199322Smav.else 381199322SmavMK_${var}:= no 382199322Smav.endif 383199322Smav.endfor 384205422Smav 385205422Smav# 386205422Smav# Force some options off if their dependencies are off. 387195534Sscottl# 388195534Sscottl.if ${MK_BIND} == "no" 389195534SscottlMK_BIND_DNSSEC:= no 390195534SscottlMK_BIND_ETC:= no 391195534SscottlMK_BIND_LIBS:= no 392195534SscottlMK_BIND_LIBS_LWRES:= no 393195534SscottlMK_BIND_MTREE:= no 394196656SmavMK_BIND_NAMED:= no 395195534SscottlMK_BIND_UTILS:= no 396203123Smav.endif 397195534Sscottl 398195534Sscottl.if ${MK_BIND_MTREE} == "no" 399196656SmavMK_BIND_ETC:= no 400195534Sscottl.endif 401195534Sscottl 402196656Smav.if ${MK_CRYPT} == "no" 403203123SmavMK_OPENSSL:= no 404203123SmavMK_OPENSSH:= no 405203123SmavMK_KERBEROS:= no 406195534Sscottl.endif 407195534Sscottl 408196656Smav.if ${MK_IPX} == "no" 409196656SmavMK_NCP:= no 410196656Smav.endif 411196656Smav 412196656Smav.if ${MK_OPENSSL} == "no" 413196656SmavMK_OPENSSH:= no 414196656SmavMK_KERBEROS:= no 415196656Smav.endif 416195534Sscottl 417195534Sscottl.if ${MK_PF} == "no" 418195534SscottlMK_AUTHPF:= no 419196656Smav.endif 420196656Smav 421196656Smav.if ${MK_TOOLCHAIN} == "no" 422196656SmavMK_GDB:= no 423196656Smav.endif 424196656Smav 425196656Smav# 426196656Smav# Set defaults for the MK_*_SUPPORT variables. 427196656Smav# 428196656Smav 429196656Smav# 430195534Sscottl# MK_*_SUPPORT options which default to "yes" unless their corresponding 431196656Smav# MK_* variable is set to "no". 432196656Smav# 433196656Smav.for var in \ 434196656Smav GNU \ 435196656Smav INET6 \ 436196656Smav IPX \ 437203108Smav KERBEROS \ 438203123Smav PAM 439203108Smav.if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT) 440203108Smav.error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set. 441203108Smav.endif 442203108Smav.if defined(MK_${var}_SUPPORT) 443203108Smav.error MK_${var}_SUPPORT can't be set by a user. 444203108Smav.endif 445203108Smav.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" 446203108SmavMK_${var}_SUPPORT:= no 447203108Smav.else 448195534SscottlMK_${var}_SUPPORT:= yes 449195534Sscottl.endif 450195534Sscottl.endfor 451195534Sscottl 452195534Sscottl.endif # !target(__<bsd.own.mk>__) 453195534Sscottl