Makefile revision 3e1bd7a2aaeb6188caef90679b98088cfef1edc6
bec154197d3d640b0d5b416cd5218ea58dca5d3aTinderbox User# CDDL HEADER START
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The contents of this file are subject to the terms of the
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Common Development and Distribution License, Version 1.0 only
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# (the "License"). You may not use this file except in compliance
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# with the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# When distributing Covered Code, include this CDDL HEADER in each
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If applicable, add the following below this CDDL HEADER, with the
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# information: Portions Copyright [yyyy] [name of copyright owner]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER END
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Use is subject to license terms.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# ident "%Z%%M% %I% %E% SMI"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Note that libcurses installs commands along with its library.
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews# This is a minor bug which probably should be fixed.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Note also that a few extra libraries are kept in cmd source.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Certain libraries are linked with, hence depend on, other libraries.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Although we have historically used .WAIT to express dependencies, it
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# reduces the amount of parallelism and thus lengthens the time it
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# takes to build the libraries. Thus, we now require that any new
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# libraries explicitly call out their dependencies. Eventually, all
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# the library dependencies will be called out explicitly. See
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# "Library interdependencies" near the end of this file.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Aside from explicit dependencies (and legacy .WAITs), all libraries
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews# are built in parallel.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# clean and clobber targets (for more information, see those targets, below).
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# For the all and install targets, we clearly must respect library
b05bdb520d83f7ecaad708fe305268c3420be01dMark Andrews# dependencies so that the libraries link correctly. However, for
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# the remaining targets (check, clean, clobber, install_h, lint, _dc
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and _msg), libraries do not have any dependencies on one another
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and thus respecting dependencies just slows down the build.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# As such, for these rules, we use pattern replacement to explicitly
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# avoid triggering the dependency information. Note that for clean,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# extra libraries kept in other source areas
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclean clobber lint: $(NOWAIT_SUBDIRS:%=%-nodepend)
984c2e9f76e66e86f7d9aca99a774836ddf196eaAutomatic Updaterinstall_h check: $(HDRSUBDIRS:%=%-nodepend)
984c2e9f76e66e86f7d9aca99a774836ddf196eaAutomatic Updater# Library interdependencies are called out explicitly here
984c2e9f76e66e86f7d9aca99a774836ddf196eaAutomatic Updatergss_mechs/mech_krb5: libgss libnsl libsocket libresolv pkcs11
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinlibwanboot: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The reason this rule checks for the existence of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Makefile is that some of the directories do not exist
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# in our exportable source builds.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @if [ -f $@/Makefile ]; then \