Commit 0d93392f authored by Trent Piepho's avatar Trent Piepho Committed by Damien George

py/mkrules.mk: List hash files as byproducts.

These are produced by the "cat" command to makeqstrdefs.py, to allow it to
not update unchanged files.  cmake doesn't know about them and so they are
not removed on a "clean".

This triggered a bug in makeqstrdefs.py where it would not recreate a
deleted output file (which is removed by clean) if a stale hash file with a
valid hash still existed.

Listing them as byproducts will cause them to be deleted on clean.
Signed-off-by: default avatarTrent Piepho <tpiepho@gmail.com>
parent 85c02166
......@@ -99,6 +99,7 @@ add_custom_command(
add_custom_command(
OUTPUT ${MICROPY_QSTRDEFS_COLLECTED}
COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdefs.py cat qstr _ ${MICROPY_GENHDR_DIR}/qstr ${MICROPY_QSTRDEFS_COLLECTED}
BYPRODUCTS "${MICROPY_QSTRDEFS_COLLECTED}.hash"
DEPENDS ${MICROPY_QSTRDEFS_SPLIT}
VERBATIM
COMMAND_EXPAND_LISTS
......@@ -136,6 +137,7 @@ add_custom_command(
add_custom_command(
OUTPUT ${MICROPY_MODULEDEFS_COLLECTED}
COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdefs.py cat module _ ${MICROPY_GENHDR_DIR}/module ${MICROPY_MODULEDEFS_COLLECTED}
BYPRODUCTS "${MICROPY_MODULEDEFS_COLLECTED}.hash"
DEPENDS ${MICROPY_MODULEDEFS_SPLIT}
VERBATIM
COMMAND_EXPAND_LISTS
......@@ -161,6 +163,7 @@ add_custom_command(
add_custom_command(
OUTPUT ${MICROPY_ROOT_POINTERS_COLLECTED}
COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdefs.py cat root_pointer _ ${MICROPY_GENHDR_DIR}/root_pointer ${MICROPY_ROOT_POINTERS_COLLECTED}
BYPRODUCTS "${MICROPY_ROOT_POINTERS_COLLECTED}.hash"
DEPENDS ${MICROPY_ROOT_POINTERS_SPLIT}
VERBATIM
COMMAND_EXPAND_LISTS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment