Makefile revision 0209230bf1261579beab4f55226bb509e6b850cb
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick# CDDL HEADER START
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# The contents of this file are subject to the terms of the
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# Common Development and Distribution License (the "License").
35330e0d79ceb8027223bbb8330a381b1f989d6etrawick# You may not use this file except in compliance with the License.
6f6f4a4bca281779d196acbdd5c017bb90858305trawick# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
09bd86d0db1114ee23eda0a6eb76ca055877a1cftrawick# See the License for the specific language governing permissions
2deb319e6b3de239f45c16a3e9e836d44f1f7108rbb# and limitations under the License.
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanoj# When distributing Covered Code, include this CDDL HEADER in each
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# If applicable, add the following below this CDDL HEADER, with the
4a81c8eb2a61b43a9dd0879a65feb834a6dde1d5stoddard# fields enclosed by brackets "[]" replaced with your own identifying
447c6ce3ff08073c44f6785d5256271fcb877512wrowe# information: Portions Copyright [yyyy] [name of copyright owner]
447c6ce3ff08073c44f6785d5256271fcb877512wrowe# CDDL HEADER END
a9de2fcc94b1c6eebb717fe14b80d066598cb8d3trawick# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
73cbcafbe4c5ce51e6ba8043d33235fde09b6e94trawick# Use is subject to license terms.
73cbcafbe4c5ce51e6ba8043d33235fde09b6e94trawick# ident "%Z%%M% %I% %E% SMI"
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard# Note that libcurses installs commands along with its library.
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard# This is a minor bug which probably should be fixed.
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard# Note also that a few extra libraries are kept in cmd source.
10b386767f6c87b45937244371cb751f0b454d16wrowe# Certain libraries are linked with, hence depend on, other libraries.
863ec32e13d6c9619414c48b51109f3dca99cbc6wrowe# Although we have historically used .WAIT to express dependencies, it
863ec32e13d6c9619414c48b51109f3dca99cbc6wrowe# reduces the amount of parallelism and thus lengthens the time it
75960f20f88dad6bc67892c711c429946063d133stoddard# takes to build the libraries. Thus, we now require that any new
75960f20f88dad6bc67892c711c429946063d133stoddard# libraries explicitly call out their dependencies. Eventually, all
75960f20f88dad6bc67892c711c429946063d133stoddard# the library dependencies will be called out explicitly. See
75960f20f88dad6bc67892c711c429946063d133stoddard# "Library interdependencies" near the end of this file.
75960f20f88dad6bc67892c711c429946063d133stoddard# Aside from explicit dependencies (and legacy .WAITs), all libraries
75960f20f88dad6bc67892c711c429946063d133stoddard# are built in parallel.
10b386767f6c87b45937244371cb751f0b454d16wrowe# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
10b386767f6c87b45937244371cb751f0b454d16wrowe# but required due to the "dependencies" of using .WAIT to barrier the
10b386767f6c87b45937244371cb751f0b454d16wrowe# parallel dmake builds. once 4631488 has been fixed, they can be
10b386767f6c87b45937244371cb751f0b454d16wrowe# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
a9e07e4f90adcc7bc768db3055431c3dcd560cd1manoj# shown in HDRSUBDIRS
28d1da9ca818f831ea491f110dafcc10f7f07050coar# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
64ad864fa0f4493eebb181e393b40a8a90beccb9coar# clean and clobber targets (for more information, see those targets, below).
28d1da9ca818f831ea491f110dafcc10f7f07050coar# For the all and install targets, we clearly must respect library
64ad864fa0f4493eebb181e393b40a8a90beccb9coar# dependencies so that the libraries link correctly. However, for
64ad864fa0f4493eebb181e393b40a8a90beccb9coar# the remaining targets (check, clean, clobber, install_h, lint, _dc
64ad864fa0f4493eebb181e393b40a8a90beccb9coar# and _msg), libraries do not have any dependencies on one another
28d1da9ca818f831ea491f110dafcc10f7f07050coar# and thus respecting dependencies just slows down the build.
64ad864fa0f4493eebb181e393b40a8a90beccb9coar# As such, for these rules, we use pattern replacement to explicitly
64ad864fa0f4493eebb181e393b40a8a90beccb9coar# avoid triggering the dependency information. Note that for clean,
64ad864fa0f4493eebb181e393b40a8a90beccb9coar# clobber and lint, we must use $(NOWAIT_SUBDIRS) rather than
28d1da9ca818f831ea491f110dafcc10f7f07050coar# $(SUBDIRS), to prevent `.WAIT' from expanding to `.WAIT-nodepend'.
64ad864fa0f4493eebb181e393b40a8a90beccb9coar# extra libraries kept in other source areas
28d1da9ca818f831ea491f110dafcc10f7f07050coar# dependencies for pam_modules (see below)
28d1da9ca818f831ea491f110dafcc10f7f07050coar# Library interdependencies are called out explicitly here
64ad864fa0f4493eebb181e393b40a8a90beccb9coargss_mechs/mech_krb5: libgss libnsl libsocket libresolv pkcs11
64ad864fa0f4493eebb181e393b40a8a90beccb9coarlibzonecfg: libc libsocket libnsl libuuid libnvpair libsysevent libsec \
64ad864fa0f4493eebb181e393b40a8a90beccb9coarlibwanboot: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
64ad864fa0f4493eebb181e393b40a8a90beccb9coarlibzfs: libdevinfo libdevid libgen libnvpair libuutil libiscsitgt
64ad864fa0f4493eebb181e393b40a8a90beccb9coar# The reason this rule checks for the existence of the
64ad864fa0f4493eebb181e393b40a8a90beccb9coar# Makefile is that some of the directories do not exist
64ad864fa0f4493eebb181e393b40a8a90beccb9coar# in certain situations (e.g., exportable source builds,
28d1da9ca818f831ea491f110dafcc10f7f07050coar# OpenSolaris).
64ad864fa0f4493eebb181e393b40a8a90beccb9coar @if [ -f $@/Makefile ]; then \