Makefile revision 23
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#
2N/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
23N/ACOMPONENT_DIRS = $(shell echo */Makefile | sed -e 's;/Makefile;;g')
2N/A
2N/Adownload: TARGET = download
2N/Aprep: TARGET = prep
2N/Abuild: TARGET = build
2N/Ainstall: TARGET = install
2N/Apublish: TARGET = publish
2N/Avalidate: TARGET = validate
2N/Aclean: TARGET = clean
2N/Aclobber: TARGET = clobber
6N/Aprep build install publish: LOG = >$(WS_LOGS)/$(TARGET):$@.log 2>&1
2N/A
2N/A.DEFAULT: publish
2N/A
2N/A.PARALLEL: $(COMPONENT_DIRS)
2N/A
2N/Adownload prep build install publish validate: setup $(COMPONENT_DIRS)
2N/A
2N/Aclean clobber: $(COMPONENT_DIRS)
2N/Aifeq ($(findstring file://, $(PKG_REPO)),file://)
2N/A $(RM) -r $(PKG_REPO:file://%=%) $(WS_LOGS)
2N/Aendif
2N/A
6N/Asetup: $(WS_LOGS) repo tools
2N/A
2N/A$(WS_LOGS):
2N/A $(MKDIR) $@
2N/A
2N/Arepo:
2N/A $(PKGSEND) -s $(PKG_REPO) create-repository \
2N/A --set-property publisher.prefix=$(PUBLISHER)
2N/A
6N/Atools:
6N/A @cd ../tools ; echo "building tools..." ; $(GMAKE) setup
6N/A
2N/A$(COMPONENT_DIRS): FORCE
2N/A @cd $@ ; echo "$(TARGET) \c" ; pwd ; \
6N/A $(GMAKE) $(TARGET) $(LOG)
2N/A
2N/AFORCE: