Makefile revision 49bfb42b00abac0958a1308f4233e366fd083366
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# CDDL HEADER START
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# The contents of this file are subject to the terms of the
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# Common Development and Distribution License (the "License").
41e51b972f02e8b16c19fab9160294ea0a07c343Timo Sirainen# You may not use this file except in compliance with the License.
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# See the License for the specific language governing permissions
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# and limitations under the License.
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# When distributing Covered Code, include this CDDL HEADER in each
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# If applicable, add the following below this CDDL HEADER, with the
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# fields enclosed by brackets "[]" replaced with your own identifying
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# information: Portions Copyright [yyyy] [name of copyright owner]
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# CDDL HEADER END
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# Use is subject to license terms.
47255691575e06a1c95ce78ff0a1b502199de3abTimo Sirainen# Note that the commands 'agents', 'lp', 'perl', and 'man' are first in
45af47783693b3ba2768c5ad34eeff68132382d0Timo Sirainen# the list, violating alphabetical order. This is because they are very
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# long-running and should be given the most wall-clock time for a
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# parallel build.
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# Commands in the FIRST_SUBDIRS list are built before starting the build
3d651cf1a2171471bf6f0a41dcf7388d43206636Timo Sirainen# of other commands. Currently this includes only 'isaexec' and
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# 'platexec'. This is necessary because $(ROOT)/usr/lib/isaexec or
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# $(ROOT)/usr/lib/platexec must exist when some other commands are built
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# because their 'make install' creates a hard link to one of them.
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# Commands are listed one per line so that TeamWare can auto-merge most
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# Commands that are messaged. Note that 'lp' and 'man' come first
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# (see previous comment about 'lp' and 'man').
d519a0449d0e536a32db93305516fdbd7db6773dTimo Sirainen# commands that use dcgettext for localized time, LC_TIME
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# commands that belong only to audit and device allocation
d9b9687bf8cae9cfb070b1b7aadefa683220269fTimo Sirainen# commands not owned by the systems group
d9b9687bf8cae9cfb070b1b7aadefa683220269fTimo Sirainen.PARALLEL: $(BWOSDIRS) $(SUBDIRS) $(MSGSUBDIRS) $(AUDITSUBDIRS)
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainenall install clean clobber lint: $(FIRST_SUBDIRS) .WAIT $(SUBDIRS) \
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# Manifests cannot be checked in parallel, because we are using
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# the global repository that is in $(SRC)/cmd/svc/seed/global.db.
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# For this reason, to avoid .PARALLEL and .NO_PARALLEL conflicts,
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# we spawn off a sub-make to perform the non-parallel 'make check'
d8bdf558c7ba173fc47a194633d9bd97af1b9c74Timo Sirainen# The .WAIT directive works around an apparent bug in parallel make.
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# Evidently make was getting the target _msg vs. _dc confused under
86bde2c1838d1ce967fa2b394bb952004a4adcb7Timo Sirainen# some level of parallelization, causing some of the _dc objects
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# not to be built.
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen_msg: $(MSGSUBDIRS) $($(MACH)_MSGSUBDIRS) .WAIT _dc
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29Timo Sirainen# Dependencies
e1bef591ed45c5baf6b5bdc69fb7fa5ff05df2b6Timo Sirainen$(FIRST_SUBDIRS) $(BWOSDIRS) $(SUBDIRS) $(AUDITSUBDIRS): FRC
e1bef591ed45c5baf6b5bdc69fb7fa5ff05df2b6Timo Sirainen @if [ -f $@/Makefile ]; then \