mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/pygrub: Factor out common setup.py parts
... to mirror the tools/python side in c/s 2b8314a3c3.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
1 parent
1b00068420
commit
8d14976d37
1 file changed
+6
-5
@@ -6,19 +6,20 @@ PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS)
|
||||
PY_LDFLAGS = $(SHLIB_LDFLAGS) $(APPEND_LDFLAGS)
|
||||
INSTALL_LOG = build/installed_files.txt
|
||||
|
||||
setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" \
|
||||
$(PYTHON) setup.py
|
||||
|
||||
.PHONY: all
|
||||
all: build
|
||||
.PHONY: build
|
||||
build:
|
||||
CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build
|
||||
$(setup.py) build
|
||||
|
||||
.PHONY: install
|
||||
install: all
|
||||
$(INSTALL_DIR) $(DESTDIR)/$(bindir)
|
||||
CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" \
|
||||
LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py install \
|
||||
--record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
|
||||
--root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force
|
||||
$(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
|
||||
--root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force
|
||||
set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
|
||||
"`readlink -f $(DESTDIR)/$(bindir)`" != \
|
||||
"`readlink -f $(LIBEXEC_BIN)`" ]; then \
|
||||
|
||||