summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2007-04-12 04:45:32 +0000
committerkientzle <kientzle@FreeBSD.org>2007-04-12 04:45:32 +0000
commitdd496676aa007d9e34b633ada826e27ebec897c8 (patch)
tree4745f356426ad60f4d11a03df0561685850185da /usr.bin/tar
parent7d72f414792a760bf03f1890056c7f96a1bc1ddf (diff)
downloadFreeBSD-src-dd496676aa007d9e34b633ada826e27ebec897c8.zip
FreeBSD-src-dd496676aa007d9e34b633ada826e27ebec897c8.tar.gz
Make it easier to support more platforms.
Thanks to: Joerg Sonnenberger for pointing out the need and the technique.
Diffstat (limited to 'usr.bin/tar')
-rw-r--r--usr.bin/tar/Makefile3
-rw-r--r--usr.bin/tar/bsdtar_platform.h12
2 files changed, 7 insertions, 8 deletions
diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile
index 1eb73ea..2ac23b2 100644
--- a/usr.bin/tar/Makefile
+++ b/usr.bin/tar/Makefile
@@ -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
diff --git a/usr.bin/tar/bsdtar_platform.h b/usr.bin/tar/bsdtar_platform.h
index 5ec96f3..a917978 100644
--- a/usr.bin/tar/bsdtar_platform.h
+++ b/usr.bin/tar/bsdtar_platform.h
@@ -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. */
OpenPOWER on IntegriCloud