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#
5680N/A
5680N/A#
5685N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
145N/A#
145N/A
145N/Ainclude ../../../make-rules/shared-macros.mk
187N/A
3817N/A# $(WS_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.
5685N/ACOMPONENT_SRC=
4194N/Ainclude $(WS_MAKE_RULES)/prep.mk
4194N/A
1244N/ACOMPONENT_NAME= "Package History"
1258N/ACOMPONENT_BUGDB= gate-stuff/userland
1244N/A
4811N/AGENERATE_HISTORY= $(WS_TOOLS)/generate-history
4811N/AHISTORY= history
4811N/A
4811N/AMANIFEST_BASE = $(BUILD_DIR)/manifest-$(MACH)
4811N/A
187N/ACANONICAL_MANIFESTS = $(wildcard *.p5m)
4811N/AHISTORICAL_MANIFESTS = $(shell $(NAWK) -v FUNCTION=name -f $(GENERATE_HISTORY) < $(HISTORY))
197N/AARCH_MANIFESTS = $(wildcard *.p5m.$(MACH))
197N/AGENERATED_ARCH_MANIFESTS = $(ARCH_MANIFESTS:%.p5m.$(MACH)=%.p5m)
197N/ACANONICAL_MANIFESTS += $(GENERATED_ARCH_MANIFESTS)
197N/A
187N/AMOGRIFIED = $(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.mogrified)
4811N/AHISTOGRIFIED = $(HISTORICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.histogrified)
187N/APUBLISHED = $(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.published)
4811N/APUBLISHED += $(HISTORICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.published)
4811N/A
4811N/A# Rule to generate historical manifests from the $(HISTORY) file.
4811N/Adefine history-manifest-rule
4811N/A$(MANIFEST_BASE)-$(1): $(HISTORY) $(BUILD_DIR)
4811N/A $(NAWK) -v FUNCTION=manifest -v TARGET=$1 -f $(GENERATE_HISTORY) < \
4811N/A $(HISTORY) > $$@
4811N/Aendef
4811N/A$(foreach mfst,$(HISTORICAL_MANIFESTS),$(eval $(call history-manifest-rule,$(mfst))))
145N/A
1938N/AASLR_MODE = $(ASLR_NOT_APPLICABLE)
1938N/A
4365N/APKG_MACROS = CONSOLIDATION=$(CONSOLIDATION)
4365N/APKG_MACROS += BUILD_VERSION=$(BUILD_VERSION)
4365N/APKG_MACROS += OS_VERSION=$(OS_VERSION)
4365N/A
4365N/APKG_OPTIONS += $(PKG_MACROS:%=-D %)
4365N/A
4365N/Abuild install test system-test:
192N/A @echo "nothing to be done for $@"
192N/A
145N/A$(BUILD_DIR):
145N/A $(MKDIR) $@
145N/A
187N/A$(MANIFEST_BASE)-%.mogrified: %.p5m $(BUILD_DIR)
4365N/A $(PKGMOGRIFY) $(PKG_OPTIONS) $< \
3294N/A $(WS_TOP)/transforms/incorporate > $@
187N/A
4811N/A$(MANIFEST_BASE)-%.histogrified: $(MANIFEST_BASE)-%.p5m $(BUILD_DIR)
4811N/A $(PKGMOGRIFY) $(PKG_OPTIONS) $< \
4811N/A $(WS_TOP)/transforms/incorporate > $@
4811N/A
187N/A$(MANIFEST_BASE)-%.published: $(MANIFEST_BASE)-%.mogrified $(BUILD_DIR)
1899N/A $(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest --no-catalog $<
191N/A $(CP) $< $@
145N/A
4811N/A$(MANIFEST_BASE)-%.published: $(MANIFEST_BASE)-%.histogrified $(BUILD_DIR)
4811N/A $(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest --no-catalog $<
4811N/A $(CP) $< $@
4811N/A
4811N/A$(BUILD_DIR)/.linted-$(MACH): $(MOGRIFIED) $(HISTOGRIFIED) $(BUILD_DIR)
187N/A $(ENV) PYTHONPATH=$(WS_TOOLS)/python \
2520N/A SOLARIS_VERSION=$(SOLARIS_VERSION) \
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)
1899N/Aifndef DISABLE_IPS_CATALOG_AND_INDEX_UPDATES
1899N/A $(PKGREPO) refresh -s $(PKG_REPO)
1899N/Aendif
187N/A $(TOUCH) $@
187N/A
187N/Apublish: $(BUILD_DIR)/.published-$(MACH)
145N/A
197N/A%.p5m: %.p5m.$(MACH)
197N/A $(CP) $< $@
197N/A
4194N/Aclobber clean::
197N/A $(RM) -r $(BUILD_DIR) $(GENERATED_ARCH_MANIFESTS)