don't re-link when not necessary

This commit is contained in:
dzaima 2022-09-01 18:11:24 +03:00
parent d32e373168
commit b386531b30

View File

@ -1,5 +1,5 @@
SHELL = /usr/bin/env bash
MAKEFLAGS+= --no-print-directory
MAKEFLAGS+= --no-print-directory --no-builtin-rules
# note: do not manually define any i_… arguments, or incremental compiling will not work properly!
# various configurations
@ -167,10 +167,15 @@ endif
${MAKE} run_incremental_1 bd="$$bd"
endif
run_incremental_1: builtins core base jit utils # build the final binary
@$(i_CC) ${CCFLAGS} -o ${OUTPUT} ${bd}/*.o $(ALL_LD_FLAGS)
run_incremental_1: ${bd}/BQN
ifneq (${bd}/BQN,${OUTPUT})
@cp -f ${bd}/BQN ${OUTPUT}
endif
@echo ${postmsg}
${bd}/BQN: builtins core base jit utils # build the final binary
@$(i_CC) ${CCFLAGS} -o ${bd}/BQN ${bd}/*.o $(ALL_LD_FLAGS)
CC_INC = $(i_CC) $(ALL_CC_FLAGS) -MMD -MP -MF
# build individual object files
core: ${addprefix ${bd}/, tyarr.o harr.o fillarr.o stuff.o derv.o mm.o heap.o}
@ -198,6 +203,8 @@ ${bd}/%.o: src/builtins/%.c
@echo $< | cut -c 5-
@$(CC_INC) $@.d -o $@ -c $<
.INTERMEDIATE: core base utils jit builtins
src/gen/customRuntime:
@echo "Copying precompiled bytecode from the bytecode branch"
git checkout remotes/origin/bytecode src/gen/{compiles,formatter,runtime0,runtime1,src,explain}