Re: Behaviour of $(shell command args) is dangerously different from `command args`

2013-04-10 Thread Paul Smith
On Wed, 2013-04-10 at 19:56 +0200, Vincent de Phily wrote: > On Wednesday 10 April 2013 13:28:38 Paul Smith wrote: > > On Wed, 2013-04-10 at 18:18 +0200, Vincent de Phily wrote: > > > If the behaviour is expected (why ?), it would be usefull to explain the > > > difference between `command` and $(s

Re: Behaviour of $(shell command args) is dangerously different from `command args`

2013-04-10 Thread Vincent de Phily
On Wednesday 10 April 2013 13:28:38 Paul Smith wrote: > On Wed, 2013-04-10 at 18:18 +0200, Vincent de Phily wrote: > > If the behaviour is expected (why ?), it would be usefull to explain the > > difference between `command` and $(shell command) in the info pages. > > There is no difference betwee

Re: Behaviour of $(shell command args) is dangerously different from `command args`

2013-04-10 Thread Paul Smith
On Wed, 2013-04-10 at 18:18 +0200, Vincent de Phily wrote: > > SHELL := /bin/bash > > date := $(shell date -R) > > prevtag := $(shell git describe --tags|cut -d- -f1) This is not good: what if your tag contains a "-" in it? I think you want: $(shell git describe --tags --abbrev=0) > > release:

Behaviour of $(shell command args) is dangerously different from `command args`

2013-04-10 Thread Vincent de Phily
Hi list, here's a Makefile distilled from an existing project (see attached file for a non-wordwraped version): > SHELL := /bin/bash > date := $(shell date -R) > prevtag := $(shell git describe --tags|cut -d- -f1) > release: > # sed -i "1s#^#$(VERSION) ($(date))\n$(shell git log HEAD...$(p