Makefile revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER START
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License (the "License").
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You may not use this file except in compliance 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.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If applicable, add the following below this CDDL HEADER, with the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# 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 2007 Sun Microsystems, Inc. All rights reserved.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Use is subject to license terms.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# ident "%Z%%M% %I% %E% SMI"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Note that libcurses installs commands along with its library.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# This is a minor bug which probably should be fixed.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Note also that a few extra libraries are kept in cmd source.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Certain libraries are linked with, hence depend on, other libraries.
32098293b78922a5fbd10906afa28624820d3756Tinderbox User# 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
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# are built in parallel.
010a51c427bfb6ab658fc0056955a1a5b69810beTinderbox User# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User# but required due to the "dependencies" of using .WAIT to barrier the
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User# parallel dmake builds. once 4631488 has been fixed, they can be
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User# shown in HDRSUBDIRS
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Create a special version of $(SUBDIRS) with no .WAIT's, for use with the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# clean and clobber targets (for more information, see those targets, below).
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# For the all and install targets, we clearly must respect library
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# dependencies so that the libraries link correctly. However, for
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# the remaining targets (check, clean, clobber, install_h, lint, _dc
0b89eee6167201843c9a46b7e7c63cb1e4e09ba3Tinderbox User# 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
print: libldap5
# in certain situations (e.g., exportable source builds,
@if [ -f $@/Makefile ]; then \
FRC: