diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-01-05 19:02:28 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-01-05 19:02:28 -0800 |
commit | 7982070eecf514da2eaa0892537edc4bd2b17cfc (patch) | |
tree | 5348d94b72f7e43902e848a0c81abc33f06cc269 | |
parent | 05f23c3977d8b68b1946abfb01432e69f3a433a3 (diff) | |
download | txr-7982070eecf514da2eaa0892537edc4bd2b17cfc.tar.gz txr-7982070eecf514da2eaa0892537edc4bd2b17cfc.tar.bz2 txr-7982070eecf514da2eaa0892537edc4bd2b17cfc.zip |
build: wrong build order of STDLIB_EARLY_TLOS.
The STDLIB_EARLY_TLOS are not being built in the intended
order for several reasons. Firstly, the list is built by
filtering STDLIB_TLOS which are in an order pulled by the
wildcard command. Secondly, the order-only rule isn't
preserving the order among the early tlos, only ensuring
that those members of STDLIB_TLOS which occur in
STDLIB_EARLY_TLOS are built before the others.
* Makefile (STDLIB_EARLY_PATS): Variable removed.
(STDLIB_EARLY_TLOS): Specified directly rather than via
filtering.
(all): Don't depend on $(STDLIB_TLOS) but rather on
$(STDLIB_EARLY_TLOS) and $(STDLIB_LATE_TLOS) in that order.
($(STDLIB_LATE_TLOS):): Ordering rule removed.
-rw-r--r-- | Makefile | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -72,8 +72,7 @@ EXTRA_OBJS-$(add_win_res) += win/txr.res STDLIB_SRCS := $(wildcard stdlib/*.tl) STDLIB_TLOS := $(patsubst %.tl,%.tlo,$(STDLIB_SRCS)) -STDLIB_EARLY_PATS := %/optimize.tlo %/param.tlo %/compiler.tlo %/asm.tlo -STDLIB_EARLY_TLOS := $(filter $(STDLIB_EARLY_PATS),$(STDLIB_TLOS)) +STDLIB_EARLY_TLOS := $(addprefix stdlib/,optimize.tlo param.tlo compiler.tlo asm.tlo) STDLIB_LATE_TLOS := $(filter-out $(STDLIB_EARLY_TLOS),$(STDLIB_TLOS)) ifneq ($(have_git),) @@ -217,9 +216,7 @@ endif .PHONY: all -all: $(BUILD_TARGETS) $(STDLIB_TLOS) - -$(STDLIB_LATE_TLOS): | $(STDLIB_EARLY_TLOS) +all: $(BUILD_TARGETS) $(STDLIB_EARLY_TLOS) $(STDLIB_LATE_TLOS) $(PROG): $(OPT_OBJS) $(EXTRA_OBJS-y) $(call LINK_PROG,$(OPT_FLAGS)) |