Skip to content

Commit 7a50204

Browse files
authored
Fix Ikva's model_data.cc creation (#324)
* Now only create Ikva's model_data.cc if it doesn't exist yet * Also only create LCE-benchmark's model_data.cc if it doesn't exist yet
1 parent c4eb8d1 commit 7a50204

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

larq_compute_engine/ikva/runtime/Makefile.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ $(eval $(call microlite_test,ikva_runtime,\
3636
$(IKVA_CORE_SRCS) $(IKVA_RUNTIME_SRCS), $(IKVA_CORE_HDRS) $(IKVA_RUNTIME_HDRS)))
3737

3838
$(LCE_DIR)/ikva/runtime/model_data.cc: $(LCE_DIR)/ikva/runtime/model_data_example.cc
39-
cp $< $@
39+
if [ ! -f $@ ]; then cp $< $@; fi

larq_compute_engine/micro/build_make/lce_sources.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ $(LCE_RELATIVE_DIR)/larq_compute_engine/core/profiler.cc: $(LCE_RELATIVE_DIR)/la
118118

119119
# Required for lce_benchmark
120120
$(LCE_RELATIVE_DIR)/larq_compute_engine/micro/examples/lce_benchmark/model_data.cc: $(LCE_RELATIVE_DIR)/larq_compute_engine/micro/examples/lce_benchmark/model_data_example.cc
121-
cp $< $@
121+
if [ ! -f $@ ]; then cp $< $@; fi
122122

123123
$(LCE_RELATIVE_DIR)/larq_compute_engine/ikva/runtime/model_data.cc: $(LCE_RELATIVE_DIR)/larq_compute_engine/ikva/runtime/model_data_example.cc
124-
cp $< $@
124+
if [ ! -f $@ ]; then cp $< $@; fi
125125

126126
include $(LCE_TF_GEN_DIR)/Makefile.mk

larq_compute_engine/micro/examples/lce_benchmark/Makefile.inc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ include $(wildcard $(LCE_DIR)/micro/examples/lce_benchmark/*/Makefile.inc)
1717
$(eval $(call microlite_test,lce_benchmark,$(LCE_BENCHMARK_SRCS),$(LCE_BENCHMARK_HDRS)))
1818

1919
$(LCE_DIR)/micro/examples/lce_benchmark/model_data.cc: $(LCE_DIR)/micro/examples/lce_benchmark/model_data_example.cc
20-
cp $< $@
21-
20+
if [ ! -f $@ ]; then cp $< $@; fi

0 commit comments

Comments
 (0)