summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-02-05 01:10:30 +1100
committerDamien George <damien@micropython.org>2021-02-05 01:10:30 +1100
commit1f800cac3c4f56418486f24c3824418a890f759f (patch)
tree6ade9ad8291948a9d25b5b3f9c260d4c04441059
parentc891190c693ec04289f5773b2b27d125f8c6059f (diff)
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>
-rw-r--r--ports/rp2/micropy_rules.cmake3
1 files changed, 1 insertions, 2 deletions
diff --git a/ports/rp2/micropy_rules.cmake b/ports/rp2/micropy_rules.cmake
index ade9b8c92..9eee4ac14 100644
--- a/ports/rp2/micropy_rules.cmake
+++ b/ports/rp2/micropy_rules.cmake
@@ -24,11 +24,10 @@ add_custom_command(
)
# Generate moduledefs.h
-# This is currently hard-coded to support modarray.c only, because makemoduledefs.py doesn't support absolute paths
add_custom_command(
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}
${SOURCE_QSTR}
)