Skip to content

Commit

Permalink
Fixed configure.sh and Makefile
Browse files Browse the repository at this point in the history
Two things:

* Previous commit had an sh syntax error (when I added "support" for
  OpenBSD)

* OpenBSD's make doesn't have .sinclude

Both of these are fixed in this commit.
  • Loading branch information
nimblemachines committed Oct 7, 2016
1 parent 79d2e04 commit 5bf42b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

# Read in local settings, such as C compiler settings, or optional inclusions
# (eg, WITH_LFSR)
.sinclude "local.mk"
# .sinclude fails on OpenBSD!
.include "local.mk"

CFLAGS= -O2 -Wall -fomit-frame-pointer ${ARCH_C} ${DEBUG}
LDFLAGS= ${ARCH_LD}
Expand Down Expand Up @@ -42,11 +43,6 @@ DEPFILES= $(makefiles) muforth.h env.h public.h

all : muforth

# Since everyting depends on local.mk, let's make one if it doesn't exist
# already.
local.mk :
touch ${.TARGET}

${ALLOBJS} : ${DEPFILES}

# Only make a new public.h - upon which _all_ .o files depend, and so will
Expand Down
7 changes: 6 additions & 1 deletion src/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ EOF
fi
fi

if [ "$os" = "FreeBSD" -o "$os" = "NetBSD" -o "$os" = "OpenBSD"]; then
if [ "$os" = "FreeBSD" -o "$os" = "NetBSD" -o "$os" = "OpenBSD" ]; then
archobjs="file.o main.o time.o tty.o select.o pty.o usb-netbsd.o usb-freebsd.o"
if [ "$cpu" = "amd64" ]; then
Wnarrowing=""
Expand Down Expand Up @@ -208,6 +208,11 @@ sed ${sedext} \
../scripts/do_sed.sh.in > ../scripts/do_sed.sh
chmod 755 ../scripts/do_sed.sh

# Touch local.mk, which we'll need regardless of which kind of Make the
# user has. Also, this allows us to use .include rather than .sinclude,
# which doesn't exist in OpenBSD.
touch local.mk

# Figure out which version of make we're using (most likely GNU or BSD) and
# set up an appropriate Makefile.

Expand Down

0 comments on commit 5bf42b3

Please sign in to comment.