Blame support/Makefile

Packit 6c4009
# Makefile for support library, used only at build and test time
Packit 6c4009
# Copyright (C) 2016-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
subdir := support
Packit 6c4009
Packit 6c4009
include ../Makeconfig
Packit 6c4009
Packit 6c4009
extra-libs := libsupport
Packit 6c4009
extra-libs-others = $(extra-libs)
Packit 6c4009
extra-libs-noinstall := $(extra-libs)
Packit 6c4009
Packit 6c4009
libsupport-routines = \
Packit 6c4009
  check \
Packit 6c4009
  check_addrinfo \
Packit 6c4009
  check_dns_packet \
Packit 6c4009
  check_hostent \
Packit 6c4009
  check_netent \
Packit 6c4009
  delayed_exit \
Packit 6c4009
  ignore_stderr \
Packit 6c4009
  next_to_fault \
Packit 6c4009
  oom_error \
Packit 6c4009
  resolv_test \
Packit 6c4009
  set_fortify_handler \
Packit 6c4009
  support-xfstat \
Packit 6c4009
  support-xstat \
Packit 6c4009
  support_become_root \
Packit 6c4009
  support_can_chroot \
Packit 6c4009
  support_capture_subprocess \
Packit 6c4009
  support_capture_subprocess_check \
Packit 6c4009
  support_chroot \
Packit 6c4009
  support_enter_mount_namespace \
Packit 6c4009
  support_enter_network_namespace \
Packit 6c4009
  support_format_address_family \
Packit 6c4009
  support_format_addrinfo \
Packit 6c4009
  support_format_dns_packet \
Packit 6c4009
  support_format_herrno \
Packit 6c4009
  support_format_hostent \
Packit 6c4009
  support_format_netent \
Packit 6c4009
  support_isolate_in_subprocess \
Packit 6c4009
  support_openpty \
Packit 6c4009
  support_quote_blob \
Packit 6c4009
  support_record_failure \
Packit 6c4009
  support_run_diff \
Packit 6c4009
  support_shared_allocate \
Packit 6c4009
  support_test_compare_blob \
Packit 6c4009
  support_test_compare_failure \
Packit 6c4009
  support_write_file_string \
Packit 6c4009
  support_test_main \
Packit 6c4009
  support_test_verify_impl \
Packit 6c4009
  temp_file \
Packit 6c4009
  write_message \
Packit 6c4009
  xaccept \
Packit 6c4009
  xaccept4 \
Packit 6c4009
  xasprintf \
Packit 6c4009
  xbind \
Packit 6c4009
  xcalloc \
Packit 6c4009
  xchroot \
Packit 6c4009
  xclose \
Packit 6c4009
  xconnect \
Packit 6c4009
  xdlfcn \
Packit 6c4009
  xdup2 \
Packit 6c4009
  xfclose \
Packit 6c4009
  xfopen \
Packit 6c4009
  xfork \
Packit 6c4009
  xftruncate \
Packit 6c4009
  xgetsockname \
Packit 6c4009
  xlisten \
Packit 6c4009
  xlseek \
Packit 6c4009
  xmalloc \
Packit 6c4009
  xmemstream \
Packit 6c4009
  xmkdir \
Packit 6c4009
  xmmap \
Packit 6c4009
  xmprotect \
Packit 6c4009
  xmunmap \
Packit 6c4009
  xopen \
Packit 6c4009
  xpipe \
Packit 6c4009
  xpoll \
Packit 6c4009
  xpthread_attr_destroy \
Packit 6c4009
  xpthread_attr_init \
Packit 6c4009
  xpthread_attr_setdetachstate \
Packit 6c4009
  xpthread_attr_setguardsize \
Packit 6c4009
  xpthread_attr_setstacksize \
Packit 6c4009
  xpthread_barrier_destroy \
Packit 6c4009
  xpthread_barrier_init \
Packit 6c4009
  xpthread_barrier_wait \
Packit 6c4009
  xpthread_barrierattr_destroy \
Packit 6c4009
  xpthread_barrierattr_init \
Packit 6c4009
  xpthread_barrierattr_setpshared \
Packit 6c4009
  xpthread_cancel \
Packit 6c4009
  xpthread_check_return \
Packit 6c4009
  xpthread_cond_wait \
Packit 6c4009
  xpthread_create \
Packit 6c4009
  xpthread_detach \
Packit 6c4009
  xpthread_join \
Packit 6c4009
  xpthread_mutex_consistent \
Packit 6c4009
  xpthread_mutex_destroy \
Packit 6c4009
  xpthread_mutex_init \
Packit 6c4009
  xpthread_mutex_lock \
Packit 6c4009
  xpthread_mutex_unlock \
Packit 6c4009
  xpthread_mutexattr_destroy \
Packit 6c4009
  xpthread_mutexattr_init \
Packit 6c4009
  xpthread_mutexattr_setprotocol \
Packit 6c4009
  xpthread_mutexattr_setpshared \
Packit 6c4009
  xpthread_mutexattr_setrobust \
Packit 6c4009
  xpthread_mutexattr_settype \
Packit 6c4009
  xpthread_once \
Packit 6c4009
  xpthread_rwlock_init \
Packit 6c4009
  xpthread_rwlock_rdlock \
Packit 6c4009
  xpthread_rwlock_unlock \
Packit 6c4009
  xpthread_rwlock_wrlock \
Packit 6c4009
  xpthread_rwlockattr_init \
Packit 6c4009
  xpthread_rwlockattr_setkind_np \
Packit 6c4009
  xpthread_sigmask \
Packit 6c4009
  xpthread_spin_lock \
Packit 6c4009
  xpthread_spin_unlock \
Packit 6c4009
  xraise \
Packit 6c4009
  xreadlink \
Packit 6c4009
  xrealloc \
Packit 6c4009
  xrecvfrom \
Packit 6c4009
  xsendto \
Packit 6c4009
  xsetsockopt \
Packit 6c4009
  xsigaction \
Packit 6c4009
  xsignal \
Packit 6c4009
  xsocket \
Packit 6c4009
  xstrdup \
Packit 6c4009
  xstrndup \
Packit 6c4009
  xsysconf \
Packit 6c4009
  xunlink \
Packit 6c4009
  xwaitpid \
Packit 6c4009
  xwrite \
Packit 6c4009
Packit 6c4009
libsupport-static-only-routines := $(libsupport-routines)
Packit 6c4009
# Only build one variant of the library.
Packit 6c4009
libsupport-inhibit-o := .os
Packit 6c4009
ifeq ($(build-shared),yes)
Packit 6c4009
libsupport-inhibit-o += .o
Packit 6c4009
endif
Packit 6c4009
Packit 6c4009
tests = \
Packit 6c4009
  README-testing \
Packit 6c4009
  tst-support-namespace \
Packit 6c4009
  tst-support_capture_subprocess \
Packit 6c4009
  tst-support_format_dns_packet \
Packit 6c4009
  tst-support_quote_blob \
Packit 6c4009
  tst-support_record_failure \
Packit 6c4009
  tst-test_compare \
Packit 6c4009
  tst-test_compare_blob \
Packit 6c4009
  tst-xreadlink \
Packit 6c4009
Packit 6c4009
ifeq ($(run-built-tests),yes)
Packit 6c4009
tests-special = \
Packit 6c4009
  $(objpfx)tst-support_record_failure-2.out
Packit 6c4009
Packit 6c4009
$(objpfx)tst-support_record_failure-2.out: tst-support_record_failure-2.sh \
Packit 6c4009
  $(objpfx)tst-support_record_failure
Packit 6c4009
	$(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
Packit 6c4009
	  '$(run-program-env)' '$(test-program-prefix-after-env)' \
Packit 6c4009
	  > $@; \
Packit 6c4009
	$(evaluate-test)
Packit 6c4009
endif
Packit 6c4009
Packit 6c4009
$(objpfx)tst-support_format_dns_packet: $(common-objpfx)resolv/libresolv.so
Packit 6c4009
Packit 6c4009
include ../Rules