Makefile revision 213
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/AKSH=/usr/bin/ksh
30N/APYTHON = /usr/bin/python
30N/A
12N/AROOT = ../proto/root_${MACH}
12N/AROOTUSRBIN = $(ROOT)/usr/bin
12N/AROOTUSRLIB = $(ROOT)/usr/lib
114N/AROOTSHARE = $(ROOT)/usr/share/lib/pkg
114N/AROOTMANIFEST = $(ROOT)/var/svc/manifest
12N/AROOTPYTHON = $(ROOTUSRLIB)/python2.4
12N/AROOTPYTHONVENDOR = $(ROOTPYTHON)/vendor-packages
12N/AROOTPYTHONPKG = $(ROOTPYTHONVENDOR)/pkg
114N/AROOTMAN1 = $(ROOT)/usr/share/man/cat1
114N/AROOTMAN1M = $(ROOT)/usr/share/man/cat1m
164N/AROOTMAN5 = $(ROOT)/usr/share/man/cat5
12N/A
30N/ALINKPYTHONPKG = /usr/lib/python2.4/vendor-packages/pkg
30N/A
29N/AROOTDIRS = \
29N/A $(ROOT) \
29N/A $(ROOTUSRBIN) \
29N/A $(ROOTUSRLIB) \
59N/A $(ROOTPYTHONPKG)/actions \
29N/A $(ROOTPYTHONPKG)/server \
29N/A $(ROOTPYTHONPKG)/publish \
59N/A $(ROOTPYTHONPKG)/client \
59N/A $(ROOTPYTHONPKG)/actions \
114N/A $(ROOTPYTHONPKG)/bundle \
114N/A $(ROOTMANIFEST) \
114N/A $(ROOTSHARE) \
114N/A $(ROOTMAN1) \
164N/A $(ROOTMAN1M) \
164N/A $(ROOTMAN5)
12N/A
12N/APROGS = pkg pkgsend pkg.depotd
59N/A
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 = \
33N/A modules/__init__.py \
98N/A modules/Queue25.py \
33N/A modules/arch.so \
34N/A modules/catalog.py \
33N/A modules/config.py \
59N/A modules/cpiofile.py \
33N/A modules/dependency.py \
33N/A modules/elf.so \
33N/A modules/fmri.py \
59N/A modules/manifest.py \
46N/A modules/misc.py \
127N/A modules/pkgtarfile.py \
98N/A modules/smf.py \
204N/A modules/subprocess_method.py \
33N/A modules/sysvpkg.py \
215N/A modules/version.py
33N/APYCMODS = $(PYMODS:%.py=%.pyc)
124N/A
22N/APYACTIONMODS = \
59N/A modules/actions/__init__.py \
59N/A modules/actions/attribute.py \
59N/A modules/actions/depend.py \
59N/A modules/actions/directory.py \
59N/A modules/actions/driver.py \
98N/A modules/actions/file.py \
59N/A modules/actions/generic.py \
59N/A modules/actions/hardlink.py \
59N/A modules/actions/legacy.py \
213N/A modules/actions/license.py \
136N/A modules/actions/link.py \
59N/A modules/actions/unknown.py
59N/APYCACTIONMODS = $(PYACTIONMODS:%.py=%.pyc)
124N/A
59N/APYSERVERMODS = \
24N/A modules/server/__init__.py \
33N/A modules/server/config.py \
33N/A modules/server/face.py \
117N/A modules/server/transaction.py
33N/APYCSERVERMODS = $(PYSERVERMODS:%.py=%.pyc)
124N/A
24N/APYCLIENTMODS = \
29N/A modules/client/__init__.py \
33N/A modules/client/filelist.py \
119N/A modules/client/filter.py \
118N/A modules/client/image.py \
59N/A modules/client/imageconfig.py \
104N/A modules/client/imageplan.py \
59N/A modules/client/pkgplan.py \
59N/A modules/client/retrieve.py
59N/APYCCLIENTMODS = $(PYCLIENTMODS:%.py=%.pyc)
124N/A
29N/APYPUBLISHMODS = \
29N/A modules/publish/__init__.py \
33N/A modules/publish/transaction.py
34N/APYCPUBLISHMODS = $(PYPUBLISHMODS:%.py=%.pyc)
124N/A
29N/APYBUNDLEMODS = \
59N/A modules/bundle/__init__.py \
59N/A modules/bundle/SolarisPackageDatastreamBundle.py \
59N/A modules/bundle/TarBundle.py \
59N/A modules/bundle/SolarisPackageDirBundle.py
59N/APYCBUNDLEMODS = $(PYBUNDLEMODS:%.py=%.pyc)
124N/A
59N/AROOTPYMODS = $(PYMODS:modules/%=$(ROOTPYTHONPKG)/%)
33N/AROOTPYACTIONMODS = \
59N/A $(PYACTIONMODS:modules/actions/%=$(ROOTPYTHONPKG)/actions/%)
59N/AROOTPYSERVERMODS = \
24N/A $(PYSERVERMODS:modules/server/%=$(ROOTPYTHONPKG)/server/%)
33N/AROOTPYPUBLISHMODS = \
29N/A $(PYPUBLISHMODS:modules/publish/%=$(ROOTPYTHONPKG)/publish/%)
33N/AROOTPYCLIENTMODS = \
29N/A $(PYCLIENTMODS:modules/client/%=$(ROOTPYTHONPKG)/client/%)
33N/AROOTPYBUNDLEMODS = \
59N/A $(PYBUNDLEMODS:modules/bundle/%=$(ROOTPYTHONPKG)/bundle/%)
59N/A
59N/AROOTPYCALLMODS = \
124N/A $(ROOTPYMODS:%.py=%.pyc) \
124N/A $(ROOTPYACTIONMODS:%.py=%.pyc) \
124N/A $(ROOTPYSERVERMODS:%.py=%.pyc) \
124N/A $(ROOTPYPUBLISHMODS:%.py=%.pyc) \
124N/A $(ROOTPYCLIENTMODS:%.py=%.pyc) \
124N/A $(ROOTPYBUNDLEMODS:%.py=%.pyc)
124N/A
124N/AROOTPKGMANIFEST = $(ROOTMANIFEST)/pkg-server.xml
114N/A
114N/AROOTPKGWEB = $(ROOTSHARE)/pkg-block-logo.png
114N/A
114N/AROOTCOMPONENTS = \
59N/A $(ROOTDIRS) \
59N/A $(ROOTPROGS) \
59N/A $(ROOTPYMODS) \
59N/A $(ROOTPYACTIONMODS) \
59N/A $(ROOTPYSERVERMODS) \
59N/A $(ROOTPYPUBLISHMODS) \
59N/A $(ROOTPYCLIENTMODS) \
59N/A $(ROOTPYACTIONMODS) \
59N/A $(ROOTPYBUNDLEMODS) \
124N/A $(ROOTPYCALLMODS) \
124N/A $(ROOTPKGMANIFEST)
124N/A
12N/Aall := TARGET = all
30N/Alink := TARGET = link
97N/Ainstall := TARGET = install
98N/Alink-clean := TARGET = link-clean
120N/Aclean := TARGET = clean
124N/Aclobber := TARGET = clobber
124N/Atest := TARGET = test
181N/Atest-verbose := TARGET = test-verbose
181N/A
30N/Aall: $(PROGS) binary-modules
33N/A
12N/Aclean:
20N/A rm -f $(PROGS)
20N/A @cd modules; pwd; $(MAKE) $(TARGET)
124N/A @cd man; pwd; $(MAKE) $(TARGET)
124N/A @cd web; pwd; $(MAKE) $(TARGET)
124N/A @cd tests; pwd; $(MAKE) $(TARGET)
181N/A
20N/Aclobber: clean
33N/A rm -fr $(ROOT)
33N/A rm -f $(PYCMODS) $(PYCACTIONMODS) $(PYCSERVERMODS) \
124N/A $(PYCPUBLISHMODS) $(PYCCLIENTMODS) $(PYCBUNDLEMODS)
124N/A @cd modules; pwd; $(MAKE) $(TARGET)
124N/A @cd man; pwd; $(MAKE) $(TARGET)
124N/A @cd web; pwd; $(MAKE) $(TARGET)
124N/A
33N/Ainstall: all $(ROOTCOMPONENTS)
114N/A @cd brand; pwd; $(MAKE) $(TARGET)
98N/A @cd man; pwd; $(MAKE) $(TARGET)
114N/A @cd web; pwd; $(MAKE) $(TARGET)
114N/A @cd pkgdefs; pwd; $(MAKE) $(TARGET)
98N/A
30N/Amodules/%.pyc: modules/%.py
124N/A python -m compileall -l $(@D)
124N/A
124N/Abinary-modules:
33N/A @cd modules; pwd; $(MAKE) $(TARGET)
33N/A
12N/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, modules, and supporting
114N/A# files.
114N/APWD:sh = pwd
22N/Alink:
22N/A ln -sf $(PWD)/client.py /usr/bin/pkg
120N/A ln -sf $(PWD)/publish.py /usr/bin/pkgsend
120N/A ln -sf $(PWD)/depot.py /usr/lib/pkg.depotd
120N/A ln -sf $(PWD)/modules /usr/lib/python2.4/vendor-packages/pkg
120N/A ln -sf $(PWD)/pkg-server.xml /var/svc/manifest/pkg-server.xml
124N/A @cd web; pwd; $(MAKE) $(TARGET)
114N/A @cd brand; pwd; $(MAKE) $(TARGET)
97N/A @cd man; pwd; $(MAKE) $(TARGET)
114N/A
22N/Alink-clean:
120N/A rm -f /usr/bin/pkg
120N/A rm -f /usr/bin/pkgsend
120N/A rm -f /usr/lib/pkg.depotd
120N/A rm -f /usr/lib/python2.4/vendor-packages/pkg
120N/A rm -f /var/svc/manifest/pkg-server.xml
124N/A @cd web; pwd; $(MAKE) $(TARGET)
120N/A @cd brand; pwd; $(MAKE) $(TARGET)
120N/A @cd man; pwd; $(MAKE) $(TARGET)
120N/A
135N/Atest:
30N/A @cd tests; pwd; $(MAKE) $(TARGET)
181N/A
181N/Atest-verbose: test
181N/A
30N/Aproto: $(ROOT)
114N/A
12N/A$(ROOT):
114N/A mkdir -p $(ROOTDIRS)
114N/A
59N/A$(ROOTUSRBIN)/%: %
12N/A rm -f $@; install -f $(ROOTUSRBIN) -m 0555 $<
20N/A
12N/A$(ROOTUSRLIB)/%: %
12N/A rm -f $@; install -f $(ROOT)/usr/lib -m 0555 $<
20N/A
12N/A$(ROOTPYTHONPKG)/actions/%: modules/actions/%
59N/A rm -f $@; install -f $(ROOTPYTHONPKG)/actions -m 0444 $<
59N/A
59N/A$(ROOTPYTHONPKG)/server/%: modules/server/%
33N/A rm -f $@; install -f $(ROOTPYTHONPKG)/server -m 0444 $<
24N/A
24N/A$(ROOTPYTHONPKG)/publish/%: modules/publish/%
33N/A rm -f $@; install -f $(ROOTPYTHONPKG)/publish -m 0444 $<
29N/A
29N/A$(ROOTPYTHONPKG)/client/%: modules/client/%
33N/A rm -f $@; install -f $(ROOTPYTHONPKG)/client -m 0444 $<
29N/A
29N/A$(ROOTPYTHONPKG)/bundle/%: modules/bundle/%
59N/A rm -f $@; install -f $(ROOTPYTHONPKG)/bundle -m 0444 $<
59N/A
59N/A$(ROOTPYTHONPKG)/%.so: modules/%.so
33N/A rm -f $@; install -f $(ROOTPYTHONPKG) -m 0555 $<
33N/A
33N/A$(ROOTPYTHONPKG)/%: modules/%
33N/A rm -f $@; install -f $(ROOTPYTHONPKG) -m 0444 $<
20N/A
12N/A$(ROOTMANIFEST)/%: %
124N/A rm -f $@; install -f $(ROOTMANIFEST) -m 0444 $<
124N/A
124N/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
12N/A