Makefile revision 143537
11592Srgrimes# $FreeBSD: head/usr.bin/tar/Makefile 143537 2005-03-13 19:55:53Z kientzle $ 21592Srgrimes 31592Srgrimes# 41592Srgrimes# Use "make distfile" to build a tar.gz file suitable for distribution, 51592Srgrimes# including an autoconf/automake-generated build system. 61592Srgrimes# 71592Srgrimes 81592SrgrimesPROG= bsdtar 91592SrgrimesVERSION= 1.01.022 101592SrgrimesSRCS= bsdtar.c getdate.y matching.c read.c util.c write.c 111592SrgrimesWARNS?= 6 121592SrgrimesDPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} 131592SrgrimesLDADD= -larchive -lbz2 -lz 141592SrgrimesCFLAGS+= -DPACKAGE_VERSION=\"${VERSION}\" 151592SrgrimesCFLAGS+= -I${.CURDIR} 161592Srgrimes 171592Srgrimes.if !defined(WITH_GTAR) 181592SrgrimesSYMLINKS= bsdtar ${BINDIR}/tar 191592SrgrimesMLINKS= bsdtar.1 tar.1 201592Srgrimes.endif 211592Srgrimes 221592SrgrimesDIST_BUILD_DIR= ${.OBJDIR}/${PROG}-${VERSION} 231592SrgrimesCLEANDIRS+= ${DIST_BUILD_DIR} 241592SrgrimesDISTFILE= ${PROG}-${VERSION}.tar.gz 251592Srgrimes# Files that just get copied to the distfile build directory 261592SrgrimesDIST_FILES= ${SRCS_ORIGINAL} 271592SrgrimesDIST_FILES+= ${MAN} 281592SrgrimesDIST_FILES+= bsdtar.h bsdtar_platform.h 291592SrgrimesDIST_FILES+= Makefile.am 301592SrgrimesDIST_FILES+= fts.c fts.h 311592Srgrimes 3218471Swoschdistfile: 3324191Simp rm -rf ${DIST_BUILD_DIR} 341592Srgrimes mkdir ${DIST_BUILD_DIR} 351592Srgrimes for f in ${DIST_FILES}; \ 361592Srgrimes do \ 371592Srgrimes cat ${.CURDIR}/$$f >${DIST_BUILD_DIR}/$$f; \ 381592Srgrimes done 391592Srgrimes cat ${.CURDIR}/configure.ac.in | \ 401592Srgrimes sed 's/@VERSION@/${VERSION}/' | \ 411592Srgrimes cat > ${DIST_BUILD_DIR}/configure.ac 421592Srgrimes (cd ${DIST_BUILD_DIR} && aclocal && autoheader && autoconf ) 431592Srgrimes (cd ${DIST_BUILD_DIR} && automake -a --foreign) 441592Srgrimes (cd ${DIST_BUILD_DIR} && ./configure && make distcheck && make dist) 451592Srgrimes mv ${DIST_BUILD_DIR}/${DISTFILE} ${.OBJDIR} 461592Srgrimes @echo ================================================== 471592Srgrimes @echo Created ${.OBJDIR}/${DISTFILE} 481592Srgrimes @echo ================================================== 491592Srgrimes 501592Srgrimes.include <bsd.prog.mk> 511592Srgrimes