Makefile revision 187
bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# CDDL HEADER START
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
16f816d3f3c32ae3351834253f52ddd0212bcbf3Timo Sirainen# The contents of this file are subject to the terms of the
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# Common Development and Distribution License (the "License").
1171f0abf442638bac1827bb24a0b6b8eb682a82Timo Sirainen# You may not use this file except in compliance with the License.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# or http://www.opensolaris.org/os/licensing.
1d738cce754bc64bbc66d3355ebdaf3f6eac55f1Timo Sirainen# See the License for the specific language governing permissions
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# and limitations under the License.
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen#
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen# When distributing Covered Code, include this CDDL HEADER in each
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen# If applicable, add the following below this CDDL HEADER, with the
82ed69779f49bd71ef1b570ce8aca67d357dbee8Timo Sirainen# fields enclosed by brackets "[]" replaced with your own identifying
9bd08aa09ea0cbd7b221aae9fc0534eb762d3de6Timo Sirainen# information: Portions Copyright [yyyy] [name of copyright owner]
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen# CDDL HEADER END
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
8a4851655777e484d70b77bed6a7a8fac5c0c98cTimo Sirainen# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
8a4851655777e484d70b77bed6a7a8fac5c0c98cTimo Sirainen#
8a4851655777e484d70b77bed6a7a8fac5c0c98cTimo Sirainen
8a4851655777e484d70b77bed6a7a8fac5c0c98cTimo Siraineninclude ../../../make-rules/shared-macros.mk
8a4851655777e484d70b77bed6a7a8fac5c0c98cTimo Sirainen
8a4851655777e484d70b77bed6a7a8fac5c0c98cTimo Sirainen# $(WS_TOP)/make-rules/ips.mk really isn't set up to allow you to bypass all
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen# the automatic (and lengthy) manifest manipulation that it does, which we
82ed69779f49bd71ef1b570ce8aca67d357dbee8Timo Sirainen# really don't need to do for these static, uninteresting packages. So we just
82ed69779f49bd71ef1b570ce8aca67d357dbee8Timo Sirainen# write a simple set of publication rules to get the packages into the repo.
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenPKGSEND = /usr/bin/pkgsend
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo SirainenPKGLINT = /usr/bin/pkglint
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenPKGMOGRIFY = /usr/bin/pkgmogrify
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenCANONICAL_MANIFESTS = $(wildcard *.p5m)
82ed69779f49bd71ef1b570ce8aca67d357dbee8Timo SirainenMANIFEST_BASE = $(BUILD_DIR)/manifest-$(MACH)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenMOGRIFIED = $(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.mogrified)
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo SirainenPUBLISHED = $(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.published)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen$(BUILD_DIR):
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(MKDIR) $@
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen$(MANIFEST_BASE)-%.mogrified: %.p5m $(BUILD_DIR)
9bd08aa09ea0cbd7b221aae9fc0534eb762d3de6Timo Sirainen $(PKGMOGRIFY) -D CONSOLIDATION=$(CONSOLIDATION) $< > $@
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen
9bd08aa09ea0cbd7b221aae9fc0534eb762d3de6Timo Sirainen$(MANIFEST_BASE)-%.published: $(MANIFEST_BASE)-%.mogrified $(BUILD_DIR)
9bd08aa09ea0cbd7b221aae9fc0534eb762d3de6Timo Sirainen $(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest $<
9bd08aa09ea0cbd7b221aae9fc0534eb762d3de6Timo Sirainen $(TOUCH) $@
9bd08aa09ea0cbd7b221aae9fc0534eb762d3de6Timo Sirainen
82ed69779f49bd71ef1b570ce8aca67d357dbee8Timo Sirainen$(BUILD_DIR)/.linted-$(MACH): $(MOGRIFIED) $(BUILD_DIR)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(ENV) PYTHONPATH=$(WS_TOOLS)/python \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(PKGLINT) $(CANONICAL_REPO:%=-c $(WS_LINT_CACHE)) \
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen -f $(WS_TOOLS)/pkglintrc $(MOGRIFIED)
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen $(TOUCH) $@
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen$(BUILD_DIR)/.published-$(MACH): $(BUILD_DIR)/.linted-$(MACH) $(PUBLISHED)
6a7f64562ddd0dd2fec755ec4e9c9afde8e85cf1Timo Sirainen $(TOUCH) $@
6a7f64562ddd0dd2fec755ec4e9c9afde8e85cf1Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenpublish: $(BUILD_DIR)/.published-$(MACH)
6a7f64562ddd0dd2fec755ec4e9c9afde8e85cf1Timo Sirainen
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainenclobber clean:
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen $(RM) -r $(BUILD_DIR)
6a7f64562ddd0dd2fec755ec4e9c9afde8e85cf1Timo Sirainen