Browse Source

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>
pull/6845/head
Damien George 4 years ago
parent
commit
1f800cac3c
  1. 3
      ports/rp2/micropy_rules.cmake

3
ports/rp2/micropy_rules.cmake

@ -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…
Cancel
Save