git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Jeff King <peff@peff.net>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH 03/13] Makefile: introduce make-var helper function
Date: Thu, 6 Feb 2014 03:55:23 -0500	[thread overview]
Message-ID: <CAPig+cTPUHJ6wDPWL_v=_7Zq6O=r2g2Hz02TQHZO+0gq60Fbnw@mail.gmail.com> (raw)
In-Reply-To: <20140205175002.GC15218@sigill.intra.peff.net>

On Wed, Feb 5, 2014 at 12:50 PM, Jeff King <peff@peff.net> wrote:
> It's a common pattern in our Makefile to echo some make
> variables into a file, but only if they are different from a
> previous run. This sentinel file can then be used as a
> dependency to trigger rebuilds when the make variable
> changes.
>
> The code to do this is a bit ugly and repetetive; let's

s/repetetive/repetitive/

> factor it out into a reusable function.
>
> Note that this relies on the "call" and "eval" functions of
> GNU make. We previously avoided using "call", as explained
> in 39c015c (Fixes for ancient versions of GNU make,
> 2006-02-18). However, it has been 8 years since then, so
> perhaps its use is acceptable now.
>
> The "call" function dates back to GNU make 3.77.90
> (1997-07-21). The "eval" function dates back to 3.80
> (2002-07-08).
>
> If it's still a problem to use these functions, we can
> do similar meta-programming with something like:
>
>         include magic.mak
>         magic.mak:
>                 ./generate-magic-rules >$@+
>                 mv $@+ $@
>
> where the rules are generated by a shell (or other) script.
>
> Signed-off-by: Jeff King <peff@peff.net>

  reply	other threads:[~2014-02-06  8:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05 17:48 [PATCH/RFC 0/13] makefile refactoring Jeff King
2014-02-05 17:49 ` [PATCH 01/13] Makefile: drop USE_GETTEXT_SCHEME from GIT-CFLAGS Jeff King
2014-02-05 17:49 ` [PATCH 02/13] Makefile: fix git-instaweb dependency on gitweb Jeff King
2014-02-05 17:50 ` [PATCH 03/13] Makefile: introduce make-var helper function Jeff King
2014-02-06  8:55   ` Eric Sunshine [this message]
2014-02-05 17:50 ` [PATCH 04/13] Makefile: use tempfile/mv strategy for GIT-* Jeff King
2014-02-05 17:50 ` [PATCH 05/13] Makefile: prefer printf to echo " Jeff King
2014-02-05 17:52 ` [PATCH 06/13] Makefile: store GIT-* sentinel files in MAKE/ Jeff King
2014-02-05 19:05   ` Junio C Hamano
2014-02-05 17:53 ` [PATCH 07/13] Makefile: always create files via make-var Jeff King
2014-02-05 17:57 ` [PATCH 08/13] Makefile: introduce sq function for shell-quoting Jeff King
2014-02-05 19:12   ` Junio C Hamano
2014-02-05 17:58 ` [PATCH 09/13] Makefile: add c-quote helper function Jeff King
2014-02-05 19:13   ` Junio C Hamano
2014-02-05 19:17     ` Jeff King
2014-02-05 17:58 ` [PATCH 10/13] Makefile: drop *_SQ variables Jeff King
2014-02-05 19:14   ` Junio C Hamano
2014-02-05 18:02 ` [PATCH 11/13] Makefile: auto-build C strings from make variables Jeff King
2014-02-05 19:17   ` Junio C Hamano
2014-02-05 19:20     ` Jeff King
2014-02-05 18:05 ` [PATCH 12/13] Makefile: teach scripts to include " Jeff King
2014-02-05 19:26   ` Junio C Hamano
2014-02-05 19:50     ` Jeff King
2014-02-08 21:47   ` Thomas Rast
2014-02-10  1:15     ` Jeff King
2014-02-05 18:08 ` [PATCH 13/13] move LESS/LV pager environment to Makefile Jeff King
2014-02-05 19:23   ` Jeff King
2014-02-05 19:52     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPig+cTPUHJ6wDPWL_v=_7Zq6O=r2g2Hz02TQHZO+0gq60Fbnw@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).