From 079a23e4f868e6615762efcc711cbf86d95876ef Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 6 Feb 2015 22:17:26 +0000 Subject: fix uninstalled testing and reduce require paths This fixes a bug introduced in commit fe83ead4eae6f011fa15f506cd80cb4256813a92 (GNUmakefile: fix clean gem build + reduce build cruft) which broke clean Ruby installations without an existing unicorn gem installed :x --- GNUmakefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 8bd63ee..2995a6b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -59,13 +59,17 @@ $(ext)/unicorn_http.$(DLEXT): $(ext)/Makefile $(MAKE) -C $(@D) http: $(ext)/unicorn_http.$(DLEXT) +# only used for tests +http-install: $(ext)/unicorn_http.$(DLEXT) + install -m644 $< lib/ + test-install: $(test_prefix)/.stamp $(test_prefix)/.stamp: $(inst_deps) mkdir -p $(test_prefix)/.ccache tar cf - $(inst_deps) GIT-VERSION-GEN | \ (cd $(test_prefix) && tar xf -) $(MAKE) -C $(test_prefix) clean - $(MAKE) -C $(test_prefix) http shebang RUBY="$(RUBY)" + $(MAKE) -C $(test_prefix) http-install shebang RUBY="$(RUBY)" > $@ # this is only intended to be run within $(test_prefix) @@ -119,14 +123,14 @@ run_test = $(quiet_pre) \ %.n: arg = $(subst .n,,$(subst --, -n ,$@)) %.n: t = $(subst .n,$(log_suffix),$@) %.n: export PATH := $(test_prefix)/bin:$(PATH) -%.n: export RUBYLIB := $(test_prefix):$(test_prefix)/lib:$(MYLIBS) +%.n: export RUBYLIB := $(test_prefix)/lib:$(MYLIBS) %.n: $(test_prefix)/.stamp $(run_test) $(T): arg = $@ $(T): t = $(subst .rb,$(log_suffix),$@) $(T): export PATH := $(test_prefix)/bin:$(PATH) -$(T): export RUBYLIB := $(test_prefix):$(test_prefix)/lib:$(MYLIBS) +$(T): export RUBYLIB := $(test_prefix)/lib:$(MYLIBS) $(T): $(test_prefix)/.stamp $(run_test) -- cgit v1.2.3-24-ge0c7