From 5ac6dbd01a14db706efde547e2347ea5746af7e8 Mon Sep 17 00:00:00 2001 From: obrien Date: Fri, 22 Feb 2008 06:47:45 +0000 Subject: Re-introduce the new BSDLed 'ar' to the build. It is installed as "bsdar" unless WANT_BSDAR is defined. Discussed with: kaiw --- usr.bin/Makefile | 1 + usr.bin/ar/Makefile | 18 ++++++++++++++++-- usr.bin/ar/ar.h | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 39ea150..6a1f6d9 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -11,6 +11,7 @@ SUBDIR= alias \ apply \ + ar \ asa \ at \ ${_atm} \ diff --git a/usr.bin/ar/Makefile b/usr.bin/ar/Makefile index 57a56a5..4ecfe36 100644 --- a/usr.bin/ar/Makefile +++ b/usr.bin/ar/Makefile @@ -1,12 +1,26 @@ # $FreeBSD$ +.if defined(WITH_BSDAR) PROG= ar -VERSION= 1.0.2 +.else +PROG= bsdar +.endif SRCS= ar.c read.c util.c write.c + WARNS?= 5 + DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBELF} LDADD= -larchive -lbz2 -lz -lelf -CFLAGS+= -DBSDAR_VERSION=\"${VERSION}\" + +.if defined(WITH_BSDAR) LINKS= ${BINDIR}/ar ${BINDIR}/ranlib +MLINKS= ar ranlib +.else +LINKS= ${BINDIR}/bsdar ${BINDIR}/bsdranlib +MLINKS= bsdar.1 bsdranlib.1 + +bsdar.1: ar.1 + ln -sf ${.ALLSRC} ${.TARGET} +.endif .include diff --git a/usr.bin/ar/ar.h b/usr.bin/ar/ar.h index aaad1b9..478b8b9 100644 --- a/usr.bin/ar/ar.h +++ b/usr.bin/ar/ar.h @@ -26,6 +26,8 @@ * $FreeBSD$ */ +#define BSDAR_VERSION "1.0.2" + /* * ar(1) options. */ -- cgit v1.1