summaryrefslogtreecommitdiffstats
path: root/usr.bin/ar
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2008-02-22 06:47:45 +0000
committerobrien <obrien@FreeBSD.org>2008-02-22 06:47:45 +0000
commit5ac6dbd01a14db706efde547e2347ea5746af7e8 (patch)
tree7f5eb579bd8813024d04057461309a001a5f4a56 /usr.bin/ar
parenta232f0b6df3f888ed59128a63d221720998e3fca (diff)
downloadFreeBSD-src-5ac6dbd01a14db706efde547e2347ea5746af7e8.zip
FreeBSD-src-5ac6dbd01a14db706efde547e2347ea5746af7e8.tar.gz
Re-introduce the new BSDLed 'ar' to the build.
It is installed as "bsdar" unless WANT_BSDAR is defined. Discussed with: kaiw
Diffstat (limited to 'usr.bin/ar')
-rw-r--r--usr.bin/ar/Makefile18
-rw-r--r--usr.bin/ar/ar.h2
2 files changed, 18 insertions, 2 deletions
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 <bsd.prog.mk>
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.
*/
OpenPOWER on IntegriCloud