On Tue, 28 Jan 2014, Mark Brown wrote:
> On Mon, Jan 27, 2014 at 11:05 PM, Mark Brown wrote:
> > > > From: Paul Smith
> > > > Sent: Monday, January 27, 2014 8:57 PM
> > ...
> > > > ifneq ($(filter else-if,$(.FEATURES)),else-if)
> > > >$(error Version $(MAKE_VERSION) does not support else-if)
On Mon, Jan 27, 2014 at 11:05 PM, Mark Brown
wrote:
From: Paul Smith
Sent: Monday, January 27, 2014 8:57 PM
...
ifneq ($(filter else-if,$(.FEATURES)),else-if)
$(error Version $(MAKE_VERSION) does not support else-if)
endif
Are you saying that this statement can be placed outside
of a mak
On Tue, Jan 28, 2014 at 1:20 PM, Paul Smith wrote:
> I'm not sure I'd go that far. $(shell ...) really _is_ useless in a
> recipe because make will invoke a shell to run the recipe anyway, so why
> have it invoke two shells? It's just redundant.
>
> However, $(file ...) can be useful in a recipe
On Tue, 2014-01-28 at 09:52 -0800, David Boyce wrote:
> I think the headline here is that $(file) is analogous to $(shell) in
> that it's intended specifically for use _outside_ of recipes. If you
> find yourself using either one in a recipe it's probably a sign you're
> on the wrong track.
I'm no
On Tue, Jan 28, 2014 at 7:31 AM, Gisle Vanem wrote:
> "Paul Smith" wrote:
>
>> Then make invokes the shell with the results of the expansion, which are
>> the rm and echo commands (and some empty strings which are ignored).
>>
>> So, the rm is running AFTER the file is created, and deleting it.
>
"Paul Smith" wrote:
Then make invokes the shell with the results of the expansion, which are
the rm and echo commands (and some empty strings which are ignored).
So, the rm is running AFTER the file is created, and deleting it.
Thanks. That makes sense when I think about it.
--gv
_
On Tue, 2014-01-28 at 15:50 +0100, Gisle Vanem wrote:
> I'm trying to understand if my use of the $(file..) function is correct or
> not. Based on tests/scripts/function/file, I cooked up this little file.mak:
It's not correct. Or rather, the use of $(file ...) is correct, but not
the surroundin
I'm trying to understand if my use of the $(file..) function is correct or
not. Based on tests/scripts/function/file, I cooked up this little file.mak:
all: file_test
cat file.out
.PHONY: file_test
file_test:
rm file.out
$(file > file.out, "Hello")
$(file >> file.out, "world")
@echo 'abspa