rp2/micropy_rules.cmake: Fix makemoduledefs vpath to work with abs path.
In particular the firmware can now be built in a build directory that lives outside the source tree, and the py/modarray.c file will still be found. See issue #6837. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
c891190c69
commit
1f800cac3c
@ -24,11 +24,10 @@ add_custom_command(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Generate moduledefs.h
|
# Generate moduledefs.h
|
||||||
# This is currently hard-coded to support modarray.c only, because makemoduledefs.py doesn't support absolute paths
|
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${MPY_MODULEDEFS}
|
OUTPUT ${MPY_MODULEDEFS}
|
||||||
COMMAND python3 ${MPY_PY_DIR}/makemoduledefs.py --vpath="." ../../../py/modarray.c > ${MPY_MODULEDEFS}
|
COMMAND python3 ${MPY_PY_DIR}/makemoduledefs.py --vpath="/" ${SOURCE_QSTR} > ${MPY_MODULEDEFS}
|
||||||
DEPENDS ${MPY_MPVERSION}
|
DEPENDS ${MPY_MPVERSION}
|
||||||
${SOURCE_QSTR}
|
${SOURCE_QSTR}
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user