[HEADS UP] ar(1) front-end committed. (notes for cross compile)
Ruslan Ermilov
ru at freebsd.org
Fri Feb 22 09:44:22 UTC 2008
On Fri, Feb 22, 2008 at 01:27:13AM -0800, David O'Brien wrote:
> On Fri, Feb 22, 2008 at 12:16:42PM +0300, Ruslan Ermilov wrote:
> > RCS file: /home/ncvs/src/usr.bin/Makefile,v
> ..
> > - ar \
> > + ${_ar} \
> ..
> > .if ${MK_TOOLCHAIN} != "no"
> > +_ar= ar
>
> Please commit now - I should have done it this way.
>
Done.
> > RCS file: /home/ncvs/src/usr.bin/ar/Makefile,v
> ..
> > -.if defined(WITH_BSDAR)
> > -PROG= ar
> > -.else
> > PROG= bsdar
> > -.endif
> > +LINKS= ${BINDIR}/bsdar ${BINDIR}/bsdranlib
> > +MLINKS= bsdar.1 bsdranlib.1
>
> LINKS and MLINKS don't belong here in a Makefile - they are better
> located where I have them.
>
The only difference is that I prefer the "product order",
while you seem to prefer the "build order". :-)
Our versions don't match any of the documented orders in
style.Makefile(5) because the conditional block is
misplaced. If I move the conditional block from after
the first set of links, the order will fully match "product
order". I also had a no-op ".else" clause in my patch --
the result of the conflict resolution with your changes.
Now it looks like this:
: # $FreeBSD: src/usr.bin/ar/Makefile,v 1.19 2008/02/22 06:53:52 obrien Exp $
:
: PROG= bsdar
: LINKS= ${BINDIR}/bsdar ${BINDIR}/bsdranlib
: MLINKS= bsdar.1 bsdranlib.1
:
: .if !defined(WITH_GNUAR)
: NO_SHARED?= yes
: LINKS+= ${BINDIR}/bsdar ${BINDIR}/ar
: MLINKS+= bsdar.1 ar.1
: LINKS+= ${BINDIR}/bsdranlib ${BINDIR}/ranlib
: MLINKS+= bsdranlib.1 ranlib.1
: .endif
:
: SRCS= ar.c read.c util.c write.c
:
: WARNS?= 5
:
: DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBELF}
: LDADD= -larchive -lbz2 -lz -lelf
:
: .include <bsd.prog.mk>
> > -NO_SHARED?= yes
>
> It looks like you're totally removing the NO_SHARED setting, or do you
> still have it set when BSD-ar is the default 'ar'?
>
I think you misread my patch. It's still built statically
when it's the default system ar(1), exactly as you programmed
it.
Cheers,
--
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
More information about the freebsd-current
mailing list