]> xenbits.xensource.com Git - unikraft/libs/python3.git/commitdiff
Makefile.uk: Fix generated header include path
authorAndrei Tatar <andrei@unikraft.io>
Tue, 29 Aug 2023 00:10:01 +0000 (02:10 +0200)
committerRazvan Deaconescu <razvan.deaconescu@upb.ro>
Sun, 1 Oct 2023 04:50:47 +0000 (07:50 +0300)
Previously LIBPYTHON3_SRC was in the include path, leading to a wrong
pyconfig.h, if present, to be pulled into the Python build. Such a file
could remain after being generated by a rootfs build.
This change both removes LIBPYTHON3_SRC from the include path, as it
provides no needed headers, as well as ensures that the rootfs build
does not leave a pyconfig.h file in the origin directory.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #19

Makefile.uk

index ba960630c94ba1e8582c5db659c8ac70b5c49a74..d62aa384671d5e3ab1550e3092ea36a8eb3b948a 100644 (file)
@@ -71,7 +71,6 @@ LIBPYTHON3_SRC = $(LIBPYTHON3_ORIGIN)/$(LIBPYTHON3_BASENAME)
 LIBPYTHON3_GLOBAL_INCLUDES-y += -I$(LIBPYTHON3_BASE)/include
 LIBPYTHON3_GLOBAL_INCLUDES-y += -I$(LIBPYTHON3_SRC)/Include
 
-LIBPYTHON3_COMMON_INCLUDES-y += -I$(LIBPYTHON3_SRC)
 LIBPYTHON3_COMMON_INCLUDES-y += -I$(LIBPYTHON3_SRC)/Include/internal
 
 CINCLUDES-$(CONFIG_LIBPYTHON3) += $(LIBPYTHON3_GLOBAL_INCLUDES-y)
@@ -504,8 +503,9 @@ $(PYTHON_ROOTFS)/.keep: $(LIBPYTHON3_BUILD)/.origin
 
 # Configure origin
 $(PYTHON_ROOTFS)/.configured: $(PYTHON_ROOTFS)/.keep
-       mkdir -p $(PYTHON_ROOTFS) &>/dev/null
-       cd $(LIBPYTHON3_SRC) && ./configure --prefix=$(shell realpath $(APP_BASE)/$(path)) && touch $@
+       cd $(LIBPYTHON3_SRC) && ./configure --prefix=$(shell realpath $(APP_BASE)/$(path))
+       rm -f $(LIBPYTHON3_SRC)/pyconfig.h
+       touch $@
 
 # Install Python standard library into virtual environment
 $(PYTHON_ROOTFS)/.done: $(PYTHON_ROOTFS)/.configured