curl/tests/server/Makefile.am

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
2.3 KiB
Makefile
Raw Normal View History

#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
2020-11-04 21:02:01 +08:00
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
2008-07-15 13:46:49 +08:00
AUTOMAKE_OPTIONS = foreign nostdinc
2002-02-25 20:44:58 +08:00
2008-07-15 13:46:49 +08:00
# Specify our include paths here, and do it relative to $(top_srcdir) and
# $(top_builddir), to ensure that these paths which belong to the library
# being currently built and tested are searched before the library which
# might possibly already be installed in the system.
#
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
build: fix circular header inclusion with other packages This commit renames lib/setup.h to lib/curl_setup.h and renames lib/setup_once.h to lib/curl_setup_once.h. Removes the need and usage of a header inclusion guard foreign to libcurl. [1] Removes the need and presence of an alarming notice we carried in old setup_once.h [2] ---------------------------------------- 1 - lib/setup_once.h used __SETUP_ONCE_H macro as header inclusion guard up to commit ec691ca3 which changed this to HEADER_CURL_SETUP_ONCE_H, this single inclusion guard is enough to ensure that inclusion of lib/setup_once.h done from lib/setup.h is only done once. Additionally lib/setup.h has always used __SETUP_ONCE_H macro to protect inclusion of setup_once.h even after commit ec691ca3, this was to avoid a circular header inclusion triggered when building a c-ares enabled version with c-ares sources available which also has a setup_once.h header. Commit ec691ca3 exposes the real nature of __SETUP_ONCE_H usage in lib/setup.h, it is a header inclusion guard foreign to libcurl belonging to c-ares's setup_once.h The renaming this commit does, fixes the circular header inclusion, and as such removes the need and usage of a header inclusion guard foreign to libcurl. Macro __SETUP_ONCE_H no longer used in libcurl. 2 - Due to the circular interdependency of old lib/setup_once.h and the c-ares setup_once.h header, old file lib/setup_once.h has carried back from 2006 up to now days an alarming and prominent notice about the need of keeping libcurl's and c-ares's setup_once.h in sync. Given that this commit fixes the circular interdependency, the need and presence of mentioned notice is removed. All mentioned interdependencies come back from now old days when the c-ares project lived inside a curl subdirectory. This commit removes last traces of such fact.
2013-01-07 02:06:49 +08:00
# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
2002-02-25 20:44:58 +08:00
AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib
disabled_CPPFLAGS = $(AM_CPPFLAGS) \
-I$(top_srcdir)/src
# Prevent LIBS from being used for all link targets
LIBS = $(BLANK_AT_MAKETIME)
if DOING_NATIVE_WINDOWS
AM_CPPFLAGS += -DCURL_STATICLIB
endif
cmake: allow building tests in unity mode Makes building tests noticeably faster. Apply changes/fixes/workarounds to make Unity work: - rename test variables to avoid collisions or shadowing each other when combined into single units. - add workaround to avoid applying `lib/memdebug.h` overrides to system headers declaring/defining `getaddrinfo()`/`freeaddrinfo()` for `tests/server/resolve.c`. This replaces a previous workaround that worked for that specific source. - rename test macro `CTRL` clashing with Cygwin `sys/ioctl.h`. - add include guard to `test.h`. Also: - exclude `tests/http/clients` which are all single-source. (like `docs/examples`.) Build time improvements for tests: - AppVeyor CI: - MSVC 2008, 2010: 1 minute faster (4m8s -> 2m56s, 3m19s -> 2m24s) - MSVC 2022 arm64: 3.5 minutes faster (10m18s -> 6m48s) before: https://ci.appveyor.com/project/curlorg/curl/builds/50522785 after: https://ci.appveyor.com/project/curlorg/curl/builds/50522942 - GHA: - Cygwin: 1.5 minutes faster (3m13s -> 1m43s) before: https://github.com/curl/curl/actions/runs/10681535327/job/29605384398 after: https://github.com/curl/curl/actions/runs/10680818726/job/29603130637 - Windows: before: https://github.com/curl/curl/actions/runs/10680818713 after: https://github.com/curl/curl/actions/runs/10683850187 - MSYS2, mingw-w64: 1 minute faster - MSVC: 30 seconds faster (3m17s -> 2m48s) - macOS: double speed (39s -> 18s) before: https://github.com/curl/curl/actions/runs/10680818753/job/29603133447 after: https://github.com/curl/curl/actions/runs/10683850174/job/29612914515 - Linux: almost double speed (30/31s -> 18s) before: https://github.com/curl/curl/actions/runs/10681535311/job/29605387156 after: https://github.com/curl/curl/actions/runs/10680818721/job/29603133976 - non-native: no obvious effect. before: https://github.com/curl/curl/actions/runs/10680818722 after: https://github.com/curl/curl/actions/runs/10683850187 - Old Linux: Unity mode not supported by old CMake, no effect. Closes #14765
2024-09-03 06:26:26 +08:00
AM_CPPFLAGS += -DCURL_NO_GETADDRINFO_OVERRIDE
# Makefile.inc provides neat definitions
include Makefile.inc
EXTRA_DIST = base64.pl CMakeLists.txt .checksrc
CHECKSRC = $(CS_$(V))
CS_0 = @echo " RUN " $@;
CS_1 =
CS_ = $(CS_0)
2016-04-04 04:42:31 +08:00
checksrc:
$(CHECKSRC)@PERL@ $(top_srcdir)/scripts/checksrc.pl $(srcdir)/*.[ch]
if DEBUGBUILD
# for debug builds, we scan the sources on all regular make invokes
all-local: checksrc
endif