Makefile revision 22
12N/A#
12N/A# CDDL HEADER START
12N/A#
12N/A# The contents of this file are subject to the terms of the
12N/A# Common Development and Distribution License (the "License").
12N/A# You may not use this file except in compliance with the License.
12N/A#
12N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12N/A# or http://www.opensolaris.org/os/licensing.
12N/A# See the License for the specific language governing permissions
12N/A# and limitations under the License.
12N/A#
12N/A# When distributing Covered Code, include this CDDL HEADER in each
12N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12N/A# If applicable, add the following below this CDDL HEADER, with the
12N/A# fields enclosed by brackets "[]" replaced with your own identifying
12N/A# information: Portions Copyright [yyyy] [name of copyright owner]
12N/A#
12N/A# CDDL HEADER END
12N/A#
12N/A
12N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
12N/A# Use is subject to license terms.
12N/A#
12N/A#ident "$Hg$ SMI"
12N/A
12N/A# client.py -> /usr/bin/pkg
12N/A# publish.py -> /usr/bin/pkgsend
12N/A# depot.py -> /usr/lib/pkg.depotd
12N/A#
12N/A# pkg/*.py -> /usr/lib/python2.4/vendor-packages/pkg/
12N/A
12N/AMACH:sh = uname -p
12N/A
12N/AROOT = ../proto/root_${MACH}
12N/AROOTUSRBIN = $(ROOT)/usr/bin
12N/AROOTUSRLIB = $(ROOT)/usr/lib
12N/AROOTPYTHON = $(ROOTUSRLIB)/python2.4
12N/AROOTPYTHONVENDOR = $(ROOTPYTHON)/vendor-packages
12N/AROOTPYTHONPKG = $(ROOTPYTHONVENDOR)/pkg
12N/A
12N/AROOTDIRS = $(ROOT) $(ROOTUSRBIN) $(ROOTUSRLIB) $(ROOTPYTHONPKG)
12N/A
12N/APROGS = pkg pkgsend pkg.depotd
12N/AROOTPROGS = \
12N/A $(ROOT)/usr/bin/pkg \
12N/A $(ROOT)/usr/bin/pkgsend \
12N/A $(ROOT)/usr/lib/pkg.depotd
12N/A
12N/APYMODS = \
20N/A pkg-modules/__init__.py \
20N/A pkg-modules/catalog.py \
12N/A pkg-modules/config.py \
20N/A pkg-modules/content.py \
20N/A pkg-modules/dependency.py \
12N/A pkg-modules/fmri.py \
20N/A pkg-modules/image.py \
20N/A pkg-modules/package.py \
20N/A pkg-modules/sysvpkg.py \
12N/A pkg-modules/version.py
22N/A
12N/AROOTPYMODS = $(PYMODS:pkg-modules/%=$(ROOTPYTHONPKG)/%)
12N/A
12N/Aall: $(PROGS)
12N/A
20N/Aclean:
20N/A rm -f $(PROGS)
20N/A
12N/Ainstall: $(ROOTDIRS) $(ROOTPROGS) $(ROOTPYMODS)
12N/A
22N/A# XXX link is a developer target to connect the local machine to the current
22N/A# repository's working copy's versions of the commands and modules.
22N/APWD:sh = pwd
22N/Alink:
22N/A ln -s $(PWD)/client.py /usr/bin/pkg
22N/A ln -s $(PWD)/publish.py /usr/bin/pkgsend
22N/A ln -s $(PWD)/depot.py /usr/lib/pkg.depotd
22N/A ln -s $(PWD)/pkg-modules /usr/lib/python2.4/vendor-packages/pkg
22N/A
12N/A$(ROOT) $(ROOTUSRBIN) $(ROOTUSRLIB) $(ROOTPYTHONPKG):
12N/A mkdir -p $(ROOT)
12N/A mkdir -p $(ROOTUSRBIN)
12N/A mkdir -p $(ROOTUSRLIB)
12N/A mkdir -p $(ROOTPYTHONPKG)
12N/A
12N/A$(ROOTUSRBIN)/%: %
20N/A rm -f $@; install -f $(ROOTUSRBIN) -m 0555 $<
12N/A
12N/A$(ROOTUSRLIB)/%: %
20N/A rm -f $@; install -f $(ROOT)/usr/lib -m 0555 $<
12N/A
12N/A$(ROOTPYTHONPKG)/%: pkg-modules/%
20N/A rm -f $@; install -f $(ROOTPYTHONPKG) -m 0444 $<
12N/A
12N/Apkg: client.py
12N/A cp client.py pkg
12N/A
12N/Apkgsend: publish.py
12N/A cp publish.py pkgsend
12N/A
12N/Apkg.depotd: depot.py
12N/A cp depot.py pkg.depotd