From b32113665e9acb6111403afdc59a6a6b1cd8f9d1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 1 Oct 2021 03:09:19 +0000 Subject: makefile: reduce unnecessary rebuilds For the most part, header changes shouldn't trigger extconf.rb reruns. --- GNUmakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index dd0a761..0e08ef0 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -42,13 +42,13 @@ ext_h := $(wildcard $(ext)/*/*.h $(ext)/*.h) ext_src := $(sort $(wildcard $(ext)/*.c) $(ext_h) $(ext)/unicorn_http.c) ext_pfx_src := $(addprefix $(ext_pfx)/,$(ext_src)) ext_dir := $(ext_pfx)/$(ext) -$(ext)/extconf.rb: $(wildcard $(ext)/*.h) +$(ext)/extconf.rb: @>>$@ $(ext_dir) $(tmp_bin) man/man1 doc/man1 pkg t/trash: @mkdir -p $@ $(ext_pfx)/$(ext)/%: $(ext)/% | $(ext_dir) $(INSTALL) -m 644 $< $@ -$(ext_pfx)/$(ext)/Makefile: $(ext)/extconf.rb $(ext_h) | $(ext_dir) +$(ext_pfx)/$(ext)/Makefile: $(ext)/extconf.rb | $(ext_dir) $(RM) -f $(@D)/*.o cd $(@D) && $(RUBY) $(CURDIR)/$(ext)/extconf.rb $(EXTCONF_ARGS) ext_sfx := _ext.$(DLEXT) -- cgit v1.2.3-24-ge0c7