Makefile revision 124
0N/A#
2099N/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.
0N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0N/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#
1472N/A# CDDL HEADER END
1472N/A#
1472N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
0N/A# Use is subject to license terms.
0N/A#
0N/A
1879N/A# client.py -> /usr/bin/pkg
1879N/A# publish.py -> /usr/bin/pkgsend
1879N/A# depot.py -> /usr/lib/pkg.depotd
1879N/A#
1879N/A# pkg/*.py -> /usr/lib/python2.4/vendor-packages/pkg/
1879N/A
1879N/AMACH:sh = uname -p
1879N/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 \
2062N/A modules/catalog.py \
0N/A modules/config.py \
0N/A modules/cpiofile.py \
0N/A modules/dependency.py \
2342N/A modules/elf.so \
2342N/A modules/fmri.py \
2342N/A modules/manifest.py \
2342N/A modules/misc.py \
2342N/A modules/package.py \
2342N/A modules/smf.py \
2342N/A modules/sysvpkg.py \
2342N/A modules/version.py
2342N/APYCMODS = $(PYMODS:%.py=%.pyc)
0N/A
0N/APYACTIONMODS = \
652N/A modules/actions/__init__.py \
2062N/A modules/actions/attribute.py \
652N/A modules/actions/depend.py \
0N/A modules/actions/directory.py \
0N/A modules/actions/driver.py \
0N/A modules/actions/file.py \
0N/A modules/actions/generic.py \
0N/A modules/actions/hardlink.py \
0N/A modules/actions/link.py \
0N/A modules/actions/unknown.py
0N/APYCACTIONMODS = $(PYACTIONMODS:%.py=%.pyc)
0N/A
0N/APYSERVERMODS = \
0N/A modules/server/__init__.py \
0N/A modules/server/config.py \
0N/A modules/server/face.py \
0N/A modules/server/transaction.py
0N/APYCSERVERMODS = $(PYSERVERMODS:%.py=%.pyc)
0N/A
0N/APYCLIENTMODS = \
0N/A modules/client/__init__.py \
0N/A modules/client/filelist.py \
0N/A modules/client/filter.py \
0N/A modules/client/image.py \
0N/A modules/client/imageconfig.py \
0N/A modules/client/imageplan.py \
0N/A modules/client/pkgplan.py \
0N/A modules/client/retrieve.py
0N/APYCCLIENTMODS = $(PYCLIENTMODS:%.py=%.pyc)
0N/A
0N/APYPUBLISHMODS = \
0N/A modules/publish/__init__.py \
0N/A modules/publish/transaction.py
0N/APYCPUBLISHMODS = $(PYPUBLISHMODS:%.py=%.pyc)
0N/A
0N/APYBUNDLEMODS = \
0N/A modules/bundle/__init__.py \
0N/A modules/bundle/SolarisPackageDatastreamBundle.py \
0N/A modules/bundle/TarBundle.py \
0N/A modules/bundle/SolarisPackageDirBundle.py
652N/APYCBUNDLEMODS = $(PYBUNDLEMODS:%.py=%.pyc)
0N/A
0N/AROOTPYMODS = $(PYMODS:modules/%=$(ROOTPYTHONPKG)/%)
0N/AROOTPYACTIONMODS = \
0N/A $(PYACTIONMODS:modules/actions/%=$(ROOTPYTHONPKG)/actions/%)
2062N/AROOTPYSERVERMODS = \
0N/A $(PYSERVERMODS:modules/server/%=$(ROOTPYTHONPKG)/server/%)
652N/AROOTPYPUBLISHMODS = \
652N/A $(PYPUBLISHMODS:modules/publish/%=$(ROOTPYTHONPKG)/publish/%)
2062N/AROOTPYCLIENTMODS = \
0N/A $(PYCLIENTMODS:modules/client/%=$(ROOTPYTHONPKG)/client/%)
0N/AROOTPYBUNDLEMODS = \
0N/A $(PYBUNDLEMODS:modules/bundle/%=$(ROOTPYTHONPKG)/bundle/%)
0N/A
0N/AROOTPYCALLMODS = \
0N/A $(ROOTPYMODS:%.py=%.pyc) \
0N/A $(ROOTPYACTIONMODS:%.py=%.pyc) \
0N/A $(ROOTPYSERVERMODS:%.py=%.pyc) \
0N/A $(ROOTPYPUBLISHMODS:%.py=%.pyc) \
0N/A $(ROOTPYCLIENTMODS:%.py=%.pyc) \
0N/A $(ROOTPYBUNDLEMODS:%.py=%.pyc)
0N/A
0N/AROOTPKGMANIFEST = $(ROOTMANIFEST)/pkg-server.xml
0N/A
0N/AROOTPKGWEB = $(ROOTSHARE)/pkg-block-logo.png
0N/A
0N/AROOTCOMPONENTS = \
0N/A $(ROOTDIRS) \
0N/A $(ROOTPROGS) \
0N/A $(ROOTPYMODS) \
0N/A $(ROOTPYACTIONMODS) \
0N/A $(ROOTPYSERVERMODS) \
0N/A $(ROOTPYPUBLISHMODS) \
0N/A $(ROOTPYCLIENTMODS) \
0N/A $(ROOTPYACTIONMODS) \
0N/A $(ROOTPYBUNDLEMODS) \
0N/A $(ROOTPYCALLMODS) \
0N/A $(ROOTPKGMANIFEST)
0N/A
0N/Aall := TARGET = all
0N/Alink := TARGET = link
0N/Ainstall := TARGET = install
0N/Alink-clean := TARGET = link-clean
0N/Aclean := TARGET = clean
0N/Aclobber := TARGET = clobber
0N/A
0N/Aall: $(PROGS) binary-modules
0N/A
0N/Aclean:
0N/A rm -f $(PROGS)
0N/A @cd modules; pwd; $(MAKE) $(TARGET)
0N/A @cd man; pwd; $(MAKE) $(TARGET)
0N/A @cd web; pwd; $(MAKE) $(TARGET)
0N/A
0N/Aclobber: clean
0N/A rm -fr $(ROOT)
0N/A rm -f $(PYCMODS) $(PYCACTIONMODS) $(PYCSERVERMODS) \
0N/A $(PYCPUBLISHMODS) $(PYCCLIENTMODS) $(PYCBUNDLEMODS)
0N/A @cd modules; pwd; $(MAKE) $(TARGET)
0N/A @cd man; pwd; $(MAKE) $(TARGET)
0N/A @cd web; pwd; $(MAKE) $(TARGET)
0N/A
0N/Ainstall: all $(ROOTCOMPONENTS)
0N/A @cd brand; pwd; $(MAKE) $(TARGET)
0N/A @cd man; pwd; $(MAKE) $(TARGET)
0N/A @cd web; pwd; $(MAKE) $(TARGET)
0N/A @cd pkgdefs; pwd; $(MAKE) $(TARGET)
0N/A
0N/Amodules/%.pyc: modules/%.py
0N/A python -m compileall -l $(@D)
0N/A
0N/Abinary-modules:
0N/A @cd modules; pwd; $(MAKE) $(TARGET)
0N/A
0N/A# XXX link is a developer target to connect the local machine to the current
0N/A# repository's working copy's versions of the commands, modules, and supporting
0N/A# files.
0N/APWD:sh = pwd
0N/Alink:
0N/A ln -sf $(PWD)/client.py /usr/bin/pkg
0N/A ln -sf $(PWD)/publish.py /usr/bin/pkgsend
0N/A ln -sf $(PWD)/depot.py /usr/lib/pkg.depotd
0N/A ln -sf $(PWD)/modules /usr/lib/python2.4/vendor-packages/pkg
0N/A ln -sf $(PWD)/pkg-server.xml /var/svc/manifest/pkg-server.xml
0N/A @cd web; pwd; $(MAKE) $(TARGET)
0N/A @cd brand; pwd; $(MAKE) $(TARGET)
0N/A @cd man; pwd; $(MAKE) $(TARGET)
0N/A
0N/Alink-clean:
0N/A rm -f /usr/bin/pkg
0N/A rm -f /usr/bin/pkgsend
0N/A rm -f /usr/lib/pkg.depotd
0N/A rm -f /usr/lib/python2.4/vendor-packages/pkg
0N/A rm -f /var/svc/manifest/pkg-server.xml
0N/A @cd web; pwd; $(MAKE) $(TARGET)
0N/A @cd brand; pwd; $(MAKE) $(TARGET)
0N/A @cd man; pwd; $(MAKE) $(TARGET)
0N/A
0N/A# Invoke all known modules with tests.
0N/A# XXX Invoke the bundle tests.
0N/Atest:
0N/A # $(PYTHON) $(LINKPYTHONPKG)/bundle/__init__.py a_sysv_pkg
0N/A # $(PYTHON) $(LINKPYTHONPKG)/bundle/__init__.py a_tarball
0N/A $(PYTHON) $(LINKPYTHONPKG)/misc.py
0N/A $(PYTHON) $(LINKPYTHONPKG)/version.py
0N/A $(PYTHON) $(LINKPYTHONPKG)/fmri.py
0N/A $(PYTHON) $(LINKPYTHONPKG)/catalog.py
0N/A $(PYTHON) $(LINKPYTHONPKG)/manifest.py
0N/A $(PYTHON) $(LINKPYTHONPKG)/smf.py
0N/A $(PYTHON) $(LINKPYTHONPKG)/client/imageconfig.py
0N/A $(PYTHON) $(LINKPYTHONPKG)/client/filter.py
0N/A
0N/Aproto: $(ROOT)
0N/A
0N/A$(ROOT):
0N/A mkdir -p $(ROOTDIRS)
0N/A
0N/A$(ROOTUSRBIN)/%: %
0N/A rm -f $@; install -f $(ROOTUSRBIN) -m 0555 $<
0N/A
0N/A$(ROOTUSRLIB)/%: %
0N/A rm -f $@; install -f $(ROOT)/usr/lib -m 0555 $<
0N/A
0N/A$(ROOTPYTHONPKG)/actions/%: modules/actions/%
0N/A rm -f $@; install -f $(ROOTPYTHONPKG)/actions -m 0444 $<
0N/A
0N/A$(ROOTPYTHONPKG)/server/%: modules/server/%
0N/A rm -f $@; install -f $(ROOTPYTHONPKG)/server -m 0444 $<
0N/A
0N/A$(ROOTPYTHONPKG)/publish/%: modules/publish/%
0N/A rm -f $@; install -f $(ROOTPYTHONPKG)/publish -m 0444 $<
0N/A
0N/A$(ROOTPYTHONPKG)/client/%: modules/client/%
0N/A rm -f $@; install -f $(ROOTPYTHONPKG)/client -m 0444 $<
0N/A
0N/A$(ROOTPYTHONPKG)/bundle/%: modules/bundle/%
0N/A rm -f $@; install -f $(ROOTPYTHONPKG)/bundle -m 0444 $<
0N/A
0N/A$(ROOTPYTHONPKG)/%.so: modules/%.so
0N/A rm -f $@; install -f $(ROOTPYTHONPKG) -m 0555 $<
0N/A
0N/A$(ROOTPYTHONPKG)/%: modules/%
0N/A rm -f $@; install -f $(ROOTPYTHONPKG) -m 0444 $<
0N/A
0N/A$(ROOTMANIFEST)/%: %
0N/A rm -f $@; install -f $(ROOTMANIFEST) -m 0444 $<
0N/A
0N/Apkg: client.py
0N/A cp client.py pkg
0N/A
16N/Apkgsend: publish.py
0N/A cp publish.py pkgsend
0N/A
0N/Apkg.depotd: depot.py
0N/A cp depot.py pkg.depotd
0N/A