diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build/Makefile | 12 | ||||
-rw-r--r-- | tools/build/regex.h | 4 |
2 files changed, 16 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 diff --git a/tools/build/regex.h b/tools/build/regex.h new file mode 100644 index 0000000..3de6076 --- /dev/null +++ b/tools/build/regex.h @@ -0,0 +1,4 @@ +/* $FreeBSD$ */ + +#include <sys/types.h> +#include "/usr/include/regex.h" |