2N/A# The contents of this file are subject to the terms of the 2N/A# Common Development and Distribution License (the "License"). 2N/A# You may not use this file except in compliance with the License. 2N/A# See the License for the specific language governing permissions 2N/A# and limitations under the License. 2N/A# When distributing Covered Code, include this CDDL HEADER in each 2N/A# If applicable, add the following below this CDDL HEADER, with the 2N/A# fields enclosed by brackets "[]" replaced with your own identifying 2N/A# information: Portions Copyright [yyyy] [name of copyright owner] 2N/A# Copyright (c) 1989, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A# Note that libcurses installs commands along with its library. 2N/A# This is a minor bug which probably should be fixed. 2N/A# Note also that a few extra libraries are kept in cmd source. 2N/A# Certain libraries are linked with, hence depend on, other libraries. 2N/A# We have historically used .WAIT to express dependencies, with the 2N/A# undesirable effect of reducing the amount of parallelism achieved, 2N/A# and lengthening the time it takes to build the libraries. To minimize 2N/A# this, we would also express makefile dependencies between the objects 2N/A# that would otherwise have had .WAIT barriers between them. This approach 2N/A# - The make rules are complex, change over time, and errors are not 2N/A# automatically detectable. As such, the rules at any given time are 2N/A# likely to be at best a close approximation to the real situation. 2N/A# - Requiring a build order means that objects cannot have a mutual 2N/A# dependency on each other, even in cases where the runtime linker 2N/A# would have no issue with them. 2N/A# - There is still serialization in the builds, though less than there 2N/A# would be otherwise. 2N/A# We therefore now use stub shared objects, which can be built very quickly, 2N/A# and which eliminate the need for ordering. Before starting to build the 2N/A# real objects, we create an alternative proto root containing stub versions 2N/A# of the shared objects built by this consolidation. Then, we proceed to build 2N/A# most of the real objects in the workspace in parallel, using the stub 2N/A# objects at link-time. 2N/A# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate, 2N/A# but required due to the "dependencies" of using .WAIT to barrier the 2N/A# parallel dmake builds. once 4631488 has been fixed, they can be 2N/A# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as 2N/A# shown in HDRSUBDIRS 2N/A# Library interdependencies are called out explicitly here. Due to the 2N/A# use of stub objects, this should only be necessary when an object 2N/A# depends on something other than a shared object, such as compiled 2N/A# libc and libike depend on closed bits 2N/A# The runtime linker (../cmd/sgs/rtld) requires system call traps and 2N/A# The reason this rule checks for the existence of the 2N/A# Makefile is that some of the directories do not exist 2N/A# in certain situations (e.g., exportable source builds,