Makefile revision 433
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# CDDL HEADER START
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# The contents of this file are subject to the terms of the
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# Common Development and Distribution License (the "License").
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# You may not use this file except in compliance with the License.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# See the License for the specific language governing permissions
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# and limitations under the License.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# When distributing Covered Code, include this CDDL HEADER in each
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# If applicable, add the following below this CDDL HEADER, with the
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# CDDL HEADER END
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# for now, the assumption is we build any directory with a Makefile. This may
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# not always be the case. If we build a new make-like tool to drive the upper
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# level build, it may make different decisions and will need to include
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# appropriate dependency information.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# components.mk is auto-generated by the build tools. It populates the
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# COMPONENT_DIRS macro with a list of all directories in the workspace that
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# contain a component.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync @echo "Generating component list..."
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync @$(BASS_O_MATIC) --workspace=$(WS_TOP) --components=paths \
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync | sed -e 's;^$(shell pwd)/;COMPONENT_DIRS += ;g' >$@
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# depends.mk is auto-generated by concatenating 'depend.mk' files in each
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# component directory.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync @echo "Generating component dependencies..."
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync @cat $(shell $(BASS_O_MATIC) --workspace=$(WS_TOP) --components=paths \
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync | sed -e 's;^$(shell pwd)/;;g' -e 's;$$;/depend.mk;g') >$@ \
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncprep build install publish test: TEMPLATE_ZONE=$(ZONE)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncprep build install publish test: LOG = >$(WS_LOGS)/$(@F).$(TARGET).log 2>&1
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# turn off pkglint for the individual component builds.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncCOMPONENT_DIRS.nosetup = $(COMPONENT_DIRS:%=%.nosetup)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync $(PKGREPO) add-publisher -s $(PKG_REPO) $(PUBLISHER)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync @echo "Generating pkglint(1) cache from $(CANONICAL_REPO)..."
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync @(echo "set name=fmri value=pkg:/dummy" | $(PKGLINT) \
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync -c $(WS_LINT_CACHE) -r $(CANONICAL_REPO) /dev/fd/0 \
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync >$(WS_LOGS)/naughty-canonical-repo-actions 2>&1 ; exit 0)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync @cd ../tools ; echo "building tools..." ; $(GMAKE) setup
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# $(WS_COMPONENTS) is the home directory for the zone user, so create a profile
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# to pass a few things on to zone based builds
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync echo "export PATH WS_TOP" >>$@
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync $(BASS_O_MATIC) $(TEMPLATE_ZONE:%=--template-zone %) \
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# pkglint all of the published manifests in one batch.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync @echo 'pkglinting all package manifests...'
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync @cd $(@:%.nosetup=%) && echo "$(TARGET) $(@:%.nosetup=%)" && \
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync $(BASS_O_MATIC) $(TEMPLATE_ZONE:%=--template-zone %) \