Makefile revision 5630
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan# CDDL HEADER START
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan# The contents of this file are subject to the terms of the
b355dcb54194f498921743ca33304eac35d89718Stephen Gallagher# Common Development and Distribution License (the "License").
b355dcb54194f498921743ca33304eac35d89718Stephen Gallagher# You may not use this file except in compliance with the License.
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan# or http://www.opensolaris.org/os/licensing.
b355dcb54194f498921743ca33304eac35d89718Stephen Gallagher# See the License for the specific language governing permissions
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan# and limitations under the License.
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek# When distributing Covered Code, include this CDDL HEADER in each
e59e09b5010f262228bbdeb92a79b733bf5854b3Stephen Gallagher# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b355dcb54194f498921743ca33304eac35d89718Stephen Gallagher# If applicable, add the following below this CDDL HEADER, with the
c938f4ba417328fe62eded0806b2d9ca053f34a5Stephen Gallagher# fields enclosed by brackets "[]" replaced with your own identifying
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan# information: Portions Copyright [yyyy] [name of copyright owner]
b355dcb54194f498921743ca33304eac35d89718Stephen Gallagher# CDDL HEADER END
b355dcb54194f498921743ca33304eac35d89718Stephen Gallagher# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagherinclude ../../../make-rules/shared-macros.mk
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek# $(WS_MAKE_RULES)/ips.mk really isn't set up to allow you to bypass all
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek# the automatic (and lengthy) manifest manipulation that it does, which we
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek# really don't need to do for these static, uninteresting packages. So we just
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek# write a simple set of publication rules to get the packages into the repo.
bde69429374859acff41273c0771d2b5f5c199b1Yuri ChornoivanGENERATE_HISTORY= $(WS_TOOLS)/generate-history
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen GallagherMANIFEST_BASE = $(BUILD_DIR)/manifest-$(MACH)
2ea6196484055397cc4bc011c5960f790431fa9dStephen GallagherHISTORICAL_MANIFESTS = $(shell $(NAWK) -v FUNCTION=name -f $(GENERATE_HISTORY) < $(HISTORY))
bde69429374859acff41273c0771d2b5f5c199b1Yuri ChornoivanGENERATED_ARCH_MANIFESTS = $(ARCH_MANIFESTS:%.p5m.$(MACH)=%.p5m)
bde69429374859acff41273c0771d2b5f5c199b1Yuri ChornoivanCANONICAL_MANIFESTS += $(GENERATED_ARCH_MANIFESTS)
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen GallagherMOGRIFIED = $(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.mogrified)
bde69429374859acff41273c0771d2b5f5c199b1Yuri ChornoivanHISTOGRIFIED = $(HISTORICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.histogrified)
bde69429374859acff41273c0771d2b5f5c199b1Yuri ChornoivanPUBLISHED = $(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.published)
bde69429374859acff41273c0771d2b5f5c199b1Yuri ChornoivanPUBLISHED += $(HISTORICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.published)
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher# Rule to generate historical manifests from the $(HISTORY) file.
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan$(MANIFEST_BASE)-$(1): $(HISTORY) $(BUILD_DIR)
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher $(NAWK) -v FUNCTION=manifest -v TARGET=$1 -f $(GENERATE_HISTORY) < \
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan$(foreach mfst,$(HISTORICAL_MANIFESTS),$(eval $(call history-manifest-rule,$(mfst))))
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen GallagherPKG_MACROS = CONSOLIDATION=$(CONSOLIDATION)
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen GallagherPKG_MACROS += BUILD_VERSION=$(BUILD_VERSION)
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek @echo "nothing to be done for $@"
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan$(MANIFEST_BASE)-%.mogrified: %.p5m $(BUILD_DIR)
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan$(MANIFEST_BASE)-%.histogrified: $(MANIFEST_BASE)-%.p5m $(BUILD_DIR)
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan$(MANIFEST_BASE)-%.published: $(MANIFEST_BASE)-%.mogrified $(BUILD_DIR)
f9fdc87c80f2744780c6a0f2bf5b1b57bcbb095aYuri Chornoivan $(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest --no-catalog $<
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagher$(MANIFEST_BASE)-%.published: $(MANIFEST_BASE)-%.histogrified $(BUILD_DIR)
52261fe16203dec6e6f69177c6d0a810b47d073fStephen Gallagher $(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest --no-catalog $<
65a9065538fd85e6ead925d344e6b421900eb8c2Jakub Hrozek$(BUILD_DIR)/.linted-$(MACH): $(MOGRIFIED) $(HISTOGRIFIED) $(BUILD_DIR)
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan $(PKGLINT) $(CANONICAL_REPO:%=-c $(WS_LINT_CACHE)) \
bde69429374859acff41273c0771d2b5f5c199b1Yuri Chornoivan$(BUILD_DIR)/.published-$(MACH): $(BUILD_DIR)/.linted-$(MACH) $(PUBLISHED)
cbe7c54c2caf718bdea7ca6660ba8193d759d2d5Stephen Gallagherifndef DISABLE_IPS_CATALOG_AND_INDEX_UPDATES