1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 22:45:03 -05:00

libtest/make: generate lib1521.c

... instead of having the generated code checked in. This saves space in
the tarball but primarily automatically adapts to newly added options.

Closes #1614
This commit is contained in:
Daniel Stenberg 2017-06-27 17:27:22 +02:00
parent 922f800603
commit 467da3af0b
3 changed files with 17 additions and 2502 deletions

View File

@ -8,6 +8,7 @@ function(SETUP_TEST TEST_NAME) # ARGN are the files in the test
${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h" ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h" ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
${CURL_BINARY_DIR}/include # To be able to reach "curl/curl.h" ${CURL_BINARY_DIR}/include # To be able to reach "curl/curl.h"
${CURL_SOURCE_DIR}/tests/libtest # To be able to build generated tests
) )
if(USE_ARES) if(USE_ARES)
include_directories(${CARES_INCLUDE_DIR}) include_directories(${CARES_INCLUDE_DIR})
@ -49,7 +50,15 @@ if(NOT WIN32)
endif() endif()
endif() endif()
# # files used only in some libcurl test programs add_custom_command(
OUTPUT lib1521.c
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl < ${CMAKE_SOURCE_DIR}/include/curl/curl.h > lib1521.c
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl"
"${CMAKE_SOURCE_DIR}/include/curl/curl.h"
VERBATIM)
# # files used only in some libcurl test programs
# SET(TESTUTIL testutil.c testutil.h) # SET(TESTUTIL testutil.c testutil.h)
# # these files are used in every single test program below # # these files are used in every single test program below

View File

@ -45,7 +45,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \
endif endif
EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \ EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
test1022.pl Makefile.inc notexists.pl CMakeLists.txt test1022.pl Makefile.inc notexists.pl CMakeLists.txt mk-lib1521.pl
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
@ -109,5 +109,11 @@ libhostname_la_SOURCES = sethostname.c sethostname.h
libhostname_la_LIBADD = libhostname_la_LIBADD =
libhostname_la_DEPENDENCIES = libhostname_la_DEPENDENCIES =
lib1521.c: $(top_srcdir)/tests/libtest/mk-lib1521.pl $(top_srcdir)/include/curl/curl.h
@PERL@ $(top_srcdir)/tests/libtest/mk-lib1521.pl < $(top_srcdir)/include/curl/curl.h > lib1521.c
checksrc: checksrc:
@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c @PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
dist:
rm lib1521.c

File diff suppressed because it is too large Load Diff