bindir = @bindir@ datadir = @datadir@ datarootdir = @datarootdir@ exec_prefix = @exec_prefix@ includedir = @includedir@ libdir = @libdir@ mandir = @mandir@ prefix = @prefix@ srcdir = @srcdir@ srcdir2 := $(shell cd $(srcdir); pwd) INSTALL = @INSTALL@ MKDIR_P = @MKDIR_P@ LN_S = @LN_S@ INSTALL_PROGRAM = ${INSTALL} -m 755 INSTALL_DATA = ${INSTALL} -m 644 INSTALL_SCRIPT = ${INSTALL} -m 644 RM = rm -f VPATH = $(srcdir) PYTHON = @PYTHON@ PYTHON_FLAGS = --library-dirs=$(libdir):../../src/core \ --include-dirs=$(srcdir)/../../src/core:$(includedir) PYTHON_VERSION = @PYTHON_VERSION@ pythonlib = $$destdir/lib/python$(PYTHON_VERSION)/site-packages envfile = python.env ARCHFLAGS = export ARCHFLAGS # # Python distutils doesn't handle VPATH correctly. So copy the sources # into a temporary directory. # all: build/tmp $(envfile) $(PYTHON) setup.py build_ext $(PYTHON_FLAGS) build build/tmp: $(MKDIR_P) build/tmp $(LN_S) $(srcdir2)/Rappture/*.cc build/tmp install: $(PYTHON) setup.py install --prefix=$(prefix) $(MKDIR_P) $(bindir) $(INSTALL) -m 555 $(envfile) $(bindir) clean: $(PYTHON) setup.py clean $(RM) -rf build $(envfile): echo 'export PYTHONPATH=$(pythonlib):$$PYTHONPATH' > $(envfile) distclean: clean