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:
Andrew Cooper committed 2023-03-17 10:44:16 +00:00
1 parent 1b00068420
commit 8d14976d37
1 file changed
+6 -5
+6 -5
View File
@@ -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 \
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.