Skip to content

Commit

Permalink
Fix werk compile
Browse files Browse the repository at this point in the history
At the point of first evaluation, DESTDIR is not known, therefor evaluation should only happen at time of execution

Change-Id: I2a7103f4d3aed696118bc562f360fdfa098d465e
  • Loading branch information
Alex Zurhake committed Dec 12, 2024
1 parent d792c6a commit 62c895f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions omd/packages/Python/Python.make
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ PYTHON := Python
PYTHON_DIR := $(PYTHON)-$(PYTHON_VERSION)

# Used by other OMD packages
PACKAGE_PYTHON_DESTDIR := $(DESTDIR)$(OMD_ROOT)
PACKAGE_PYTHON_PYTHONPATH := $(PACKAGE_PYTHON_DESTDIR)/lib/python$(PYTHON_MAJOR_DOT_MINOR)
PACKAGE_PYTHON_LDFLAGS := -L$(PACKAGE_PYTHON_DESTDIR)/lib -L$(PACKAGE_PYTHON_PYTHONPATH)/config
PACKAGE_PYTHON_LD_LIBRARY_PATH := $(PACKAGE_PYTHON_DESTDIR)/lib
PACKAGE_PYTHON_INCLUDE_PATH := $(PACKAGE_PYTHON_DESTDIR)/include/python$(PYTHON_MAJOR_DOT_MINOR)
PACKAGE_PYTHON_BIN := $(PACKAGE_PYTHON_DESTDIR)/bin
PACKAGE_PYTHON_EXECUTABLE := $(PACKAGE_PYTHON_BIN)/python$(PYTHON_VERSION_MAJOR)
PACKAGE_PYTHON_DESTDIR = $(DESTDIR)$(OMD_ROOT)
PACKAGE_PYTHON_PYTHONPATH = $(PACKAGE_PYTHON_DESTDIR)/lib/python$(PYTHON_MAJOR_DOT_MINOR)
PACKAGE_PYTHON_LDFLAGS = -L$(PACKAGE_PYTHON_DESTDIR)/lib -L$(PACKAGE_PYTHON_PYTHONPATH)/config
PACKAGE_PYTHON_LD_LIBRARY_PATH = $(PACKAGE_PYTHON_DESTDIR)/lib
PACKAGE_PYTHON_INCLUDE_PATH = $(PACKAGE_PYTHON_DESTDIR)/include/python$(PYTHON_MAJOR_DOT_MINOR)
PACKAGE_PYTHON_BIN = $(PACKAGE_PYTHON_DESTDIR)/bin
PACKAGE_PYTHON_EXECUTABLE = $(PACKAGE_PYTHON_BIN)/python$(PYTHON_VERSION_MAJOR)
4 changes: 2 additions & 2 deletions omd/packages/python3-modules/python3-modules.make
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ PYTHON3_MODULES := python3-modules
# Used by other OMD packages
PACKAGE_PYTHON3_MODULES_PYTHON_DEPS := deps_install_bazel

PACKAGE_PYTHON3_MODULES_PYTHONPATH := $(DESTDIR)$(OMD_ROOT)/lib/python$(PYTHON_MAJOR_DOT_MINOR)/site-packages
PACKAGE_PYTHON3_MODULES_PYTHONPATH = $(DESTDIR)$(OMD_ROOT)/lib/python$(PYTHON_MAJOR_DOT_MINOR)/site-packages
# May be used during omd package build time. Call sites have to use the target
# dependency "$(PACKAGE_PYTHON3_MODULES_PYTHON_DEPS)" to have everything needed in place.
PACKAGE_PYTHON3_MODULES_PYTHON := \
PACKAGE_PYTHON3_MODULES_PYTHON = \
PYTHONPATH="$$PYTHONPATH:$(PACKAGE_PYTHON3_MODULES_PYTHONPATH):$(PACKAGE_PYTHON_PYTHONPATH)" \
LDFLAGS="$$LDFLAGS $(PACKAGE_PYTHON_LDFLAGS)" \
LD_LIBRARY_PATH="$$LD_LIBRARY_PATH:$(PACKAGE_PYTHON_LD_LIBRARY_PATH)" \
Expand Down

0 comments on commit 62c895f

Please sign in to comment.