Makefile revision 187
2b449ca06646ebb6603e35918a40bca8e0f43c8eSatyen Desai#
64953b0596d07dbee9a9b521ed61c434ce4709b5Satyen Desai# CDDL HEADER START
64953b0596d07dbee9a9b521ed61c434ce4709b5Satyen Desai#
64953b0596d07dbee9a9b521ed61c434ce4709b5Satyen Desai# The contents of this file are subject to the terms of the
2b449ca06646ebb6603e35918a40bca8e0f43c8eSatyen Desai# Common Development and Distribution License (the "License").
2b449ca06646ebb6603e35918a40bca8e0f43c8eSatyen Desai# You may not use this file except in compliance with the License.
64953b0596d07dbee9a9b521ed61c434ce4709b5Satyen Desai#
e0008d92cea7515616980ad13e1075346a3bca2eSatyen Desai# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2b449ca06646ebb6603e35918a40bca8e0f43c8eSatyen Desai# or http://www.opensolaris.org/os/licensing.
2b449ca06646ebb6603e35918a40bca8e0f43c8eSatyen Desai# See the License for the specific language governing permissions
2b449ca06646ebb6603e35918a40bca8e0f43c8eSatyen Desai# and limitations under the License.
2b449ca06646ebb6603e35918a40bca8e0f43c8eSatyen Desai#
2b449ca06646ebb6603e35918a40bca8e0f43c8eSatyen Desai# When distributing Covered Code, include this CDDL HEADER in each
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai# If applicable, add the following below this CDDL HEADER, with the
64953b0596d07dbee9a9b521ed61c434ce4709b5Satyen Desai# fields enclosed by brackets "[]" replaced with your own identifying
64953b0596d07dbee9a9b521ed61c434ce4709b5Satyen Desai# information: Portions Copyright [yyyy] [name of copyright owner]
64953b0596d07dbee9a9b521ed61c434ce4709b5Satyen Desai#
793e508bd277c48d6a09b91bb99064b4046eda7aSatyen Desai# CDDL HEADER END
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai#
793e508bd277c48d6a09b91bb99064b4046eda7aSatyen Desai# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai#
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desaiinclude ../../../make-rules/shared-macros.mk
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai# $(WS_TOP)/make-rules/ips.mk really isn't set up to allow you to bypass all
2b449ca06646ebb6603e35918a40bca8e0f43c8eSatyen Desai# the automatic (and lengthy) manifest manipulation that it does, which we
b4e59b5d4777b2fc949d0b8da063b6ea1f2d43a1Satyen Desai# really don't need to do for these static, uninteresting packages. So we just
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai# write a simple set of publication rules to get the packages into the repo.
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen DesaiPKGSEND = /usr/bin/pkgsend
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen DesaiPKGLINT = /usr/bin/pkglint
64953b0596d07dbee9a9b521ed61c434ce4709b5Satyen DesaiPKGMOGRIFY = /usr/bin/pkgmogrify
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai
64953b0596d07dbee9a9b521ed61c434ce4709b5Satyen DesaiCANONICAL_MANIFESTS = $(wildcard *.p5m)
64953b0596d07dbee9a9b521ed61c434ce4709b5Satyen DesaiMANIFEST_BASE = $(BUILD_DIR)/manifest-$(MACH)
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen DesaiMOGRIFIED = $(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.mogrified)
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen DesaiPUBLISHED = $(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.published)
eaa9719567e2ec55d96f9298077f5fc0effe1ed3Satyen Desai
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai$(BUILD_DIR):
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai $(MKDIR) $@
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai$(MANIFEST_BASE)-%.mogrified: %.p5m $(BUILD_DIR)
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai $(PKGMOGRIFY) -D CONSOLIDATION=$(CONSOLIDATION) $< > $@
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai$(MANIFEST_BASE)-%.published: $(MANIFEST_BASE)-%.mogrified $(BUILD_DIR)
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai $(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest $<
64953b0596d07dbee9a9b521ed61c434ce4709b5Satyen Desai $(TOUCH) $@
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai$(BUILD_DIR)/.linted-$(MACH): $(MOGRIFIED) $(BUILD_DIR)
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai $(ENV) PYTHONPATH=$(WS_TOOLS)/python \
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai $(PKGLINT) $(CANONICAL_REPO:%=-c $(WS_LINT_CACHE)) \
793e508bd277c48d6a09b91bb99064b4046eda7aSatyen Desai -f $(WS_TOOLS)/pkglintrc $(MOGRIFIED)
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai $(TOUCH) $@
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai$(BUILD_DIR)/.published-$(MACH): $(BUILD_DIR)/.linted-$(MACH) $(PUBLISHED)
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai $(TOUCH) $@
793e508bd277c48d6a09b91bb99064b4046eda7aSatyen Desai
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desaipublish: $(BUILD_DIR)/.published-$(MACH)
04f6f082e2978c0be5c674a54883b28e50040c39Satyen Desai
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desaiclobber clean:
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai $(RM) -r $(BUILD_DIR)
1201815cf554ddd27ca4898d9623926cfe3c2ac9Satyen Desai