Andrzej Bialecki wrote:
> On Sun, 30 Jan 2000, John Polstra wrote:
> 
> > > > It's source-dir is called "xinstall" btw.
> > > Why is the source called "xinstall"?
> > 
> > To avoid colliding with the standard make target "install".  If we
> > had utilities named "all", "depend", and "clean" we'd have to do the
> > same thing for them.
> 
> Mhmmm... Isn't this something that .PHONY target is supposed to handle?

No.  Consider:

PROG=   install

all:  ${PROG}

${PROG}:        ${OBJS}
        cc -o ${PROG} ${OBJS}

install:
        ${INSTALL} .... ${PROG} ${BINDIR}
....

and with ${PROG} expanded out:

all:  install

install:        ${OBJS}
        cc -o install ${OBJS}

install:
        ${INSTALL} .... install ${BINDIR}
....

Spot the problem..  Does the target "install" mean "build the binary" or
"install the binary"?

src/usr.bin/xinstall could probably have been named src/usr.bin/install,
but PROG has to be xinstall regardless.  I guess they kept the two as
xinstall for consistancy and in case there were other gotcha's like this.

Cheers,
-Peter



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to