Makefile revision 618
a32ddb6cabb635ca29ccff87f8bf5c6af3b78ecfstoddard# CDDL HEADER START
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# The contents of this file are subject to the terms of the
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# Common Development and Distribution License (the "License").
9a93784d34c322d1996e8a7b794a75230eac81a4wrowe# You may not use this file except in compliance with the License.
4bc630d510cef730e37b9207e145267f473b4471striker# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
dba571e5c5a2586c7e2b382789f3250136ff7577jwoolley# See the License for the specific language governing permissions
dba571e5c5a2586c7e2b382789f3250136ff7577jwoolley# and limitations under the License.
07847078a10fe4e9229cc08adda5f421cafc0665jwoolley# When distributing Covered Code, include this CDDL HEADER in each
0bd0176ce9f4321eeb506aa372d0bcc84befbf4cstriker# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d8028365066fca602bf35d014530a1802114378crbb# If applicable, add the following below this CDDL HEADER, with the
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# fields enclosed by brackets "[]" replaced with your own identifying
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# information: Portions Copyright [yyyy] [name of copyright owner]
d89c116f82699294ca744125723651c554bc5925wrowe# CDDL HEADER END
8721697e2aece27b0e738519329f7976c72b27bfjerenkrantz# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb# for now, the assumption is we build any directory with a Makefile. This may
ab71b233b3a36489e44a7b061c48293be0b17788jwoolley# not always be the case. If we build a new make-like tool to drive the upper
571760de5e60c0b459cb11be45507b923cd023eejwoolley# level build, it may make different decisions and will need to include
571760de5e60c0b459cb11be45507b923cd023eejwoolley# appropriate dependency information.
bcb6e1be6041dfeb549c8ea8d37f97ad4e90a0c3rbb# components.mk is auto-generated by the build tools. It populates the
9bd71e35f5d26d26d23fe3a677401828e842ed72wrowe# COMPONENT_DIRS macro with a list of all directories in the workspace that
2900ab946a2d76b73a14cebfe2985d253f01c967stoddard# contain a component.
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb @echo "Generating component list..."
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb @$(BASS_O_MATIC) --workspace=$(WS_TOP) --components=paths \
8dd4618c4709236b4ea297d7250d282e463ce2d8rbb# depends.mk is auto-generated by concatenating 'depend.mk' files in each
09bd86d0db1114ee23eda0a6eb76ca055877a1cftrawick# component directory.
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb @echo "Generating component dependencies..."
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanoj @cat $(shell $(BASS_O_MATIC) --workspace=$(WS_TOP) --components=paths \
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj | sed -e 's;^$(shell pwd)/;;g' -e 's;$$;/depend.mk;g') >$@ \
5ca8e11fadb6f7a8d9d0367c1800205c99d4bcd6jerenkrantzprep build install publish test: TEMPLATE_ZONE=$(ZONE)
5ca8e11fadb6f7a8d9d0367c1800205c99d4bcd6jerenkrantzprep build install publish test: LOG = >$(WS_LOGS)/$(@F).$(TARGET).log 2>&1
dbec4658981e4f9127e8676457c28d42932be7cdtrawick# turn off pkglint for the individual component builds.
f95a0b59eb24c631f15bd83e20c6cf823c432d83trawickCOMPONENT_DIRS.nosetup = $(COMPONENT_DIRS:%=%.nosetup)
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz @echo "Generating pkglint(1) cache from $(CANONICAL_REPO)..."
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz @(echo "set name=fmri value=pkg:/dummy@0,$(BUILD_VERSION)" | $(PKGLINT) \
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz -c $(WS_LINT_CACHE) -r $(CANONICAL_REPO) /dev/fd/0 \
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz >$(WS_LOGS)/naughty-canonical-repo-actions 2>&1 ; exit 0)
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz @cd ../tools ; echo "building tools..." ; $(GMAKE) setup
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# $(WS_COMPONENTS) is the home directory for the zone user, so create a profile
cc22a72861c58dda7f3768613aec864e4c4e0353striker# to pass a few things on to zone based builds
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz echo "export PATH WS_TOP" >>$@
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe $(BASS_O_MATIC) $(TEMPLATE_ZONE:%=--template-zone %) \
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe $(WS_TOOLS)/userland-incorporator --repository $(PKG_REPO) \
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe -p pkg:/consolidation/$(CONSOLIDATION)/$(CONSOLIDATION)-incorporation@0.$(OS_VERSION),$(BUILD_VERSION) \
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe -d "This incorporation constrains packages from the $(CONSOLIDATION) consolidation" \
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe -c $(CONSOLIDATION) >$(WS_LOGS)/$(CONSOLIDATION)-incorporation.p5m
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe $(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest \
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe# pkglint all of the published manifests in one batch.
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe @echo 'pkglinting all package manifests...'
630f5fc1277582643fe0f831a4830e15127bd047jwoolley @cd $(@:%.nosetup=%) && echo "$(TARGET) $(@:%.nosetup=%)" && \