--- otherlibs/systhreads/Makefile.orig	2013-07-23 16:48:47.000000000 +0200
+++ otherlibs/systhreads/Makefile	2014-04-01 07:26:11.000000000 +0200
@@ -71,8 +71,8 @@
 
 install:
 	if test -f dllthreads.so; then cp dllthreads.so $(STUBLIBDIR)/dllthreads.so; fi
+	$(RANLIB) libthreads.a
 	cp 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
 	rm -f $(LIBDIR)/threads/stdlib.cma
@@ -80,10 +80,10 @@
 	cp threads.h $(LIBDIR)/caml/threads.h
 
 installopt:
+	$(RANLIB) libthreadsnat.a
 	cp libthreadsnat.a $(LIBDIR)/libthreadsnat.a
-	cd $(LIBDIR); $(RANLIB) libthreadsnat.a
+	$(RANLIB) threads.a
 	cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(LIBDIR)/threads
-	cd $(LIBDIR)/threads; $(RANLIB) threads.a
 
 .SUFFIXES: .ml .mli .cmo .cmi .cmx
 
