diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-04-26 06:26:15 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-04-26 06:26:15 -0700 |
commit | 1cc9c700b06b243d8037791aab3bf0b7e2dfe687 (patch) | |
tree | 8349d67795c6d504f79e3d171c88a37cb7435d75 /Makefile | |
parent | c23fd46d841d8d452c02ae4fc796042f2fb86424 (diff) | |
download | txr-1cc9c700b06b243d8037791aab3bf0b7e2dfe687.tar.gz txr-1cc9c700b06b243d8037791aab3bf0b7e2dfe687.tar.bz2 txr-1cc9c700b06b243d8037791aab3bf0b7e2dfe687.zip |
build: fix failure due to .tlo compilation order.
On newer GNU Make versions, $(wildcard ...) doesn't sort
its results, and so we compile .tlo files in an
arbitrary order. For the most part, this is fine.
However, there is a complicated circular dependency involving
the error.tl file requiring it to be compiled first.
* Makefile (STLIB_EARLY_PATS, STDLIB_EARLY_TLOS,
STDLIB_LATE_TLOS): New variables. Use these
to express a dependency which causes error.tlo
to be built first.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -67,6 +67,10 @@ STDLIB_SRCS := $(wildcard share/txr/stdlib/*.tl) STDLIB_TLOS := $(patsubst %.tl,%.tlo,$(STDLIB_SRCS)) STDLIB_TLOS2 := $(patsubst %.tl,%.tlo2,$(STDLIB_SRCS)) +STDLIB_EARLY_PATS := %/error.tlo # these must be compiled first +STDLIB_EARLY_TLOS := $(filter $(STDLIB_EARLY_PATS),$(STDLIB_TLOS)) +STDLIB_LATE_TLOS := $(filter-out $(STDLIB_EARLY_TLOS),$(STDLIB_TLOS)) + ifneq ($(have_git),) SRCS := $(addprefix $(top_srcdir),\ $(filter-out lex.yy.c y.tab.c y.tab.h,\ @@ -219,6 +223,8 @@ endif all: $(BUILD_TARGETS) stage1 stage2 +$(STDLIB_LATE_TLOS): $(STDLIB_EARLY_TLOS) + stage1: $(STDLIB_TLOS) stage2: $(STDLIB_TLOS2) |