Makefile revision 32
346N/A#
346N/A# CDDL HEADER START
346N/A#
346N/A# The contents of this file are subject to the terms of the
346N/A# Common Development and Distribution License (the "License").
346N/A# You may not use this file except in compliance with the License.
346N/A#
346N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
346N/A# or http://www.opensolaris.org/os/licensing.
346N/A# See the License for the specific language governing permissions
346N/A# and limitations under the License.
346N/A#
346N/A# When distributing Covered Code, include this CDDL HEADER in each
346N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
346N/A# If applicable, add the following below this CDDL HEADER, with the
346N/A# fields enclosed by brackets "[]" replaced with your own identifying
346N/A# information: Portions Copyright [yyyy] [name of copyright owner]
346N/A#
346N/A# CDDL HEADER END
346N/A#
346N/A# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved.
346N/A#
3817N/A
346N/Ainclude ../make-rules/shared-macros.mk
346N/A
3817N/A# for now, the assumption is we build any directory with a Makefile. This may
3817N/A# not always be the case. If we build a new make-like tool to drive the upper
3817N/A# level build, it may make different decisions and will need to include
346N/A# appropriate dependency information.
346N/A
4162N/A# components.mk is auto-generated by the build tools. It populates the
783N/A# COMPONENT_DIRS macro with a list of all directories in the workspace that
1244N/A# contain a component.
4162N/Acomponents.mk: Makefile # $(WS_TOP)/components
618N/A @echo "Generating component list..."
1244N/A @$(TOOLS)/bass-o-matic.py --workspace=$(WS_TOP) --components=paths \
1244N/A | sed -e 's;^$(shell pwd)/;COMPONENT_DIRS += ;g' >$@
4162N/A
844N/Ainclude components.mk
4162N/A
618N/A
1258N/Adownload: TARGET = download
346N/Aprep: TARGET = prep
346N/Abuild: TARGET = build
346N/Ainstall: TARGET = install
346N/Apublish: TARGET = publish
4162N/Avalidate: TARGET = validate
844N/Aclean: TARGET = clean
4162N/Aclobber: TARGET = clobber
618N/Aprep build install publish: LOG = >$(WS_LOGS)/$(TARGET):$@.log 2>&1
4194N/A
4194N/A.DEFAULT: publish
346N/A
346N/A.PARALLEL: $(COMPONENT_DIRS)
346N/A
346N/Adownload prep build install publish validate: setup $(COMPONENT_DIRS)
4162N/A
844N/Aclean clobber: $(COMPONENT_DIRS)
4162N/Aifeq ($(findstring file://, $(PKG_REPO)),file://)
618N/A $(RM) -r $(PKG_REPO:file://%=%) $(WS_LOGS)
4194N/Aendif
4194N/A $(RM) components.mk depends.mk
346N/A
3083N/Asetup: $(WS_LOGS) repo tools
3083N/A
3817N/A$(WS_LOGS):
3817N/A $(MKDIR) $@
3817N/A
346N/Arepo:
346N/A $(PKGSEND) -s $(PKG_REPO) create-repository \
346N/A --set-property publisher.prefix=$(PUBLISHER)
346N/A
346N/Atools:
4162N/A @cd ../tools ; echo "building tools..." ; $(GMAKE) setup
1358N/A
4162N/A$(COMPONENT_DIRS): setup FORCE
346N/A @cd $@ ; echo "$(TARGET) $@" ; $(GMAKE) $(TARGET) $(LOG)
346N/A
346N/A# depends.mk is auto-generated by the build tools, bass-o-matic.py in particular
346N/Adepends.mk: components.mk
2497N/A @echo "Generating component dependencies..."
2497N/A @$(TOOLS)/bass-o-matic.py --workspace=$(WS_TOP) --components=depend \
346N/A | sed -e 's;$(shell pwd)/;;g' >$@
346N/A
346N/Ainclude depends.mk
1357N/A
4162N/AFORCE:
1357N/A