Commit 467da3af authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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
parent 922f8006
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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_BINARY_DIR}/lib          # To be able to reach "curl_config.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)
    include_directories(${CARES_INCLUDE_DIR})
@@ -49,6 +50,14 @@ if(NOT WIN32)
  endif()
endif()

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)

+7 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \
endif

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@

@@ -109,5 +109,11 @@ libhostname_la_SOURCES = sethostname.c sethostname.h
libhostname_la_LIBADD =
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:
	@PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c

dist:
	rm lib1521.c

tests/libtest/lib1521.c

deleted100644 → 0
+0 −2500

File deleted.

Preview size limit exceeded, changes collapsed.