summaryrefslogtreecommitdiffstats
path: root/tools/build/Makefile
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-02-20 11:55:14 +0000
committerru <ru@FreeBSD.org>2004-02-20 11:55:14 +0000
commit2630fc0e1e32d315721945f31bbdcc01b5028404 (patch)
treeca91d96f35dfb3255f54393f0e8f190068fb019f /tools/build/Makefile
parent7ba479f8386b4828f95fc01c4b5da58fbc7d9168 (diff)
downloadFreeBSD-src-2630fc0e1e32d315721945f31bbdcc01b5028404.zip
FreeBSD-src-2630fc0e1e32d315721945f31bbdcc01b5028404.tar.gz
Unbreak the upgrade path from 4.9 after removal of GNU getopt and
<gnuregex.h>.
Diffstat (limited to 'tools/build/Makefile')
-rw-r--r--tools/build/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/build/Makefile b/tools/build/Makefile
index fee9e40..fa5bae2 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -51,6 +51,18 @@ SRCS+= progname.c
SRCS+= strtofflags.c
.endif
+# Lot of tools need <getopt.h> and getopt_long(3).
+.if !exists(/usr/include/getopt.h)
+INCS+= getopt.h
+.PATH: ${.CURDIR}/../../lib/libc/stdlib
+SRCS+= getopt_long.c
+.endif
+
+# Some tools depend on a new <regex.h> not requiring <sys/types.h>.
+.if ${BOOTSTRAPPING} < 500042
+INCS+= regex.h
+.endif
+
.if empty(SRCS)
SRCS= dummy.c
.endif
OpenPOWER on IntegriCloud