commit 1f92c4b1c70f3ff213662e7b30ef40b5a70acce4
parent fba484d254c0c2747f98e86fafc501358ff9916d
Author: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Date: Thu, 5 Sep 2024 15:44:36 +0200
Makefile: Build haredoc with $(HAREFLAGS)
I didn't notice this problem when I introduced the HARE_BUILD_ENV
variable to deduplicate the `hare build` logic, but it existed prior
to my change. Meanwhile harec2 went away and there wasn't much left
to deduplicate. HAREFLAGS is not part of the environment variables
recognized by the hare(1) command and is rather something that should
be accounted for in the build system. This was the case, but it was
done inadequately.
>From now on $(HAREFLAGS) should be passed as command line arguments to
be honored. The $(HARE_BUILD_ENV) variable can remain, it will be used
in the next commit. On the other hand, $(HARE_DEFINES) are not needed
by haredoc(1).
Refs 605a70a66aa6c34a0aee9929a54cfc9ed95575e8
Signed-off-by: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
@@ -45,14 +45,13 @@ $(BINOUT)/hare: $(OBJS)
@$(LD) $(LDLINKFLAGS) -T $(RTSCRIPT) -o $@ $(OBJS)
HARE_BUILD_ENV = HAREPATH=. HAREC="$(HAREC)" QBE="$(QBE)" AS="$(AS)" \
- LD="$(LD)" HAREFLAGS="$(HAREFLAGS)" HARECFLAGS="$(HARECFLAGS)" \
- QBEFLAGS="$(QBEFLAGS)" ASFLAGS="$(ASFLAGS)" LDLINKFLAGS="$(LDLINKFLAGS)"
+ LD="$(LD)" HARECFLAGS="$(HARECFLAGS)" QBEFLAGS="$(QBEFLAGS)" \
+ ASFLAGS="$(ASFLAGS)" LDLINKFLAGS="$(LDLINKFLAGS)"
$(BINOUT)/haredoc: $(BINOUT)/hare
@mkdir -p $(BINOUT)
@printf 'HARE\t%s\n' "$@"
- @env $(HARE_BUILD_ENV) \
- $(BINOUT)/hare build $(HARE_DEFINES) -o $(BINOUT)/haredoc ./cmd/haredoc
+ @env $(HARE_BUILD_ENV) $(BINOUT)/hare build $(HAREFLAGS) -o $@ ./cmd/haredoc
docs/html: $(BINOUT)/haredoc
mkdir -p docs/html