Makefile revision 3468
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# for now, the assumption is we build any directory with a Makefile. This may
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# not always be the case. If we build a new make-like tool to drive the upper
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# level build, it may make different decisions and will need to include
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# appropriate dependency information.
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# components.mk is auto-generated by the build tools. It populates the
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# COMPONENT_DIRS macro with a list of all directories in the workspace that
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# contain a component.
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami @echo "Generating component list..."
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami @$(BASS_O_MATIC) --workspace=$(WS_TOP) --components=paths \
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami | sed -e 's;^$(shell pwd)/;COMPONENT_DIRS += ;g' >$@
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# depends.mk is auto-generated by concatenating 'depend.mk' files in each
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# component directory.
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing Chinadepends.mk: components.mk
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing China @echo "Generating component dependencies..."
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing China @cat $(shell $(BASS_O_MATIC) --workspace=$(WS_TOP) --components=paths \
24d15a9c44ff66447d6bf8c1b90a9f746980de9fyi zhang - Sun Microsystems - Beijing China | sed -e 's;^$(shell pwd)/;;g' -e 's;$$;/depend.mk;g') >$@ \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteprep build install publish test: TEMPLATE_ZONE=$(ZONE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteprep build install publish test: LOG = >$(WS_LOGS)/$(@F).$(TARGET).log 2>&1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# turn off pkglint for the individual component builds.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# In order to work around an IPS simultaneous publication issue and to improve
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# top level build performance, we postpone catalog and index updates until the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# end of the build. Individual component builds postpone the updates until
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# they have published all of their packages.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortepublish: MAKEFLAGS += DISABLE_IPS_CATALOG_AND_INDEX_UPDATES=yes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_DIRS.nosetup = $(COMPONENT_DIRS:%=%.nosetup)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @cd ../tools ; echo "clobbering tools..." ; $(GMAKE) clobber
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesetup: $(WS_LOGS) $(WS_REPO) tools $(WS_LINT_CACHE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(PKGREPO) add-publisher -s $(PKG_REPO) $(PUBLISHER)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(PKGREPO) add-publisher -s $(PKG_REPO) $(PUBLISHER_LOCALIZABLE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteDUMMYPKG = "set name=fmri value=pkg:/dummy@0,$(BUILD_VERSION)\n"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteDUMMYPKG += "set org.opensolaris.consolidation=userland\n"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteDUMMYPKG += "set info.classification=org.opensolaris.category.2008:System/Core"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @echo "Generating pkglint(1) cache from CANONICAL_REPO $(CANONICAL_REPO)..."
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -c $(WS_LINT_CACHE) -r $(CANONICAL_REPO) /dev/fd/0 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte >$(WS_LOGS)/naughty-canonical-repo-actions 2>&1 || \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ( echo "pkglint(1) failed, please see $(WS_LOGS)/naughty-canonical-repo-actions"; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @cd ../tools ; echo "building tools..." ; $(GMAKE) clean setup
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# $(WS_COMPONENTS) is the home directory for the zone user, so create a profile
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# to pass a few things on to zone based builds
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "export PATH WS_TOP" >>$@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(BASS_O_MATIC) $(TEMPLATE_ZONE:%=--template-zone %) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Turn userland-incorporator warnings into build failures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(WS_TOOLS)/userland-incorporator --repository $(PKG_REPO) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte --version=0.$(OS_VERSION),$(BUILD_VERSION) -p $(PUBLISHER) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -c $(CONSOLIDATION) --destdir=$(WS_LOGS) $(INCORPORATE_WERROR)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest \
$(PKGLINT) \