List Info

Thread: make target conflict




make target conflict
country flaguser name
United States
2007-02-05 13:36:16
A sample makefile (Unix):

all: T aa/../T
T:
        echo $
aa/../T:
        echo $

Should make complain about the duplicate targets?
James

_______________________________________________
help-gnu-utils mailing list
help-gnu-utilsgnu.org

http://lists.gnu.org/mailman/listinfo/help-gnu-utils

Re: make target conflict
user name
2007-02-05 13:43:42
* James wrote on Mon, Feb 05, 2007 at 08:36:16PM CET:
> 
> all: T aa/../T
> T:
>         echo $
> aa/../T:
>         echo $
> 
> Should make complain about the duplicate targets?

Hmm.  Are you sure they are duplicate?  Even if make
executes the
following in parallel?  Conversely: how should make ever be
able
to know for certain?

all: T symlink aa/../T
T:
	echo $
aa/../T:
	echo $
symlink:
	-rmdir aa
	mkdir sub sub/sub
	ln -s sub/sub aa

Cheers,
Ralf


_______________________________________________
help-gnu-utils mailing list
help-gnu-utilsgnu.org

http://lists.gnu.org/mailman/listinfo/help-gnu-utils

Re: make target conflict
country flaguser name
United States
2007-02-05 17:19:35
On Feb 5, 11:43 am, Ralf Wildenhues <Ralf.Wildenh...gmx.de> wrote:
> * James wrote on Mon, Feb 05, 2007 at 08:36:16PM CET:
>
>
>
> > all: T aa/../T
> > T:
> >         echo $
> > aa/../T:
> >         echo $
>
> > Should make complain about the duplicate targets?
>
> Hmm.  Are you sure they are duplicate?  Even if make
executes the
> following in parallel?  Conversely: how should make
ever be able
> to know for certain?
>
> all: T symlink aa/../T
> T:
>         echo $
> aa/../T:
>         echo $
> symlink:
>         -rmdir aa
>         mkdir sub sub/sub
>         ln -s sub/sub aa
>
> Cheers,
> Ralf

Re-phrasing the question:
Does "make" interpret what the target points to,
or just consider it
as a string?
Seems like as long as the strings are different, they are
considered
different.

The same can be said about relative path and absolute path.
aa/file:
$(CURDIR)/aa/file:
These 2 are considered as different targets.

Is there a "make" option to force make to consider
these as the same
targets?
James

_______________________________________________
help-gnu-utils mailing list
help-gnu-utilsgnu.org

http://lists.gnu.org/mailman/listinfo/help-gnu-utils

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )