From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 68CD21F9F3 for ; Fri, 1 Oct 2021 03:09:24 +0000 (UTC) From: Eric Wong To: unicorn-public@yhbt.net Subject: [PATCH 2/6] makefile: reduce unnecessary rebuilds Date: Fri, 1 Oct 2021 03:09:19 +0000 Message-Id: <20211001030923.26705-3-bofh@yhbt.net> In-Reply-To: <20211001030923.26705-1-bofh@yhbt.net> References: <20211001030923.26705-1-bofh@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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)