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