Makefile revision 23
98N/A#
98N/A# CDDL HEADER START
1408N/A#
98N/A# The contents of this file are subject to the terms of the
1630N/A# Common Development and Distribution License (the "License").
98N/A# You may not use this file except in compliance with the License.
98N/A#
919N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A# or http://www.opensolaris.org/os/licensing.
919N/A# See the License for the specific language governing permissions
919N/A# and limitations under the License.
919N/A#
919N/A# When distributing Covered Code, include this CDDL HEADER in each
919N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A# If applicable, add the following below this CDDL HEADER, with the
919N/A# fields enclosed by brackets "[]" replaced with your own identifying
919N/A# information: Portions Copyright [yyyy] [name of copyright owner]
919N/A#
919N/A# CDDL HEADER END
919N/A#
919N/A# Copyright (c) 2010, Oracle and/or it's affiliates. All rights reserved.
919N/A#
919N/A
919N/Ainclude ../make-rules/shared-macros.mk
98N/A
98N/A# for now, the assumption is we build any directory with a Makefile. This may
98N/A# not always be the case. If we build a new make-like tool to drive the upper
98N/A# level build, it may make different decisions and will need to include
493N/A# appropriate dependency information.
98N/A
98N/ACOMPONENT_DIRS = $(shell echo */Makefile | sed -e 's;/Makefile;;g')
1549N/A
98N/Adownload: TARGET = download
911N/Aprep: TARGET = prep
1549N/Abuild: TARGET = build
1549N/Ainstall: TARGET = install
1549N/Apublish: TARGET = publish
911N/Avalidate: TARGET = validate
98N/Aclean: TARGET = clean
1549N/Aclobber: TARGET = clobber
1549N/Aprep build install publish: LOG = >$(WS_LOGS)/$(TARGET):$@.log 2>&1
1549N/A
1333N/A.DEFAULT: publish
1630N/A
1630N/A.PARALLEL: $(COMPONENT_DIRS)
1630N/A
1333N/Adownload prep build install publish validate: setup $(COMPONENT_DIRS)
1333N/A
98N/Aclean clobber: $(COMPONENT_DIRS)
98N/Aifeq ($(findstring file://, $(PKG_REPO)),file://)
98N/A $(RM) -r $(PKG_REPO:file://%=%) $(WS_LOGS)
493N/Aendif
98N/A
705N/Asetup: $(WS_LOGS) repo tools
705N/A
705N/A$(WS_LOGS):
705N/A $(MKDIR) $@
98N/A
493N/Arepo:
1097N/A $(PKGSEND) -s $(PKG_REPO) create-repository \
1097N/A --set-property publisher.prefix=$(PUBLISHER)
1425N/A
98N/Atools:
98N/A @cd ../tools ; echo "building tools..." ; $(GMAKE) setup
$(COMPONENT_DIRS): FORCE
@cd $@ ; echo "$(TARGET) \c" ; pwd ; \
$(GMAKE) $(TARGET) $(LOG)
FORCE: