[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: docs-common Makefile.common,1.53,1.54
- From: Tommy Reynolds <Tommy Reynolds MegaCoder com>
- To: fedora-docs-list redhat com
- Subject: Re: docs-common Makefile.common,1.53,1.54
- Date: Mon, 13 Feb 2006 12:46:06 -0600
Uttered "Paul W. Frields" (pfrields) <fedora-docs-commits redhat com>, spake thus:
> Log Message:
> Oops, remember Tommy's rule of good behavior in targets
>
> Index: Makefile.common
> ')' -prune -o -print | cpio -pamdv $(DOCBASE)-$(VERSION)
> - tar -zcvf $@ $(DOCBASE)-$(VERSION)/
> + tar -zcvf $(DOCBASE)-$(VERSION).src.tar.gz $(DOCBASE)-$(VERSION)/
Is that my rule?
Nothing wrong with the original line; I _like_ shorthands like "$@".
The problem is when $*, $@ and the like appear in a template; then
they must be written like this:
define FOO_template
target-${1}:: file.foo
cp $$< $$@
endef
$(foreach F,abc def,$(eval $(call FOO_template,${F})))
That is, you must escape the '$@' in the template because we don't
want it expanded as part of the template expansion, but later when
the target is evaluated.
Cheers
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]