$NetBSD: patch-otherlibs_systhreads_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $

Use BSD_INSTALL_* instead of mkdir and cp
--- otherlibs/systhreads/Makefile.orig	2012-06-08 11:35:37.000000000 +0000
+++ otherlibs/systhreads/Makefile
@@ -70,19 +70,19 @@ clean: partialclean
 	rm -f *.o *.a *.so
 
 install:
-	if test -f dllthreads.so; then cp dllthreads.so $(STUBLIBDIR)/dllthreads.so; fi
-	cp libthreads.a $(LIBDIR)/libthreads.a
+	if test -f dllthreads.so; then $(BSD_INSTALL_DATA) dllthreads.so $(STUBLIBDIR)/dllthreads.so; fi
+	$(BSD_INSTALL_DATA) libthreads.a $(LIBDIR)/libthreads.a
 	cd $(LIBDIR); $(RANLIB) libthreads.a
-	if test -d $(LIBDIR)/threads; then :; else mkdir $(LIBDIR)/threads; fi
-	cp $(THREAD_OBJS:.cmo=.cmi) threads.cma $(LIBDIR)/threads
+	if test -d $(LIBDIR)/threads; then :; else $(BSD_INSTALL_DATA_DIR) $(LIBDIR)/threads; fi
+	$(BSD_INSTALL_DATA) $(THREAD_OBJS:.cmo=.cmi) threads.cma $(LIBDIR)/threads
 	rm -f $(LIBDIR)/threads/stdlib.cma
-	cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)
-	cp threads.h $(LIBDIR)/caml/threads.h
+	$(BSD_INSTALL_DATA) thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)
+	$(BSD_INSTALL_DATA) threads.h $(LIBDIR)/caml/threads.h
 
 installopt:
-	cp libthreadsnat.a $(LIBDIR)/libthreadsnat.a
+	$(BSD_INSTALL_DATA) libthreadsnat.a $(LIBDIR)/libthreadsnat.a
 	cd $(LIBDIR); $(RANLIB) libthreadsnat.a
-	cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(LIBDIR)/threads
+	$(BSD_INSTALL_DATA) $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(LIBDIR)/threads
 	cd $(LIBDIR)/threads; $(RANLIB) threads.a
 
 .SUFFIXES: .ml .mli .cmo .cmi .cmx
