Make it easier to support more platforms.
Thanks to: Joerg Sonnenberger for pointing out the need and the technique.
This commit is contained in:
parent
da7bcba2e8
commit
f6df491097
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168649
@ -1,12 +1,13 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PROG= bsdtar
|
||||
VERSION= 2.0.25
|
||||
VERSION= 2.0.28
|
||||
SRCS= bsdtar.c getdate.y matching.c read.c tree.c util.c write.c
|
||||
WARNS?= 5
|
||||
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
|
||||
LDADD= -larchive -lbz2 -lz
|
||||
CFLAGS+= -DPACKAGE_VERSION=\"${VERSION}\"
|
||||
CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
|
||||
CFLAGS+= -I${.CURDIR}
|
||||
SYMLINKS= bsdtar ${BINDIR}/tar
|
||||
MLINKS= bsdtar.1 tar.1
|
||||
|
@ -34,17 +34,15 @@
|
||||
#ifndef BSDTAR_PLATFORM_H_INCLUDED
|
||||
#define BSDTAR_PLATFORM_H_INCLUDED
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#if defined(PLATFORM_CONFIG_H)
|
||||
/* Use hand-built config.h in environments that need it. */
|
||||
#include PLATFORM_CONFIG_H
|
||||
#elif defined(HAVE_CONFIG_H)
|
||||
/* Most POSIX platforms use the 'configure' script to build config.h */
|
||||
#include "../config.h"
|
||||
#else
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include "config_freebsd.h"
|
||||
#else /* !__FreeBSD__ */
|
||||
/* Warn if bsdtar hasn't been (automatically or manually) configured. */
|
||||
#error Oops: No config.h and no built-in configuration in bsdtar_platform.h.
|
||||
#endif /* !__FreeBSD__ */
|
||||
|
||||
#endif /* !HAVE_CONFIG_H */
|
||||
|
||||
/* No non-FreeBSD platform will have __FBSDID, so just define it here. */
|
||||
|
Loading…
Reference in New Issue
Block a user