Tell the user more explicitly what port needs to be installed to get the
[dragonfly.git] / contrib / bsdtar / Makefile
1 # $FreeBSD: src/usr.bin/tar/Makefile,v 1.12 2004/11/05 05:39:37 kientzle Exp $
2
3 #
4 # Use "make distfile" to build a tar.gz file suitable for distribution,
5 # including an autoconf/automake-generated build system.
6 #
7
8 PROG=   bsdtar
9 VERSION=        1.01.015
10 SRCS=   bsdtar.c matching.c read.c util.c write.c
11 WARNS?= 6
12 DPADD=  ${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
13 LDADD=  -larchive -lbz2 -lz
14 CFLAGS+=        -DPACKAGE_VERSION=\"${VERSION}\"
15
16 .if !defined(WITH_GTAR)
17 SYMLINKS=       ${BINDIR}/bsdtar ${BINDIR}/tar
18 MLINKS= bsdtar.1 tar.1
19 .endif
20
21 DIST_BUILD_DIR= ${.OBJDIR}/${PROG}-${VERSION}
22 CLEANDIRS+=     ${DIST_BUILD_DIR}
23 DISTFILE=       ${PROG}-${VERSION}.tar.gz
24 # Files that just get copied to the distfile build directory
25 DIST_FILES=     ${SRCS}
26 DIST_FILES+=    ${MAN}
27 DIST_FILES+=    bsdtar.h bsdtar_platform.h
28 DIST_FILES+=    Makefile.am
29 DIST_FILES+=    fts.c fts.h
30
31 distfile:
32         rm -rf ${DIST_BUILD_DIR}
33         mkdir ${DIST_BUILD_DIR}
34         for f in ${DIST_FILES};                                 \
35         do                                                      \
36                 cat ${.CURDIR}/$$f >${DIST_BUILD_DIR}/$$f;      \
37         done
38         cat ${.CURDIR}/configure.ac.in |                        \
39                 sed 's/@VERSION@/${VERSION}/' |                 \
40                 cat > ${DIST_BUILD_DIR}/configure.ac
41         (cd ${DIST_BUILD_DIR} && aclocal && autoheader && autoconf )
42         (cd ${DIST_BUILD_DIR} && automake -a --foreign)
43         (cd ${DIST_BUILD_DIR} && ./configure && make distcheck && make dist)
44         mv ${DIST_BUILD_DIR}/${DISTFILE} ${.OBJDIR}
45         @echo ==================================================
46         @echo Created ${.OBJDIR}/${DISTFILE}
47         @echo ==================================================
48
49 .include <bsd.prog.mk>