From c18a82ec40d42f06278461f0fe436dc6f1a540c7 Mon Sep 17 00:00:00 2001 From: David Given Date: Sat, 18 May 2013 12:15:53 +0100 Subject: [PATCH] Apply build system fixes for OpenBSD contributed by George Koehler. --- README | 8 ++++++-- lang/cem/cemcom.ansi/LLmessage.c | 1 + lang/cem/cemcom.ansi/options.c | 1 + util/LLgen/build.mk | 4 ++-- util/ack/build.mk | 4 ++-- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README b/README index d6a56b050..3b0d877fa 100644 --- a/README +++ b/README @@ -45,6 +45,10 @@ Requirements: - an ANSI C compiler. This defaults to gcc. You can change this by setting the CC make variable. +- flex and yacc. + +- GNU make. + - about 40MB free in /tmp (or some other temporary directory). - about 6MB in the target directory. @@ -57,14 +61,14 @@ Instructions: - Run: - make + make # or gmake ...from the command line. This will do the build. The make system is fully parallelisable. If you have a multicore system, you probably want to do: - make -j8 + make -j8 # or gmake -j8 ...instead (substituting the right number of cores, of course). You can also shave a few seconds of the build time by using the -r flag. diff --git a/lang/cem/cemcom.ansi/LLmessage.c b/lang/cem/cemcom.ansi/LLmessage.c index 9010ce45d..c88c5eb24 100644 --- a/lang/cem/cemcom.ansi/LLmessage.c +++ b/lang/cem/cemcom.ansi/LLmessage.c @@ -6,6 +6,7 @@ /* PARSER ERROR ADMINISTRATION */ #include +#include "idf.h" #include "arith.h" #include "LLlex.h" #include "Lpars.h" diff --git a/lang/cem/cemcom.ansi/options.c b/lang/cem/cemcom.ansi/options.c index a8f382302..a23ff3405 100644 --- a/lang/cem/cemcom.ansi/options.c +++ b/lang/cem/cemcom.ansi/options.c @@ -11,6 +11,7 @@ #include #include "class.h" #include "macro.h" +#include "idf.h" #include "arith.h" #include "sizes.h" #include "align.h" diff --git a/util/LLgen/build.mk b/util/LLgen/build.mk index 3c40d1886..28da2d715 100644 --- a/util/LLgen/build.mk +++ b/util/LLgen/build.mk @@ -45,9 +45,9 @@ $(eval CLEANABLES += $o $1/Lpars.h) $o: $1/Lpars.h $1/Lpars.h: $2 $(LLGEN) @echo LLGEN $1/Lpars.c - @mkdir -p $(dir $o) + @mkdir -p $1 $(hide) $(RM) $o $1/Lpars.h - $(hide) cd $(dir $o) && $(LLGEN) $(abspath $2) + $(hide) cd $1 && $(LLGEN) $(abspath $2) $(foreach f,$o,$(call cfile,$f)) diff --git a/util/ack/build.mk b/util/ack/build.mk index 1b4fc146c..36e505c12 100644 --- a/util/ack/build.mk +++ b/util/ack/build.mk @@ -5,8 +5,8 @@ $(eval g := $(OBJDIR)/$D/dmach.c $(OBJDIR)/$D/intable.c) $(wordlist 2, $(words $g), $g): $(firstword $g) $(firstword $g): $(util-ack-mktables) @echo MKTABLES - @mkdir -p $(dir $g) - $(hide) cd $(dir $g) && $(util-ack-mktables) $(INSDIR)/share + @mkdir -p $(OBJDIR)/$D + $(hide) cd $(OBJDIR)/$D && $(util-ack-mktables) $(INSDIR)/share $(eval CLEANABLES += $g) endef