diff options
author | kientzle <kientzle@FreeBSD.org> | 2007-04-12 04:45:32 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2007-04-12 04:45:32 +0000 |
commit | dd496676aa007d9e34b633ada826e27ebec897c8 (patch) | |
tree | 4745f356426ad60f4d11a03df0561685850185da /usr.bin | |
parent | 7d72f414792a760bf03f1890056c7f96a1bc1ddf (diff) | |
download | FreeBSD-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')
-rw-r--r-- | usr.bin/tar/Makefile | 3 | ||||
-rw-r--r-- | usr.bin/tar/bsdtar_platform.h | 12 |
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. */ |