Makefile revision 3468
89a126810703c666309310d0f3189e9834d70b5bTimo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# CDDL HEADER START
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
9a583c7a827f7a4d89ee43774f2d51ea6a214543Timo Sirainen# The contents of this file are subject to the terms of the
16f816d3f3c32ae3351834253f52ddd0212bcbf3Timo Sirainen# Common Development and Distribution License (the "License").
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# You may not use this file except in compliance with the License.
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen# or http://www.opensolaris.org/os/licensing.
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen# See the License for the specific language governing permissions
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# and limitations under the License.
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# When distributing Covered Code, include this CDDL HEADER in each
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# If applicable, add the following below this CDDL HEADER, with the
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# fields enclosed by brackets "[]" replaced with your own identifying
dd0ba1bab2c1b89c7e063fa45d156fa72b8260d5Timo Sirainen# information: Portions Copyright [yyyy] [name of copyright owner]
dd0ba1bab2c1b89c7e063fa45d156fa72b8260d5Timo Sirainen#
6cd02a9525acb9897a65b05bfeee9b8d283e0f74Timo Sirainen# CDDL HEADER END
6cd02a9525acb9897a65b05bfeee9b8d283e0f74Timo Sirainen#
6cd02a9525acb9897a65b05bfeee9b8d283e0f74Timo Sirainen# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
6cd02a9525acb9897a65b05bfeee9b8d283e0f74Timo Sirainen#
6cd02a9525acb9897a65b05bfeee9b8d283e0f74Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Siraineninclude ../../../make-rules/shared-macros.mk
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# $(WS_TOP)/make-rules/ips.mk really isn't set up to allow you to bypass all
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# the automatic (and lengthy) manifest manipulation that it does, which we
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# really don't need to do for these static, uninteresting packages. So we just
a2ce2eb4c266e2854fd34416ea5cfbe05dfd3971Timo Sirainen# write a simple set of publication rules to get the packages into the repo.
a2ce2eb4c266e2854fd34416ea5cfbe05dfd3971Timo Sirainen
e9f2d9104d395bcf54be3f8ba8d9f63aecf0bcbeTimo SirainenPKGSEND = /usr/bin/pkgsend
8d80659e504ffb34bb0c6a633184fece35751b18Timo SirainenPKGLINT = /usr/bin/pkglint
72cbf33ae81fde08384d30c779ff540752d9256cTimo SirainenPKGMOGRIFY = /usr/bin/pkgmogrify
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenCOMPONENT_NAME= "Package History"
8d80659e504ffb34bb0c6a633184fece35751b18Timo SirainenCOMPONENT_BUGDB= gate-stuff/userland
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen
72cbf33ae81fde08384d30c779ff540752d9256cTimo SirainenCANONICAL_MANIFESTS = $(wildcard *.p5m)
72cbf33ae81fde08384d30c779ff540752d9256cTimo SirainenARCH_MANIFESTS = $(wildcard *.p5m.$(MACH))
df6478c4cf605bd81b3891c148b84c14eb6c4035Timo SirainenGENERATED_ARCH_MANIFESTS = $(ARCH_MANIFESTS:%.p5m.$(MACH)=%.p5m)
72cbf33ae81fde08384d30c779ff540752d9256cTimo SirainenCANONICAL_MANIFESTS += $(GENERATED_ARCH_MANIFESTS)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenMANIFEST_BASE = $(BUILD_DIR)/manifest-$(MACH)
e1f05b193ac1edd3267294e9501e8063aa0f791aTimo SirainenMOGRIFIED = $(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.mogrified)
e1f05b193ac1edd3267294e9501e8063aa0f791aTimo SirainenPUBLISHED = $(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.published)
e1f05b193ac1edd3267294e9501e8063aa0f791aTimo Sirainen
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainendownload prep build install:
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen @echo "nothing to be done for $@"
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen$(BUILD_DIR):
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen $(MKDIR) $@
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen$(MANIFEST_BASE)-%.mogrified: %.p5m $(BUILD_DIR)
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen $(PKGMOGRIFY) -D CONSOLIDATION=$(CONSOLIDATION) $< \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(WS_TOP)/transforms/incorporate > $@
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen$(MANIFEST_BASE)-%.published: $(MANIFEST_BASE)-%.mogrified $(BUILD_DIR)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest --no-catalog $<
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(CP) $< $@
91dca97b367c54a139c268b56a0c67f564bd9197Timo Sirainen
ee26329cb5cc679b5645e4933d529f86accb976aTimo Sirainen$(BUILD_DIR)/.linted-$(MACH): $(MOGRIFIED) $(BUILD_DIR)
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen $(ENV) PYTHONPATH=$(WS_TOOLS)/python \
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen SOLARIS_VERSION=$(SOLARIS_VERSION) \
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen $(PKGLINT) $(CANONICAL_REPO:%=-c $(WS_LINT_CACHE)) \
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen -f $(WS_TOOLS)/pkglintrc $(MOGRIFIED)
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen $(TOUCH) $@
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen$(BUILD_DIR)/.published-$(MACH): $(BUILD_DIR)/.linted-$(MACH) $(PUBLISHED)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenifndef DISABLE_IPS_CATALOG_AND_INDEX_UPDATES
a2ce2eb4c266e2854fd34416ea5cfbe05dfd3971Timo Sirainen $(PKGREPO) refresh -s $(PKG_REPO)
a2ce2eb4c266e2854fd34416ea5cfbe05dfd3971Timo Sirainenendif
1a5fcc972dbadfe7959011b8ad422707e2dfc19fTimo Sirainen $(TOUCH) $@
1a5fcc972dbadfe7959011b8ad422707e2dfc19fTimo Sirainen
df6478c4cf605bd81b3891c148b84c14eb6c4035Timo Sirainenpublish: $(BUILD_DIR)/.published-$(MACH)
df6478c4cf605bd81b3891c148b84c14eb6c4035Timo Sirainen
a2ce2eb4c266e2854fd34416ea5cfbe05dfd3971Timo Sirainen%.p5m: %.p5m.$(MACH)
cfbf891f065b18602703ed6fa2af1a541d4d0b04Timo Sirainen $(CP) $< $@
a2ce2eb4c266e2854fd34416ea5cfbe05dfd3971Timo Sirainen
e9f2d9104d395bcf54be3f8ba8d9f63aecf0bcbeTimo Sirainenclobber clean:
e9f2d9104d395bcf54be3f8ba8d9f63aecf0bcbeTimo Sirainen $(RM) -r $(BUILD_DIR) $(GENERATED_ARCH_MANIFESTS)
a2ce2eb4c266e2854fd34416ea5cfbe05dfd3971Timo Sirainen