From 2ff66a915526b6509ca57f2046bc7b20b0de8a61 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Tue, 29 Dec 2020 13:38:47 -0800 Subject: [PATCH] bsdcat,cpio,tar: derive version string from archive.h Reviewed by: mm MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27823 --- usr.bin/bsdcat/Makefile | 3 ++- usr.bin/cpio/Makefile | 3 ++- usr.bin/tar/Makefile | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.bin/bsdcat/Makefile b/usr.bin/bsdcat/Makefile index 483875a01a57..2e625cf553e5 100644 --- a/usr.bin/bsdcat/Makefile +++ b/usr.bin/bsdcat/Makefile @@ -6,7 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcat -BSDCAT_VERSION_STRING= 3.5.1 +BSDCAT_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/cat SRCS= bsdcat.c cmdline.c diff --git a/usr.bin/cpio/Makefile b/usr.bin/cpio/Makefile index 6855e3e2d77e..f9f344429a91 100644 --- a/usr.bin/cpio/Makefile +++ b/usr.bin/cpio/Makefile @@ -6,7 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive _LIBARCHIVECONFDIR= ${SRCTOP}/lib/libarchive PROG= bsdcpio -BSDCPIO_VERSION_STRING= 3.5.1 +BSDCPIO_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/cpio SRCS= cpio.c cmdline.c diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile index d6154dc3b30d..c58671d59aa0 100644 --- a/usr.bin/tar/Makefile +++ b/usr.bin/tar/Makefile @@ -5,7 +5,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive PACKAGE= runtime PROG= bsdtar -BSDTAR_VERSION_STRING= 3.5.1 +BSDTAR_VERSION_STRING!= sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \ + ${_LIBARCHIVEDIR}/libarchive/archive.h .PATH: ${_LIBARCHIVEDIR}/tar SRCS= bsdtar.c \