Makefile revision 114
0N/A#
2362N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
2362N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2362N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
2362N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
2362N/A# Use is subject to license terms.
2362N/A#
0N/A
0N/A# client.py -> /usr/bin/pkg
0N/A# publish.py -> /usr/bin/pkgsend
0N/A# depot.py -> /usr/lib/pkg.depotd
0N/A#
0N/A# pkg/*.py -> /usr/lib/python2.4/vendor-packages/pkg/
0N/A
0N/AMACH:sh = uname -p
0N/A
0N/APYTHON = /usr/bin/python
0N/A
0N/AROOT = ../proto/root_${MACH}
0N/AROOTUSRBIN = $(ROOT)/usr/bin
0N/AROOTUSRLIB = $(ROOT)/usr/lib
0N/AROOTSHARE = $(ROOT)/usr/share/lib/pkg
0N/AROOTMANIFEST = $(ROOT)/var/svc/manifest
0N/AROOTPYTHON = $(ROOTUSRLIB)/python2.4
0N/AROOTPYTHONVENDOR = $(ROOTPYTHON)/vendor-packages
0N/AROOTPYTHONPKG = $(ROOTPYTHONVENDOR)/pkg
0N/AROOTMAN1 = $(ROOT)/usr/share/man/cat1
0N/AROOTMAN1M = $(ROOT)/usr/share/man/cat1m
0N/A
0N/ALINKPYTHONPKG = /usr/lib/python2.4/vendor-packages/pkg
0N/A
0N/AROOTDIRS = \
0N/A $(ROOT) \
0N/A $(ROOTUSRBIN) \
0N/A $(ROOTUSRLIB) \
0N/A $(ROOTPYTHONPKG)/actions \
0N/A $(ROOTPYTHONPKG)/server \
0N/A $(ROOTPYTHONPKG)/publish \
0N/A $(ROOTPYTHONPKG)/client \
0N/A $(ROOTPYTHONPKG)/actions \
0N/A $(ROOTPYTHONPKG)/bundle \
0N/A $(ROOTMANIFEST) \
0N/A $(ROOTSHARE) \
0N/A $(ROOTMAN1) \
0N/A $(ROOTMAN1M)
0N/A
0N/APROGS = pkg pkgsend pkg.depotd
0N/A
0N/AROOTPROGS = \
0N/A $(ROOT)/usr/bin/pkg \
0N/A $(ROOT)/usr/bin/pkgsend \
0N/A $(ROOT)/usr/lib/pkg.depotd
0N/A
0N/APYMODS = \
0N/A modules/__init__.py \
0N/A modules/Queue25.py \
0N/A modules/arch.so \
0N/A modules/catalog.py \
0N/A modules/config.py \
0N/A modules/cpiofile.py \
0N/A modules/dependency.py \
0N/A modules/elf.so \
0N/A modules/fmri.py \
0N/A modules/manifest.py \
0N/A modules/misc.py \
0N/A modules/package.py \
0N/A modules/smf.py \
0N/A modules/sysvpkg.py \
0N/A modules/version.py
0N/A
0N/APYACTIONMODS = \
0N/A modules/actions/__init__.py \
0N/A modules/actions/attribute.py \
0N/A modules/actions/depend.py \
0N/A modules/actions/directory.py \
modules/actions/driver.py \
modules/actions/file.py \
modules/actions/generic.py \
modules/actions/hardlink.py \
modules/actions/link.py \
modules/actions/unknown.py
PYSERVERMODS = \
modules/server/__init__.py \
modules/server/config.py \
modules/server/transaction.py
PYCLIENTMODS = \
modules/client/__init__.py \
modules/client/image.py \
modules/client/imageconfig.py \
modules/client/imageplan.py \
modules/client/pkgplan.py \
modules/client/retrieve.py
PYPUBLISHMODS = \
modules/publish/__init__.py \
modules/publish/transaction.py
PYBUNDLEMODS = \
modules/bundle/__init__.py \
modules/bundle/SolarisPackageDatastreamBundle.py \
modules/bundle/TarBundle.py \
modules/bundle/SolarisPackageDirBundle.py
ROOTPYMODS = $(PYMODS:modules/%=$(ROOTPYTHONPKG)/%)
ROOTPYACTIONMODS = \
$(PYACTIONMODS:modules/actions/%=$(ROOTPYTHONPKG)/actions/%)
ROOTPYSERVERMODS = \
$(PYSERVERMODS:modules/server/%=$(ROOTPYTHONPKG)/server/%)
ROOTPYPUBLISHMODS = \
$(PYPUBLISHMODS:modules/publish/%=$(ROOTPYTHONPKG)/publish/%)
ROOTPYCLIENTMODS = \
$(PYCLIENTMODS:modules/client/%=$(ROOTPYTHONPKG)/client/%)
ROOTPYACTIONMODS = \
$(PYACTIONMODS:modules/actions/%=$(ROOTPYTHONPKG)/actions/%)
ROOTPYBUNDLEMODS = \
$(PYBUNDLEMODS:modules/bundle/%=$(ROOTPYTHONPKG)/bundle/%)
ROOTPKGMANIFEST = $(ROOTMANIFEST)/pkg-server.xml
ROOTPKGWEB = $(ROOTSHARE)/pkg-block-logo.png
ROOTCOMPONENTS = \
$(ROOTDIRS) \
$(ROOTPROGS) \
$(ROOTPYMODS) \
$(ROOTPYACTIONMODS) \
$(ROOTPYSERVERMODS) \
$(ROOTPYPUBLISHMODS) \
$(ROOTPYCLIENTMODS) \
$(ROOTPYACTIONMODS) \
$(ROOTPYBUNDLEMODS)
all := TARGET = all
link := TARGET = link
install := TARGET = install
all: $(PROGS) binary-modules
clean:
rm -f $(PROGS)
clobber: clean
rm -fr $(ROOT)
install: all $(ROOTCOMPONENTS)
@cd brand; pwd; $(MAKE) $(TARGET)
@cd man; pwd; $(MAKE) $(TARGET)
@cd web; pwd; $(MAKE) $(TARGET)
@cd pkgdefs; pwd; $(MAKE) $(TARGET)
binary-modules:
@cd modules; pwd; $(MAKE) $(TARGET)
# XXX link is a developer target to connect the local machine to the current
# repository's working copy's versions of the commands, modules, and supporting
# files.
PWD:sh = pwd
link:
ln -s $(PWD)/client.py /usr/bin/pkg
ln -s $(PWD)/publish.py /usr/bin/pkgsend
ln -s $(PWD)/depot.py /usr/lib/pkg.depotd
ln -s $(PWD)/modules /usr/lib/python2.4/vendor-packages/pkg
@cd web; pwd; $(MAKE) $(TARGET)
@cd brand; pwd; $(MAKE) $(TARGET)
@cd man; pwd; $(MAKE) $(TARGET)
# Invoke all known modules with tests.
# XXX Invoke the bundle tests.
test:
# $(PYTHON) $(LINKPYTHONPKG)/bundle/__init__.py a_sysv_pkg
# $(PYTHON) $(LINKPYTHONPKG)/bundle/__init__.py a_tarball
$(PYTHON) $(LINKPYTHONPKG)/misc.py
$(PYTHON) $(LINKPYTHONPKG)/version.py
$(PYTHON) $(LINKPYTHONPKG)/fmri.py
$(PYTHON) $(LINKPYTHONPKG)/catalog.py
$(PYTHON) $(LINKPYTHONPKG)/manifest.py
$(PYTHON) $(LINKPYTHONPKG)/smf.py
$(PYTHON) $(LINKPYTHONPKG)/client/imageconfig.py
$(PYTHON) $(LINKPYTHONPKG)/client/filter.py
proto: $(ROOT)
$(ROOT):
mkdir -p $(ROOTDIRS)
$(ROOTUSRBIN)/%: %
rm -f $@; install -f $(ROOTUSRBIN) -m 0555 $<
$(ROOTUSRLIB)/%: %
rm -f $@; install -f $(ROOT)/usr/lib -m 0555 $<
$(ROOTPYTHONPKG)/actions/%: modules/actions/%
rm -f $@; install -f $(ROOTPYTHONPKG)/actions -m 0444 $<
$(ROOTPYTHONPKG)/server/%: modules/server/%
rm -f $@; install -f $(ROOTPYTHONPKG)/server -m 0444 $<
$(ROOTPYTHONPKG)/publish/%: modules/publish/%
rm -f $@; install -f $(ROOTPYTHONPKG)/publish -m 0444 $<
$(ROOTPYTHONPKG)/client/%: modules/client/%
rm -f $@; install -f $(ROOTPYTHONPKG)/client -m 0444 $<
$(ROOTPYTHONPKG)/bundle/%: modules/bundle/%
rm -f $@; install -f $(ROOTPYTHONPKG)/bundle -m 0444 $<
$(ROOTPYTHONPKG)/%.so: modules/%.so
rm -f $@; install -f $(ROOTPYTHONPKG) -m 0555 $<
$(ROOTPYTHONPKG)/%: modules/%
rm -f $@; install -f $(ROOTPYTHONPKG) -m 0444 $<
pkg: client.py
cp client.py pkg
pkgsend: publish.py
cp publish.py pkgsend
pkg.depotd: depot.py
cp depot.py pkg.depotd