$OpenBSD: patch-Makefile,v 1.1.1.1 2010/12/01 09:06:53 jasper Exp $

Fix the install-crt target to create the target directory and don't
execute the ${INSTALL} with a trailing '/' for last crt file which
would make it a (non-existing) directory.

--- Makefile.orig	Mon Nov 29 23:41:41 2010
+++ Makefile	Mon Nov 29 23:50:09 2010
@@ -25,7 +25,7 @@ override AS = msp430-gcc -x assembler-with-cpp
 override AR = msp430-ar
 RM = rm
 MD = mkdir -p $@
-INSTALL = install -c -m644 $^/
+INSTALL = install -c -m644 $^
 
 COMMON := $(LIB_OPTIONS)
 # make sure we can find our header files (not the installed ones)
@@ -88,8 +88,9 @@ build-crt: makedir-crt $(CRT_OBJS)
 clean-crt:
 	${RM} -f $(CRT_OBJS)
 
-install-crt: $(CRT_OBJS) ${libdir}
-	${INSTALL}
+install-crt: $(CRT_OBJS)
+	mkdir -p ${libdir}
+	${INSTALL} ${libdir}
 
 makedir-crt:
 	mkdir -p $(BUILDDIR)
