freebsd-dev/tools/build/Makefile
Jilles Tjoelker d80f1dd1d7 build: Add legacy support for futimens() and utimensat().
In order to allow using utimensat() in install(1), add futimens() and
utimensat() to -legacy.

The files futimens.c and utimensat.c are modified copies of the files under
lib/libc/sys/ since the libc versions use symbols that do not exist in the
libc on the build system (sys_futimens and sys_utimensat) . I expect the
next non-sweeping change to both sets of files to be to delete them, anyway.

This will allow reverting r299942 (which is a revert of r299850) enabling
nanosecond timestamps in install(1).

Reviewed by:	bdrewery
2016-06-09 21:57:34 +00:00

53 lines
1.1 KiB
Makefile

# $FreeBSD$
.PATH: ${.CURDIR}/../../include
LIB= egacy
SRC=
INCSGROUPS= INCS SYSINCS
INCS=
SYSINCSDIR= ${INCLUDEDIR}/sys
BOOTSTRAPPING?= 0
_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/grp.h || true
.if ${_WITH_PWCACHEDB} == 0
.PATH: ${.CURDIR}/../../contrib/libc-pwcache
CFLAGS+= -I${.CURDIR}/../../contrib/libc-pwcache \
-I${.CURDIR}/../../lib/libc/include
SRCS+= pwcache.c
.endif
_WITH_STRSVIS!= grep -c strsvis /usr/include/vis.h || true
.if ${_WITH_STRSVIS} == 0
.PATH: ${.CURDIR}/../../contrib/libc-vis
SRCS+= vis.c
CFLAGS+= -I${.CURDIR}/../../contrib/libc-vis \
-I${.CURDIR}/../../lib/libc/include
.endif
_WITH_REALLOCARRAY!= grep -c reallocarray /usr/include/stdlib.h || true
.if ${_WITH_REALLOCARRAY} == 0
.PATH: ${.CURDIR}/../../lib/libc/stdlib
INCS+= stdlib.h
SRCS+= reallocarray.c
CFLAGS+= -I${.CURDIR}/../../lib/libc/include
.endif
_WITH_UTIMENS!= grep -c utimensat /usr/include/sys/stat.h || true
.if ${_WITH_UTIMENS} == 0
SYSINCS+= stat.h
SRCS+= futimens.c utimensat.c
.endif
.if empty(SRCS)
SRCS= dummy.c
.endif
.if defined(CROSS_BUILD_TESTING)
SUBDIR= cross-build
.endif
.include <bsd.lib.mk>