# CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2011, Richard Lowe # Copyright (c) 2012 by Delphix. All rights reserved. # Copyright (c) 2012, Igor Kozhukhov # Copyright 2012 OmniTI Computer Consulting, Inc. All rights reserved. # Copyright 2014 Garrett D'Amore # Copyright 2016 Hans Rosenfeld # Copyright 2017 Nexenta Systems, Inc. # Copyright 2017 RackTop Systems. # Copyright 2022 OmniOS Community Edition (OmniOSce) Association. # Copyright 2020 Joyent, Inc. # # # It is easier to think in terms of directory names without the ROOT macro # prefix. ROOTDIRS is TARGETDIRS with ROOT prefixes. It is necessary # to work with ROOT prefixes when controlling conditional assignments. # DIRLINKS= $(SYM.DIRS) $(BUILD64) DIRLINKS += $(SYM.DIRS64) TARGETDIRS= $(DIRS) $(BUILD64) TARGETDIRS += $(DIRS64) TARGETDIRS += $(FILELINKS) $(DIRLINKS) i386_DIRS= \ /boot/acpi \ /boot/acpi/tables \ /boot/grub \ /boot/grub/bin \ /platform/i86pc \ /lib/libmvec \ /usr/lib/xen \ /usr/lib/xen/bin \ /usr/share/bhyve sparc_DIRS= \ /usr/lib/ldoms sparc_64ONLY= $(POUND_SIGN) 64ONLY= $($(MACH)_64ONLY) $(64ONLY) MACH32_DIRS=/usr/ucb/$(MACH32) PYTHON2_DIRS= PYTHON2_64DIRS= PYTHON3_DIRS= $(BUILDPY2)PYTHON2_DIRS += \ /usr/lib/python$(PYTHON_VERSION) \ /usr/lib/python$(PYTHON_VERSION)/vendor-packages \ /usr/lib/python$(PYTHON_VERSION)/vendor-packages/solaris \ /usr/lib/python$(PYTHON_VERSION)/vendor-packages/zfs $(BUILDPY2)PYTHON2_64DIRS += \ /usr/lib/python$(PYTHON_VERSION)/vendor-packages/64 \ /usr/lib/python$(PYTHON_VERSION)/vendor-packages/solaris/64 \ /usr/lib/python$(PYTHON_VERSION)/vendor-packages/zfs/64 $(BUILDPY3)PYTHON3_DIRS += \ /usr/lib/python$(PYTHON3_VERSION) \ /usr/lib/python$(PYTHON3_VERSION)/vendor-packages \ /usr/lib/python$(PYTHON3_VERSION)/vendor-packages/solaris \ /usr/lib/python$(PYTHON3_VERSION)/vendor-packages/solaris/__pycache__ \ /usr/lib/python$(PYTHON3_VERSION)/vendor-packages/zfs \ /usr/lib/python$(PYTHON3_VERSION)/vendor-packages/zfs/__pycache__ $(BUILDPY3b)PYTHON3_DIRS += \ /usr/lib/python$(PYTHON3b_VERSION) \ /usr/lib/python$(PYTHON3b_VERSION)/vendor-packages \ /usr/lib/python$(PYTHON3b_VERSION)/vendor-packages/solaris \ /usr/lib/python$(PYTHON3b_VERSION)/vendor-packages/solaris/__pycache__ \ /usr/lib/python$(PYTHON3b_VERSION)/vendor-packages/zfs \ /usr/lib/python$(PYTHON3b_VERSION)/vendor-packages/zfs/__pycache__ DIRS= \ /boot \ /boot/solaris \ /boot/solaris/bin \ $($(MACH)_DIRS) \ /dev \ /dev/dsk \ /dev/fd \ /dev/ipnet \ /dev/net \ /dev/rdsk \ /dev/rmt \ /dev/pts \ /dev/sad \ /dev/swap \ /dev/term \ /dev/vt \ /dev/zcons \ /devices \ /devices/pseudo \ /etc \ /etc/brand \ /etc/brand/solaris10 \ /etc/cron.d \ /etc/crypto \ /etc/crypto/certs \ /etc/crypto/crls \ /etc/dbus-1 \ /etc/dbus-1/system.d \ /etc/default \ /etc/devices \ /etc/dev \ /etc/dfs \ /etc/dladm \ /etc/fs \ /etc/fs/nfs \ /etc/fs/zfs \ /etc/ftpd \ /etc/hal \ /etc/hal/fdi \ /etc/hal/fdi/information \ /etc/hal/fdi/information/10freedesktop \ /etc/hal/fdi/information/20thirdparty \ /etc/hal/fdi/information/30user \ /etc/hal/fdi/policy \ /etc/hal/fdi/policy/10osvendor \ /etc/hal/fdi/policy/20thirdparty \ /etc/hal/fdi/policy/30user \ /etc/hal/fdi/preprobe \ /etc/hal/fdi/preprobe/10osvendor \ /etc/hal/fdi/preprobe/20thirdparty \ /etc/hal/fdi/preprobe/30user \ /etc/ipadm \ /etc/iscsi \ /etc/rpcsec \ /etc/security \ /etc/security/auth_attr.d \ /etc/security/exec_attr.d \ /etc/security/prof_attr.d \ /etc/security/tsol \ /etc/gss \ /etc/init.d \ /etc/dhcp \ /etc/lib \ /etc/mail \ /etc/mail/cf \ /etc/mail/cf/cf \ /etc/mail/cf/domain \ /etc/mail/cf/feature \ /etc/mail/cf/m4 \ /etc/mail/cf/mailer \ /etc/mail/cf/ostype \ /etc/mail/cf/sh \ /etc/net-snmp \ /etc/net-snmp/snmp \ /etc/opt \ /etc/rc0.d \ /etc/rc1.d \ /etc/rc2.d \ /etc/rc3.d \ /etc/rcS.d \ /etc/saf \ /etc/sasl \ /etc/sfw \ /etc/skel \ /etc/svc \ /etc/svc/profile \ /etc/svc/profile/site \ /etc/svc/volatile \ /etc/system.d \ /etc/tm \ /etc/usb \ /etc/user_attr.d \ /etc/zfs \ /etc/zones \ /export \ /home \ /lib \ /lib/crypto \ /lib/inet \ /lib/fm \ /lib/secure \ /lib/svc \ /lib/svc/bin \ /lib/svc/capture \ /lib/svc/manifest \ /lib/svc/manifest/milestone \ /lib/svc/manifest/device \ /lib/svc/manifest/system \ /lib/svc/manifest/system/device \ /lib/svc/manifest/system/filesystem \ /lib/svc/manifest/system/security \ /lib/svc/manifest/system/svc \ /lib/svc/manifest/network \ /lib/svc/manifest/network/dns \ /lib/svc/manifest/network/ipsec \ /lib/svc/manifest/network/ldap \ /lib/svc/manifest/network/nfs \ /lib/svc/manifest/network/nis \ /lib/svc/manifest/network/rpc \ /lib/svc/manifest/network/security \ /lib/svc/manifest/network/shares \ /lib/svc/manifest/network/ssl \ /lib/svc/manifest/application \ /lib/svc/manifest/application/management \ /lib/svc/manifest/application/security \ /lib/svc/manifest/application/print \ /lib/svc/manifest/platform \ /lib/svc/manifest/platform/sun4u \ /lib/svc/manifest/platform/sun4v \ /lib/svc/manifest/site \ /lib/svc/method \ /lib/svc/monitor \ /lib/svc/seed \ /lib/svc/share \ /kernel \ /kernel/firmware \ /mnt \ /opt \ /platform \ /proc \ /root \ /sbin \ /system \ /system/boot \ /system/contract \ /system/object \ /tmp \ /usr \ /usr/ast \ /usr/ast/bin \ /usr/bin \ /usr/bin/$(MACH32) \ /usr/ccs \ /usr/ccs/bin \ /usr/ccs/lib \ /usr/demo \ /usr/demo/SOUND \ /usr/games \ /usr/has \ /usr/has/bin \ /usr/has/lib \ /usr/has/man \ /usr/include \ /usr/include/ads \ /usr/include/ast \ /usr/include/fm \ /usr/include/gssapi \ /usr/include/hal \ /usr/include/kerberosv5 \ /usr/include/libmilter \ /usr/include/libpolkit \ /usr/include/sasl \ /usr/include/scsi \ /usr/include/security \ /usr/include/sys/crypto \ /usr/include/tsol \ /usr/kernel \ /usr/kvm \ /usr/lib \ /usr/lib/abi \ /usr/lib/brand \ /usr/lib/brand/ipkg \ /usr/lib/brand/labeled \ /usr/lib/brand/shared \ /usr/lib/brand/sn1 \ /usr/lib/brand/solaris10 \ /usr/lib/class \ /usr/lib/class/FSS \ /usr/lib/class/FX \ /usr/lib/class/IA \ /usr/lib/class/RT \ /usr/lib/class/SDC \ /usr/lib/class/TS \ /usr/lib/crypto \ /usr/lib/elfedit \ /usr/lib/fm \ /usr/lib/font \ /usr/lib/fs \ /usr/lib/fs/nfs \ /usr/lib/fs/proc \ /usr/lib/fs/smb \ /usr/lib/fs/zfs \ /usr/lib/gss \ /usr/lib/hal \ /usr/lib/inet \ /usr/lib/inet/ilb \ /usr/lib/krb5 \ /usr/lib/link_audit \ /usr/lib/lwp \ /usr/lib/mdb \ /usr/lib/mdb/kvm \ /usr/lib/mdb/proc \ /usr/lib/nfs \ /usr/lib/varpd \ /usr/net \ /usr/net/servers \ /usr/lib/pool \ $(PYTHON2_DIRS) \ /usr/lib/rcap \ /usr/lib/rcap/$(MACH32) \ /usr/lib/sa \ /usr/lib/saf \ /usr/lib/sasl \ /usr/lib/scsi \ /usr/lib/secure \ /usr/lib/security \ /usr/lib/smbsrv \ /usr/lib/vscan \ /usr/lib/zfs \ /usr/lib/zones \ /usr/old \ /usr/platform \ /usr/proc \ /usr/proc/bin \ /usr/sadm \ /usr/sadm/install \ /usr/sadm/install/bin \ /usr/sadm/install/scripts \ /usr/sbin \ /usr/sbin/$(MACH32) \ /usr/share \ /usr/share/applications \ /usr/share/audio \ /usr/share/audio/samples \ /usr/share/audio/samples/au \ /usr/share/gnome \ /usr/share/gnome/autostart \ /usr/share/hwdata \ /usr/share/lib \ /usr/share/lib/ccs \ /usr/share/lib/tmac \ /usr/share/lib/ldif \ /usr/share/lib/xml \ /usr/share/lib/xml/dtd \ /usr/share/man \ /usr/share/src \ /usr/ucb \ $(MACH32_DIRS) \ /usr/ucblib \ /usr/xpg4 \ /usr/xpg4/bin \ /usr/xpg4/include \ /usr/xpg4/lib \ /usr/xpg6 \ /usr/xpg6/bin \ /var \ /var/adm \ /var/adm/exacct \ /var/adm/log \ /var/adm/pool \ /var/adm/sa \ /var/adm/sm.bin \ /var/adm/streams \ /var/cores \ /var/cron \ /var/db \ /var/db/ipf \ /var/games \ /var/idmap \ /var/krb5 \ /var/krb5/rcache \ /var/krb5/rcache/root \ /var/ld \ /var/log \ /var/log/pool \ /var/logadm \ /var/mail \ /var/news \ /var/opt \ /var/preserve \ /var/run \ /var/saf \ /var/sadm \ /var/sadm/install \ /var/sadm/install/admin \ /var/sadm/install/logs \ /var/sadm/pkg \ /var/sadm/security \ /var/smb \ /var/smb/cvol \ /var/smb/cvol/windows \ /var/smb/cvol/windows/system32 \ /var/smb/cvol/windows/system32/vss \ /var/spool \ /var/spool/cron \ /var/spool/cron/atjobs \ /var/spool/cron/crontabs \ /var/spool/lp \ /var/spool/pkg \ /var/spool/uucp \ /var/spool/uucppublic \ /var/svc \ /var/svc/log \ /var/svc/manifest \ /var/svc/manifest/milestone \ /var/svc/manifest/device \ /var/svc/manifest/system \ /var/svc/manifest/system/device \ /var/svc/manifest/system/filesystem \ /var/svc/manifest/system/security \ /var/svc/manifest/system/svc \ /var/svc/manifest/network \ /var/svc/manifest/network/dns \ /var/svc/manifest/network/ipsec \ /var/svc/manifest/network/ldap \ /var/svc/manifest/network/nfs \ /var/svc/manifest/network/nis \ /var/svc/manifest/network/rpc \ /var/svc/manifest/network/routing \ /var/svc/manifest/network/security \ /var/svc/manifest/network/shares \ /var/svc/manifest/network/ssl \ /var/svc/manifest/application \ /var/svc/manifest/application/management \ /var/svc/manifest/application/print \ /var/svc/manifest/application/security \ /var/svc/manifest/platform \ /var/svc/manifest/platform/sun4u \ /var/svc/manifest/platform/sun4v \ /var/svc/manifest/site \ /var/svc/profile \ /var/uucp \ /var/tmp \ /var/tsol \ /var/tsol/doors sparcv9_DIRS64= \ /platform/sun4u \ /platform/sun4u/lib \ /platform/sun4u/lib/$(MACH64) \ /usr/platform/sun4u \ /usr/platform/sun4u/sbin \ /usr/platform/sun4u/lib \ /platform/sun4v/lib \ /platform/sun4v/lib/$(MACH64) \ /usr/platform/sun4v/sbin \ /usr/platform/sun4v/lib \ /usr/platform/sun4u-us3/lib \ /usr/platform/sun4u-opl/lib amd64_DIRS64= \ /platform/i86pc/amd64 DIRS64= \ $($(MACH64)_DIRS64) \ /lib/$(MACH64) \ /lib/crypto/$(MACH64) \ /lib/fm/$(MACH64) \ /lib/secure/$(MACH64) \ /usr/bin/$(MACH64) \ /usr/ccs/bin/$(MACH64) \ /usr/ccs/lib/$(MACH64) \ /usr/lib/$(MACH64) \ /usr/lib/$(MACH64)/gss \ /usr/lib/brand/sn1/$(MACH64) \ /usr/lib/brand/solaris10/$(MACH64) \ /usr/lib/elfedit/$(MACH64) \ /usr/lib/fm/$(MACH64) \ /usr/lib/fs/nfs/$(MACH64) \ /usr/lib/fs/smb/$(MACH64) \ /usr/lib/inet/$(MACH64) \ /usr/lib/krb5/$(MACH64) \ /usr/lib/link_audit/$(MACH64) \ /usr/lib/lwp/$(MACH64) \ /usr/lib/mdb/kvm/$(MACH64) \ /usr/lib/mdb/proc/$(MACH64) \ $(PYTHON2_64DIRS) \ $(PYTHON3_DIRS) \ /usr/lib/rcap/$(MACH64) \ /usr/lib/sasl/$(MACH64) \ /usr/lib/scsi/$(MACH64) \ /usr/lib/secure/$(MACH64) \ /usr/lib/security/$(MACH64) \ /usr/lib/smbsrv/$(MACH64) \ /usr/lib/abi/$(MACH64) \ /usr/lib/varpd/$(MACH64) \ /usr/sbin/$(MACH64) \ /usr/ucb/$(MACH64) \ /usr/ucblib/$(MACH64) \ /usr/xpg4/lib/$(MACH64) \ /var/ld/$(MACH64) # /var/mail/:saved is built directly by the rootdirs target in # /usr/src/Makefile because of the colon in its name. # macros for symbolic links SYM.DIRS= \ /bin \ /dev/stdin \ /dev/stdout \ /dev/stderr \ /etc/log \ /lib/32 \ /lib/crypto/32 \ /lib/secure/32 \ /usr/adm \ /usr/spool \ /usr/lib/tmac \ /usr/ccs/lib/link_audit \ /usr/news \ /usr/preserve \ /usr/lib/32 \ /usr/lib/cron \ /usr/lib/elfedit/32 \ /usr/lib/lwp/32 \ /usr/lib/link_audit/32 \ /usr/lib/secure/32 \ /usr/mail \ /usr/man \ /usr/pub \ /usr/src \ /usr/tmp \ /usr/ucblib/32 \ /var/ld/32 sparc_SYM.DIRS64= SYM.DIRS64= \ $($(MACH)_SYM.DIRS64) \ /lib/64 \ /lib/crypto/64 \ /lib/secure/64 \ /usr/lib/64 \ /usr/lib/brand/sn1/64 \ /usr/lib/brand/solaris10/64 \ /usr/lib/elfedit/64 \ /usr/lib/link_audit/64 \ /usr/lib/lwp/64 \ /usr/lib/secure/64 \ /usr/lib/security/64 \ /usr/lib/varpd/64 \ /usr/xpg4/lib/64 \ /var/ld/64 \ /usr/ucblib/64 # prepend the ROOT prefix ROOTDIRS= $(TARGETDIRS:%=$(ROOT)%) # conditional assignments # # Target directories with non-default values for owner and group must # be referenced here, using their fully-prefixed names, and the non- # default values assigned. If a directory is mentioned above and not # mentioned below, it has default values for attributes. # # The default value for DIRMODE is specified in usr/src/Makefile.master. # $(ROOT)/var/adm \ $(ROOT)/var/adm/sa := DIRMODE= 775 $(ROOT)/var/spool/lp:= DIRMODE= 775 # file mode # $(ROOT)/tmp \ $(ROOT)/var/krb5/rcache \ $(ROOT)/var/preserve \ $(ROOT)/var/spool/pkg \ $(ROOT)/var/spool/uucppublic \ $(ROOT)/var/tmp:= DIRMODE= 1777 $(ROOT)/root:= DIRMODE= 700 $(ROOT)/var/krb5/rcache/root:= DIRMODE= 700 # # These permissions must match those set # in the package manifests. # $(ROOT)/var/sadm/pkg \ $(ROOT)/var/sadm/security \ $(ROOT)/var/sadm/install/logs := DIRMODE= 555 # # These permissions must match the ones set # internally by fdfs and autofs. # $(ROOT)/dev/fd \ $(ROOT)/home:= DIRMODE= 555 $(ROOT)/var/mail:= DIRMODE=1777 $(ROOT)/proc:= DIRMODE= 555 $(ROOT)/system/boot:= DIRMODE= 555 $(ROOT)/system/contract:= DIRMODE= 555 $(ROOT)/system/object:= DIRMODE= 555 # symlink assignments, LINKDEST is the value of the symlink # $(ROOT)/usr/lib/cron:= LINKDEST=../../etc/cron.d $(ROOT)/bin:= LINKDEST=usr/bin $(ROOT)/lib/32:= LINKDEST=. $(ROOT)/lib/crypto/32:= LINKDEST=. $(ROOT)/lib/secure/32:= LINKDEST=. $(ROOT)/dev/stdin:= LINKDEST=fd/0 $(ROOT)/dev/stdout:= LINKDEST=fd/1 $(ROOT)/dev/stderr:= LINKDEST=fd/2 $(ROOT)/usr/pub:= LINKDEST=share/lib/pub $(ROOT)/usr/man:= LINKDEST=share/man $(ROOT)/usr/src:= LINKDEST=share/src $(ROOT)/usr/adm:= LINKDEST=../var/adm $(ROOT)/etc/log:= LINKDEST=../var/adm/log $(ROOT)/usr/mail:= LINKDEST=../var/mail $(ROOT)/usr/news:= LINKDEST=../var/news $(ROOT)/usr/preserve:= LINKDEST=../var/preserve $(ROOT)/usr/spool:= LINKDEST=../var/spool $(ROOT)/usr/tmp:= LINKDEST=../var/tmp $(ROOT)/usr/lib/tmac:= LINKDEST=../share/lib/tmac $(ROOT)/usr/lib/32:= LINKDEST=. $(ROOT)/usr/lib/elfedit/32:= LINKDEST=. $(ROOT)/usr/lib/lwp/32:= LINKDEST=. $(ROOT)/usr/lib/link_audit/32:= LINKDEST=. $(ROOT)/usr/lib/secure/32:= LINKDEST=. $(ROOT)/usr/ccs/lib/link_audit:= LINKDEST=../../lib/link_audit $(ROOT)/var/ld/32:= LINKDEST=. $(ROOT)/usr/ucblib/32:= LINKDEST=. $(BUILD64) $(ROOT)/lib/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/lib/crypto/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/lib/secure/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/elfedit/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/brand/sn1/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/brand/solaris10/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/lwp/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/link_audit/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/secure/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/security/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/varpd/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/xpg4/lib/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/var/ld/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/ucblib/64:= LINKDEST=$(MACH64) # # Installing a directory symlink calls for overriding INS.dir to install # a symlink. # $(DIRLINKS:%=$(ROOT)%):= \ INS.dir= -$(RM) -r $@; $(SYMLINK) $(LINKDEST) $@