$OpenBSD$

Index: makefile
--- makefile.orig
+++ makefile
@@ -24,7 +24,7 @@ PICKY=-std=c99 -Wstrict-prototypes -pedantic -fno-stre
 
 YACC=yacc		# on Solaris: /usr/ccs/bin/yacc
 YFLAGS=-v -d 		# creates y.output and y.tab.h
-DESTDIR?=/usr/local/bin
+INSTDIR?=$(DESTDIR)/usr/local/bin
 INSTALL?=cp
 
 SPIN_OS= spinlex.o sym.o vars.o main.o msc_tcl.o \
@@ -39,7 +39,8 @@ spin:	$(SPIN_OS) $(TL_OS) spin.o
 	$(CC) $(CFLAGS) -o spin spin.o $(SPIN_OS) $(TL_OS)
 
 install: spin
-	$(INSTALL) spin $(DESTDIR)
+	mkdir -p $(INSTDIR)
+	$(INSTALL) spin $(INSTDIR)
 
 spin.o:	spin.y
 	$(YACC) $(YFLAGS) spin.y
