Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D6068431FBC; Sat, 21 Nov 2009 19:49:00 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ei4+DNwYN0QX; Sat, 21 Nov 2009 19:49:00 -0800 (PST) Received: from cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DCC4F431FAE; Sat, 21 Nov 2009 19:48:59 -0800 (PST) From: Carl Worth To: Mikhail Gusarov , Chris Wilson In-Reply-To: <874oonpk5a.fsf@vertex.dottedmag> References: <87my2fpty1.fsf@vertex.dottedmag> <1258835540-21094-1-git-send-email-chris@chris-wilson.co.uk> <874oonpk5a.fsf@vertex.dottedmag> Date: Sun, 22 Nov 2009 04:48:48 +0100 Message-ID: <87fx872p9b.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] Makefile: Magic silent rules. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2009 03:49:01 -0000 On Sun, 22 Nov 2009 04:50:41 +0600, Mikhail Gusarov wrote: > Uhm. Now it eats much less :) > > $ make > ... > GZIP notmuch.1.gz > /bin/sh: --rsyncable: not found > make: *** [notmuch.1.gz] Error 127 > $ > > $ make V=1 > ... > rsyncable --stdout notmuch.1 > notmuch.1.gz > /bin/sh: rsyncable: not found > make: [notmuch.1.gz] Error 127 (ignored) The bug here was in using the GZIP variable assuming it would be a program name. But since gzip expects it to be additional arguments, we need to use a different name such as a "gzip" variable. Thanks for the original implementation, Chris. And thanks for the testing, Mikhail. I've pushed the original plus the below on top. -Carl commit 1266d8511e9adc7296ec4ddbf609dec824b4c94f Author: Carl Worth Date: Sun Nov 22 04:45:16 2009 +0100 Makefile: Fix to work even with GZIP environment variable set. The rule here was written to assume that if the GZIP environment variable was set that it would be the gzip binary to execute, (similar to the CC and CXX variables). But GZIP is actually used to pass arguments to gzip, so we have to use a different name. diff --git a/Makefile b/Makefile index 5d8f321..ae8bff1 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,9 @@ CFLAGS=-O2 # Additional programs that are used during the compilation process. EMACS ?= emacs -GZIP ?= gzip +# Lowercase to avoid clash with GZIP environment variable for passing +# arguments to gzip. +gzip = gzip # Additional flags that we will append to whatever the user set. # These aren't intended for the user to manipulate. diff --git a/Makefile.local b/Makefile.local index 5fd5d4f..b6d3db3 100644 --- a/Makefile.local +++ b/Makefile.local @@ -23,7 +23,7 @@ notmuch: $(notmuch_client_modules) lib/notmuch.a $(call quiet,CXX) $^ $(LDFLAGS) -o $@ notmuch.1.gz: notmuch.1 - $(call quiet,GZIP) --stdout $^ > $@ + $(call quiet,gzip) --stdout $^ > $@ install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \