[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Seeking Makefile style suggestions
From: |
Paul Jarc |
Subject: |
Re: Seeking Makefile style suggestions |
Date: |
Thu, 02 Aug 2007 11:32:07 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Kirk Strauser <kirk@strauser.com> wrote:
> Is it idiomatic to do this by putting that in a target like so:
>
> svnprops:
> find $(CURDIR) -name '*.py' \
> -execdir svn ....
>
> or is there a more "native" way I could approach this?
That looks fine to me. If you like, you could also make this target a
dependency of the main build target ("all", usually).
> Also, I'd really like to refactor all those identical calls into a
> variable that contains something like "svn propset -q", but I'm not sure
> how to get Make to split such a string into the command and its arguments
> instead of a command named exactly that.
Make never does the splitting; the shell does. Make also doesn't do
quote removal; the shell does. So...
> For example, this snippet:
>
> foo: TESTVAR = "echo this is a test"
> foo:
> $(TESTVAR)
>
> tries to run a command called "echo this is a test":
Use this instead:
foo: TESTVAR = echo this is a test
paul