On 2006-3-22 14:25 UTC, PATTON, BILLY (SBCSI) wrote:
> Can I have a variable and a target be the same name
> 
> clean+ldw+ldwrbc+library :=  ${PRD_TREE}/ldw/ldwrbc/lib/libldwrbc.a
> 
> clean+ldw+ldwrbc+library :
> <tab>$(RM) $(clean+ldw+ldwrbc+library)

Well, the first makefile below does work the way I think you expect
with 3.79.1 and make-3.81beta4. But don't you find it confusing?

foo := bar

.PHONY: foo
foo:
        @echo $(foo)

  [output]
Making target foo
bar

Instead, why not write the following?

foo := bar

.PHONY: $(foo)
$(foo):
        @echo Making target $@
        @echo $(foo)

  [output]
Making target bar
bar


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to