Makefile revision 114
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# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
12N/A# Use is subject to license terms.
12N/A#
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
135N/APYTHON = /usr/bin/python
30N/A
30N/AROOT = ../proto/root_${MACH}
12N/AROOTUSRBIN = $(ROOT)/usr/bin
12N/AROOTUSRLIB = $(ROOT)/usr/lib
12N/AROOTSHARE = $(ROOT)/usr/share/lib/pkg
114N/AROOTMANIFEST = $(ROOT)/var/svc/manifest
114N/AROOTPYTHON = $(ROOTUSRLIB)/python2.4
12N/AROOTPYTHONVENDOR = $(ROOTPYTHON)/vendor-packages
12N/AROOTPYTHONPKG = $(ROOTPYTHONVENDOR)/pkg
12N/AROOTMAN1 = $(ROOT)/usr/share/man/cat1
114N/AROOTMAN1M = $(ROOT)/usr/share/man/cat1m
114N/A
12N/ALINKPYTHONPKG = /usr/lib/python2.4/vendor-packages/pkg
30N/A
30N/AROOTDIRS = \
29N/A $(ROOT) \
29N/A $(ROOTUSRBIN) \
29N/A $(ROOTUSRLIB) \
29N/A $(ROOTPYTHONPKG)/actions \
59N/A $(ROOTPYTHONPKG)/server \
29N/A $(ROOTPYTHONPKG)/publish \
29N/A $(ROOTPYTHONPKG)/client \
59N/A $(ROOTPYTHONPKG)/actions \
59N/A $(ROOTPYTHONPKG)/bundle \
114N/A $(ROOTMANIFEST) \
114N/A $(ROOTSHARE) \
114N/A $(ROOTMAN1) \
114N/A $(ROOTMAN1M)
114N/A
12N/APROGS = pkg pkgsend pkg.depotd
12N/A
59N/AROOTPROGS = \
12N/A $(ROOT)/usr/bin/pkg \
12N/A $(ROOT)/usr/bin/pkgsend \
12N/A $(ROOT)/usr/lib/pkg.depotd
12N/A
12N/APYMODS = \
12N/A modules/__init__.py \
33N/A modules/Queue25.py \
98N/A modules/arch.so \
33N/A modules/catalog.py \
34N/A modules/config.py \
33N/A modules/cpiofile.py \
59N/A modules/dependency.py \
33N/A modules/elf.so \
33N/A modules/fmri.py \
33N/A modules/manifest.py \
59N/A modules/misc.py \
46N/A modules/package.py \
33N/A modules/smf.py \
127N/A modules/sysvpkg.py \
98N/A modules/version.py
33N/A
33N/APYACTIONMODS = \
124N/A modules/actions/__init__.py \
22N/A modules/actions/attribute.py \
59N/A modules/actions/depend.py \
59N/A modules/actions/directory.py \
59N/A modules/actions/driver.py \
59N/A modules/actions/file.py \
59N/A modules/actions/generic.py \
98N/A modules/actions/hardlink.py \
59N/A modules/actions/link.py \
59N/A modules/actions/unknown.py
59N/A
59N/APYSERVERMODS = \
59N/A modules/server/__init__.py \
124N/A modules/server/config.py \
59N/A modules/server/transaction.py
24N/A
33N/APYCLIENTMODS = \
33N/A modules/client/__init__.py \
117N/A modules/client/image.py \
33N/A modules/client/imageconfig.py \
124N/A modules/client/imageplan.py \
24N/A modules/client/pkgplan.py \
29N/A modules/client/retrieve.py
33N/A
119N/APYPUBLISHMODS = \
118N/A modules/publish/__init__.py \
59N/A modules/publish/transaction.py
104N/A
59N/APYBUNDLEMODS = \
59N/A modules/bundle/__init__.py \
59N/A modules/bundle/SolarisPackageDatastreamBundle.py \
124N/A modules/bundle/TarBundle.py \
29N/A modules/bundle/SolarisPackageDirBundle.py
29N/A
33N/AROOTPYMODS = $(PYMODS:modules/%=$(ROOTPYTHONPKG)/%)
34N/AROOTPYACTIONMODS = \
124N/A $(PYACTIONMODS:modules/actions/%=$(ROOTPYTHONPKG)/actions/%)
29N/AROOTPYSERVERMODS = \
59N/A $(PYSERVERMODS:modules/server/%=$(ROOTPYTHONPKG)/server/%)
59N/AROOTPYPUBLISHMODS = \
59N/A $(PYPUBLISHMODS:modules/publish/%=$(ROOTPYTHONPKG)/publish/%)
59N/AROOTPYCLIENTMODS = \
59N/A $(PYCLIENTMODS:modules/client/%=$(ROOTPYTHONPKG)/client/%)
124N/AROOTPYACTIONMODS = \
59N/A $(PYACTIONMODS:modules/actions/%=$(ROOTPYTHONPKG)/actions/%)
33N/AROOTPYBUNDLEMODS = \
59N/A $(PYBUNDLEMODS:modules/bundle/%=$(ROOTPYTHONPKG)/bundle/%)
59N/A
24N/AROOTPKGMANIFEST = $(ROOTMANIFEST)/pkg-server.xml
33N/A
29N/AROOTPKGWEB = $(ROOTSHARE)/pkg-block-logo.png
33N/A
29N/AROOTCOMPONENTS = \
33N/A $(ROOTDIRS) \
59N/A $(ROOTPROGS) \
59N/A $(ROOTPYMODS) \
59N/A $(ROOTPYACTIONMODS) \
124N/A $(ROOTPYSERVERMODS) \
124N/A $(ROOTPYPUBLISHMODS) \
124N/A $(ROOTPYCLIENTMODS) \
124N/A $(ROOTPYACTIONMODS) \
124N/A $(ROOTPYBUNDLEMODS)
124N/A
124N/Aall := TARGET = all
124N/Alink := TARGET = link
114N/Ainstall := TARGET = install
114N/A
114N/Aall: $(PROGS) binary-modules
114N/A
59N/Aclean:
59N/A rm -f $(PROGS)
59N/A
59N/Aclobber: clean
59N/A rm -fr $(ROOT)
59N/A
59N/Ainstall: all $(ROOTCOMPONENTS)
59N/A @cd brand; pwd; $(MAKE) $(TARGET)
59N/A @cd man; pwd; $(MAKE) $(TARGET)
124N/A @cd web; pwd; $(MAKE) $(TARGET)
124N/A @cd pkgdefs; pwd; $(MAKE) $(TARGET)
124N/A
12N/Abinary-modules:
30N/A @cd modules; pwd; $(MAKE) $(TARGET)
97N/A
98N/A# XXX link is a developer target to connect the local machine to the current
120N/A# repository's working copy's versions of the commands, modules, and supporting
124N/A# files.
124N/APWD:sh = pwd
30N/Alink:
33N/A ln -s $(PWD)/client.py /usr/bin/pkg
12N/A ln -s $(PWD)/publish.py /usr/bin/pkgsend
20N/A ln -s $(PWD)/depot.py /usr/lib/pkg.depotd
20N/A ln -s $(PWD)/modules /usr/lib/python2.4/vendor-packages/pkg
124N/A @cd web; pwd; $(MAKE) $(TARGET)
124N/A @cd brand; pwd; $(MAKE) $(TARGET)
124N/A @cd man; pwd; $(MAKE) $(TARGET)
20N/A
33N/A# Invoke all known modules with tests.
33N/A# XXX Invoke the bundle tests.
124N/Atest:
124N/A # $(PYTHON) $(LINKPYTHONPKG)/bundle/__init__.py a_sysv_pkg
124N/A # $(PYTHON) $(LINKPYTHONPKG)/bundle/__init__.py a_tarball
124N/A $(PYTHON) $(LINKPYTHONPKG)/misc.py
124N/A $(PYTHON) $(LINKPYTHONPKG)/version.py
33N/A $(PYTHON) $(LINKPYTHONPKG)/fmri.py
114N/A $(PYTHON) $(LINKPYTHONPKG)/catalog.py
98N/A $(PYTHON) $(LINKPYTHONPKG)/manifest.py
114N/A $(PYTHON) $(LINKPYTHONPKG)/smf.py
114N/A $(PYTHON) $(LINKPYTHONPKG)/client/imageconfig.py
98N/A $(PYTHON) $(LINKPYTHONPKG)/client/filter.py
30N/A
124N/Aproto: $(ROOT)
124N/A
124N/A$(ROOT):
33N/A mkdir -p $(ROOTDIRS)
33N/A
12N/A$(ROOTUSRBIN)/%: %
22N/A rm -f $@; install -f $(ROOTUSRBIN) -m 0555 $<
114N/A
114N/A$(ROOTUSRLIB)/%: %
22N/A rm -f $@; install -f $(ROOT)/usr/lib -m 0555 $<
22N/A
120N/A$(ROOTPYTHONPKG)/actions/%: modules/actions/%
120N/A rm -f $@; install -f $(ROOTPYTHONPKG)/actions -m 0444 $<
120N/A
120N/A$(ROOTPYTHONPKG)/server/%: modules/server/%
124N/A rm -f $@; install -f $(ROOTPYTHONPKG)/server -m 0444 $<
114N/A
97N/A$(ROOTPYTHONPKG)/publish/%: modules/publish/%
114N/A rm -f $@; install -f $(ROOTPYTHONPKG)/publish -m 0444 $<
22N/A
120N/A$(ROOTPYTHONPKG)/client/%: modules/client/%
120N/A rm -f $@; install -f $(ROOTPYTHONPKG)/client -m 0444 $<
120N/A
120N/A$(ROOTPYTHONPKG)/bundle/%: modules/bundle/%
120N/A rm -f $@; install -f $(ROOTPYTHONPKG)/bundle -m 0444 $<
124N/A
120N/A$(ROOTPYTHONPKG)/%.so: modules/%.so
120N/A rm -f $@; install -f $(ROOTPYTHONPKG) -m 0555 $<
120N/A
135N/A$(ROOTPYTHONPKG)/%: modules/%
30N/A rm -f $@; install -f $(ROOTPYTHONPKG) -m 0444 $<
50N/A
30N/Apkg: client.py
50N/A cp client.py pkg
50N/A
46N/Apkgsend: publish.py
30N/A cp publish.py pkgsend
30N/A
45N/Apkg.depotd: depot.py
39N/A cp depot.py pkg.depotd
74N/A