Blame io/Makefile

Packit 6c4009
# Copyright (C) 1992-2018 Free Software Foundation, Inc.
Packit 6c4009
# This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
# The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
# modify it under the terms of the GNU Lesser General Public
Packit 6c4009
# License as published by the Free Software Foundation; either
Packit 6c4009
# version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
# The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
# Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
# You should have received a copy of the GNU Lesser General Public
Packit 6c4009
# License along with the GNU C Library; if not, see
Packit 6c4009
# <http://www.gnu.org/licenses/>.
Packit 6c4009
Packit 6c4009
#
Packit 6c4009
#	Sub-makefile for I/O portion of the library.
Packit 6c4009
#
Packit 6c4009
subdir	:= io
Packit 6c4009
Packit 6c4009
include ../Makeconfig
Packit 6c4009
Packit 6c4009
headers := sys/stat.h bits/stat.h sys/statfs.h bits/statfs.h sys/vfs.h \
Packit 6c4009
	   sys/statvfs.h bits/statvfs.h fcntl.h sys/fcntl.h bits/fcntl.h \
Packit 6c4009
	   poll.h sys/poll.h bits/poll.h bits/fcntl2.h bits/poll2.h \
Packit Service f5a052
	   bits/statx.h bits/statx-generic.h bits/types/struct_statx.h \
Packit Service f5a052
	   bits/types/struct_statx_timestamp.h \
Packit Service f5a052
	   utime.h ftw.h fts.h sys/sendfile.h
Packit 6c4009
Packit 6c4009
routines :=								\
Packit 6c4009
	utime								\
Packit 6c4009
	mkfifo mkfifoat							\
Packit 6c4009
	stat fstat lstat stat64 fstat64 lstat64 fstatat fstatat64	\
Packit 6c4009
	xstat fxstat lxstat xstat64 fxstat64 lxstat64 statx		\
Packit 6c4009
	mknod mknodat xmknod xmknodat					\
Packit 6c4009
	fxstatat fxstatat64						\
Packit 6c4009
	statfs fstatfs statfs64 fstatfs64				\
Packit 6c4009
	statvfs fstatvfs statvfs64 fstatvfs64				\
Packit 6c4009
	umask chmod fchmod lchmod fchmodat				\
Packit 6c4009
	mkdir mkdirat							\
Packit 6c4009
	open open_2 open64 open64_2 openat openat_2 openat64 openat64_2	\
Packit 6c4009
	read write lseek lseek64 access euidaccess faccessat		\
Packit 6c4009
	fcntl fcntl64 flock lockf lockf64				\
Packit 6c4009
	close dup dup2 dup3 pipe pipe2					\
Packit 6c4009
	creat creat64							\
Packit 6c4009
	chdir fchdir							\
Packit 6c4009
	getcwd getwd getdirname						\
Packit 6c4009
	chown fchown lchown fchownat					\
Packit 6c4009
	ttyname ttyname_r isatty					\
Packit 6c4009
	link linkat symlink symlinkat readlink readlinkat		\
Packit 6c4009
	unlink unlinkat rmdir						\
Packit 6c4009
	ftw ftw64 fts fts64 poll ppoll					\
Packit 6c4009
	posix_fadvise posix_fadvise64					\
Packit 6c4009
	posix_fallocate posix_fallocate64				\
Packit 6c4009
	sendfile sendfile64 copy_file_range 				\
Packit Service c2eb2d
	utimensat futimens file_change_detection
Packit 6c4009
Packit 6c4009
# These routines will be omitted from the libc shared object.
Packit 6c4009
# Instead the static object files will be included in a special archive
Packit 6c4009
# linked against when the shared library will be used.
Packit 6c4009
static-only-routines = stat fstat lstat stat64 fstat64 lstat64	\
Packit 6c4009
		       fstatat fstatat64 mknod mknodat
Packit 6c4009
Packit 6c4009
others		:= pwd
Packit 6c4009
test-srcs	:= ftwtest
Packit 6c4009
tests		:= test-utime test-stat test-stat2 test-lfs tst-getcwd \
Packit 6c4009
		   tst-fcntl bug-ftw1 bug-ftw2 bug-ftw3 bug-ftw4 tst-statvfs \
Packit 6c4009
		   tst-openat tst-unlinkat tst-fstatat tst-futimesat \
Packit 6c4009
		   tst-renameat tst-fchownat tst-fchmodat tst-faccessat \
Packit 6c4009
		   tst-symlinkat tst-linkat tst-readlinkat tst-mkdirat \
Packit 6c4009
		   tst-mknodat tst-mkfifoat tst-ttyname_r bug-ftw5 \
Packit 6c4009
		   tst-posix_fallocate tst-posix_fallocate64 \
Packit 6c4009
		   tst-fts tst-fts-lfs tst-open-tmpfile \
Packit 6c4009
		   tst-copy_file_range tst-getcwd-abspath \
Packit Service 65ccc4
		   tst-file_change_detection
Packit Service 3b0880
Packit 6c4009
# Likewise for statx, but we do not need static linking here.
Packit 6c4009
tests-internal += tst-statx
Packit 6c4009
Packit 6c4009
ifeq ($(run-built-tests),yes)
Packit 6c4009
tests-special += $(objpfx)ftwtest.out
Packit 6c4009
endif
Packit 6c4009
Packit 6c4009
include ../Rules
Packit 6c4009
Packit 6c4009
CFLAGS-open.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-open64.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-creat.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-creat64.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-fcntl.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-fcntl64.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-poll.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-ppoll.c += -fexceptions -fasynchronous-unwind-tables
Packit 6c4009
CFLAGS-lockf.c += -fexceptions
Packit 6c4009
CFLAGS-statfs.c += -fexceptions
Packit 6c4009
CFLAGS-fstatfs.c += -fexceptions
Packit 6c4009
CFLAGS-statvfs.c += -fexceptions
Packit 6c4009
CFLAGS-fstatvfs.c += -fexceptions
Packit 6c4009
CFLAGS-fts.c += -Wno-uninitialized $(uses-callbacks) -fexceptions
Packit 6c4009
CFLAGS-fts64.c += -Wno-uninitialized $(uses-callbacks) -fexceptions
Packit 6c4009
CFLAGS-ftw.c += $(uses-callbacks) -fexceptions
Packit 6c4009
CFLAGS-ftw64.c += $(uses-callbacks) -fexceptions
Packit 6c4009
CFLAGS-lockf.c += -fexceptions
Packit 6c4009
CFLAGS-posix_fallocate.c += -fexceptions
Packit 6c4009
CFLAGS-posix_fallocate64.c += -fexceptions
Packit 6c4009
CFLAGS-fallocate.c += -fexceptions
Packit 6c4009
CFLAGS-fallocate64.c += -fexceptions
Packit 6c4009
CFLAGS-read.c += -fexceptions
Packit 6c4009
CFLAGS-write.c += -fexceptions
Packit 6c4009
Packit 6c4009
CFLAGS-test-stat.c += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
Packit 6c4009
CFLAGS-test-lfs.c += -D_LARGEFILE64_SOURCE
Packit 6c4009
Packit 6c4009
test-stat2-ARGS = Makefile . $(objpfx)test-stat2
Packit 6c4009
Packit 6c4009
tst-statvfs-ARGS = $(objpfx)tst-statvfs tst-statvfs.c /tmp
Packit 6c4009
Packit 6c4009
tst-open-tmpfile-ARGS = --test-dir=$(objpfx)
Packit 6c4009
Packit 6c4009
ifeq ($(run-built-tests),yes)
Packit 6c4009
$(objpfx)ftwtest.out: ftwtest-sh $(objpfx)ftwtest
Packit 6c4009
	$(SHELL) $< $(common-objpfx) '$(test-program-cmd)' > $@; \
Packit 6c4009
	$(evaluate-test)
Packit 6c4009
endif