Skip to content

Commit b57b94f

Browse files
committed
Merge pull request atomvm#2117 from pguyot/w08/fix-avm-staleness
Fix a bug where *.avm files would be stale with ninja These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 7d18a53 + 7041539 commit b57b94f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeModules/BuildErlang.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ macro(pack_runnable avm_name main)
288288

289289
add_custom_command(
290290
OUTPUT ${avm_name}.avm
291-
DEPENDS ${avm_name}_main ${pack_runnable_${avm_name}_archive_targets} PackBEAM
291+
DEPENDS ${avm_name}_main ${main}.beam ${pack_runnable_${avm_name}_archives} ${pack_runnable_${avm_name}_archive_targets} PackBEAM
292292
COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM ${INCLUDE_LINES} ${avm_name}.avm ${main}.beam ${pack_runnable_${avm_name}_archives}
293293
COMMENT "Packing runnable ${avm_name}.avm"
294294
VERBATIM
@@ -414,7 +414,7 @@ macro(pack_uf2 avm_name main)
414414

415415
add_custom_command(
416416
OUTPUT ${avm_name}.avm
417-
DEPENDS ${avm_name}_main ${pack_uf2_${avm_name}_archive_targets} PackBEAM
417+
DEPENDS ${avm_name}_main ${main}.beam ${pack_uf2_${avm_name}_archives} ${pack_uf2_${avm_name}_archive_targets} PackBEAM
418418
COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM ${avm_name}.avm ${main}.beam ${pack_uf2_${avm_name}_archives}
419419
COMMENT "Packing runnable ${avm_name}.avm"
420420
VERBATIM

0 commit comments

Comments
 (0)