aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tar/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tar/Makefile')
-rw-r--r--usr.bin/tar/Makefile19
1 files changed, 13 insertions, 6 deletions
diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile
index 2ca6fd22c954..f026b1f36a08 100644
--- a/usr.bin/tar/Makefile
+++ b/usr.bin/tar/Makefile
@@ -1,8 +1,12 @@
# $FreeBSD$
.include <bsd.own.mk>
+LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive
+
PROG= bsdtar
BSDTAR_VERSION_STRING=2.8.5
+
+.PATH: ${LIBARCHIVEDIR}/tar
SRCS= bsdtar.c \
cmdline.c \
getdate.c \
@@ -12,7 +16,7 @@ SRCS= bsdtar.c \
util.c \
write.c
-.PATH: ${.CURDIR}/../../lib/libarchive/libarchive_fe
+.PATH: ${LIBARCHIVEDIR}/libarchive_fe
SRCS+= err.c \
line_reader.c \
matching.c \
@@ -30,15 +34,18 @@ LDADD+= -lmd
.endif
CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\"
-CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
-CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libarchive
-CFLAGS+= -I${.CURDIR}/../../lib/libarchive/libarchive_fe
+CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
+CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/libarchive
+CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe
SYMLINKS= bsdtar ${BINDIR}/tar
MLINKS= bsdtar.1 tar.1
DEBUG_FLAGS=-g
-.PHONY: check test
+.PHONY: check test clean-test
check test: $(PROG) bsdtar.1.gz
- cd ${.CURDIR}/test && make test
+ cd ${.CURDIR}/test && make obj && make test
+
+clean-test:
+ cd ${.CURDIR}/test && make clean
.include <bsd.prog.mk>