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