$OpenBSD: patch-common_mk,v 1.2 2011/11/15 00:05:16 jeremy Exp $

Build the ext stuff during the build phase so we don't have to
run 'make clean' as root.

--- common.mk.orig	Sun Nov 21 23:22:16 2010
+++ common.mk	Mon Nov 14 04:14:50 2011
@@ -79,7 +79,9 @@ PRE_LIBRUBY_UPDATE = $(MINIRUBY) -e 'ARGV[1] or File.u
 TESTSDIR      = $(srcdir)/test
 TESTWORKDIR   = testwork
 
-all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY)
+all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY) all-extmk
+
+all-extmk:
 	@$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" $(EXTMK_ARGS)
 prog: $(PROGRAM) $(WPROGRAM)
 
@@ -252,7 +254,7 @@ dont-install-man:
 post-no-install-man::
 	@$(NULLCMD)
 
-install-doc: rdoc pre-install-doc do-install-doc post-install-doc
+install-doc: pre-install-doc do-install-doc post-install-doc
 pre-install-doc:: install-prereq
 do-install-doc: $(PROGRAM)
 	$(MINIRUBY) $(srcdir)/instruby.rb --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc --rdoc-output="$(RDOCOUT)"
