mirror of
https://github.com/curl/curl.git
synced 2026-08-03 00:00:30 +03:00
tests: drop BUNDLE_SRC variable
Derive it from `$BUNDLE` instead. autotools seems to be already relying on `$BUNDLE_SRC` being equal to `$BUNDLE.c`. (I haven't realized this beforeaaebb45f58.) Also drop redundant `nodist_<target>_SOURCE` lines in tunits and units. Follow-up toaaebb45f58#17688 Follow-up to2c27a67daa#17590 Closes #17692
This commit is contained in:
parent
ccb65643b6
commit
7d8fa8276d
15 changed files with 45 additions and 52 deletions
|
|
@ -22,7 +22,7 @@
|
|||
#
|
||||
###########################################################################
|
||||
|
||||
# Get BUNDLE, BUNDLE_SRC, FIRSTFILES, CURLX_CFILES, TESTFILES variables
|
||||
# Get BUNDLE, FIRSTFILES, CURLX_CFILES, TESTFILES variables
|
||||
curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
|
||||
|
|
@ -30,15 +30,15 @@ if(LIB_SELECTED STREQUAL LIB_STATIC)
|
|||
set(CURLX_CFILES "") # Already exported from the libcurl static build. Skip them.
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT "${BUNDLE_SRC}"
|
||||
add_custom_command(OUTPUT "${BUNDLE}.c"
|
||||
COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" --include ${CURLX_CFILES} --test ${TESTFILES}
|
||||
${CURL_MK_UNITY_OPTION} --srcdir "${CMAKE_CURRENT_SOURCE_DIR}" > "${BUNDLE_SRC}"
|
||||
${CURL_MK_UNITY_OPTION} --srcdir "${CMAKE_CURRENT_SOURCE_DIR}" > "${BUNDLE}.c"
|
||||
DEPENDS
|
||||
"${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.inc"
|
||||
${FIRSTFILES} ${CURLX_CFILES} ${TESTFILES}
|
||||
VERBATIM)
|
||||
|
||||
add_executable(${BUNDLE} EXCLUDE_FROM_ALL "${BUNDLE_SRC}")
|
||||
add_executable(${BUNDLE} EXCLUDE_FROM_ALL "${BUNDLE}.c")
|
||||
add_dependencies(testdeps ${BUNDLE})
|
||||
target_link_libraries(${BUNDLE} ${LIB_SELECTED} ${CURL_LIBS})
|
||||
target_include_directories(${BUNDLE} PRIVATE
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \
|
|||
-I$(top_srcdir)/lib/curlx \
|
||||
-I$(srcdir)
|
||||
|
||||
# Get BUNDLE, BUNDLE_SRC, FIRSTFILES, CURLX_CFILES, TESTFILES variables
|
||||
# Get BUNDLE, FIRSTFILES, CURLX_CFILES, TESTFILES variables
|
||||
include Makefile.inc
|
||||
|
||||
EXTRA_DIST = CMakeLists.txt $(FIRSTFILES) $(TESTFILES)
|
||||
|
|
@ -60,12 +60,12 @@ else
|
|||
# These are part of the libcurl static lib. Add them here when linking shared.
|
||||
curlx_src = $(CURLX_CFILES)
|
||||
endif
|
||||
$(BUNDLE_SRC): $(top_srcdir)/scripts/mk-unity.pl Makefile.inc $(FIRSTFILES) $(curlx_src) $(TESTFILES)
|
||||
@PERL@ $(top_srcdir)/scripts/mk-unity.pl --include $(curlx_src) --test $(TESTFILES) > $(BUNDLE_SRC)
|
||||
${BUNDLE}.c: $(top_srcdir)/scripts/mk-unity.pl Makefile.inc $(FIRSTFILES) $(curlx_src) $(TESTFILES)
|
||||
@PERL@ $(top_srcdir)/scripts/mk-unity.pl --include $(curlx_src) --test $(TESTFILES) > ${BUNDLE}.c
|
||||
|
||||
noinst_PROGRAMS = $(BUNDLE)
|
||||
LDADD = $(top_builddir)/lib/libcurl.la
|
||||
CLEANFILES = $(BUNDLE_SRC)
|
||||
CLEANFILES = ${BUNDLE}.c
|
||||
|
||||
CHECKSRC = $(CS_$(V))
|
||||
CS_0 = @echo " RUN " $@;
|
||||
|
|
@ -75,7 +75,7 @@ CS_ = $(CS_0)
|
|||
# ignore generated C files since they play by slightly different rules!
|
||||
checksrc:
|
||||
$(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) \
|
||||
-W$(srcdir)/$(BUNDLE_SRC) \
|
||||
-W$(srcdir)/${BUNDLE}.c \
|
||||
$(srcdir)/*.[ch])
|
||||
|
||||
if NOT_CURL_CI
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
# Shared between CMakeLists.txt and Makefile.am
|
||||
|
||||
BUNDLE = clients
|
||||
BUNDLE_SRC = clients.c
|
||||
|
||||
# Files referenced from the bundle source
|
||||
FIRSTFILES = first.c first.h
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue