EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
endif
+PYTHON ?= python
+PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"
+# The above requires that PREFIX contains *no spaces*. This variable is here
+# to permit the user to set PYTHON_PREFIX_ARG to '' to workaround this bug:
+# https://bugs.launchpad.net/ubuntu/+bug/362570
+
# cc-option: Check if compiler supports first option, else fall back to second.
# Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
all: build
.PHONY: build
build:
- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build
+ CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build
.PHONY: install
install: all
- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install \
- --prefix="$(PREFIX)" --root="$(DESTDIR)" --force
+ CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
+ $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force
$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
.PHONY: clean
.PHONY: build buildpy
buildpy:
- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build
+ CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build
build: buildpy refresh-pot refresh-po $(CATALOGS)
.PHONY: install
install: install-messages install-dtd
- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install \
- --prefix="$(PREFIX)" --root="$(DESTDIR)" --force
+ CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
+ $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force
install-dtd: all
$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
$(INSTALL_DATA) $(ACM_INST_HTML) $(DESTDIR)$(ACM_SECGEN_HTMLDIR)
$(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
$(INSTALL_PROG) $(ACM_INST_CGI) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
- python python/setup.py install \
- --prefix="$(PREFIX)" --root="$(DESTDIR)" --force
+ $(PYTHON) python/setup.py install $(PYTHON_PREFIX_ARG) \
+ --root="$(DESTDIR)" --force
else
.PHONY: all
all:
.PHONY: build
build: $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
- python python/setup.py build
+ $(PYTHON) python/setup.py build
chmod 700 $(ACM_SCRIPTS)
xensec_tool: $(OBJS_TOOL)