Source

rpath-product-definition / Make.rules

Full commit
#
# Copyright (c) 2006-2008 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/licenses/CPL-1.0.
#
# This program is distributed in the hope that it will be useful, but
# without any warranty; without even the implied warranty of merchantability
# or fitness for a particular purpose. See the Common Public License for
# full details.
#

PYTHON = $(shell [ -x /usr/bin/python ] && echo /usr/bin/python)
PYVERSION = $(shell $(PYTHON) -c 'import os, sys; print sys.version[:3]')
PYINCLUDE = $(shell $(PYTHON) -c 'import os, sys; print os.sep.join((sys.prefix, "include", "python" + sys.version[:3]))')

pyfiles-install:
	mkdir -p $(DESTDIR)$(pydir)
	for f in $(python_files); do \
		mkdir -p `dirname $(DESTDIR)$(pydir)/$$f`; \
		cp -a $$f $(DESTDIR)/$(pydir)/$$f; \
	done

default-dist: dist-subdirs
	for f in $(dist_files); do \
		mkdir -p $(DISTDIR)/$(DIR)/`dirname $$f`; \
		cp -a $$f $(DISTDIR)/$(DIR)/$$f; \
	done

default-install:

default-all:

default-clean: clean-subdirs
	rm -f *~ .??*~ .#* *.pyo *.pyc $(generated_files) *.orig *.ccs

default-test:
	$(TESTSUITE) *.py

default-subdirs:
	for d in $(SUBDIRS); do make -C $$d DIR=$$d || exit 1; done

clean-subdirs:
ifdef SUBDIRS
	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d clean || exit 1; done
endif

install-subdirs:
ifdef SUBDIRS
	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d install || exit 1; done
endif

dist-subdirs:
ifdef SUBDIRS
	for d in $(SUBDIRS); do make -C $$d DIR=$(DIR)/$$d dist || exit 1; done
endif