mirror of
https://github.com/curl/curl.git
synced 2026-08-24 18:43:32 +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, UTILS, CURLX_CFILES, TESTFILES, STUB_GSS variables
|
||||
# Get BUNDLE, FIRSTFILES, UTILS, CURLX_CFILES, TESTFILES, STUB_GSS variables
|
||||
curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
|
||||
|
|
@ -39,15 +39,15 @@ add_custom_command(OUTPUT "lib1521.c"
|
|||
|
||||
list(APPEND TESTFILES "lib1521.c")
|
||||
|
||||
add_custom_command(OUTPUT "${BUNDLE_SRC}"
|
||||
add_custom_command(OUTPUT "${BUNDLE}.c"
|
||||
COMMAND ${PERL_EXECUTABLE} "${PROJECT_SOURCE_DIR}/scripts/mk-unity.pl" --include ${UTILS} ${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} ${UTILS} ${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
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \
|
|||
-I$(srcdir) \
|
||||
-I$(top_srcdir)/tests/unit
|
||||
|
||||
# Get BUNDLE, BUNDLE_SRC, FIRSTFILES, UTILS, CURLX_CFILES, TESTFILES, STUB_GSS variables
|
||||
# Get BUNDLE, FIRSTFILES, UTILS, CURLX_CFILES, TESTFILES, STUB_GSS variables
|
||||
include Makefile.inc
|
||||
|
||||
EXTRA_DIST = CMakeLists.txt .checksrc $(FIRSTFILES) $(UTILS) $(TESTFILES) \
|
||||
|
|
@ -90,12 +90,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) $(UTILS) $(curlx_src) $(TESTFILES) lib1521.c
|
||||
@PERL@ $(top_srcdir)/scripts/mk-unity.pl --include $(UTILS) $(curlx_src) --test $(TESTFILES) lib1521.c > $(BUNDLE_SRC)
|
||||
$(BUNDLE).c: $(top_srcdir)/scripts/mk-unity.pl Makefile.inc $(FIRSTFILES) $(UTILS) $(curlx_src) $(TESTFILES) lib1521.c
|
||||
@PERL@ $(top_srcdir)/scripts/mk-unity.pl --include $(UTILS) $(curlx_src) --test $(TESTFILES) lib1521.c > $(BUNDLE).c
|
||||
|
||||
noinst_PROGRAMS = $(BUNDLE)
|
||||
LDADD = $(top_builddir)/lib/libcurl.la
|
||||
CLEANFILES = $(BUNDLE_SRC) lib1521.c
|
||||
CLEANFILES = $(BUNDLE).c lib1521.c
|
||||
|
||||
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
|
||||
|
|
@ -108,7 +108,7 @@ CS_ = $(CS_0)
|
|||
# ignore generated C files since they play by slightly different rules!
|
||||
checksrc: lib1521.c
|
||||
$(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 = libtests
|
||||
BUNDLE_SRC = libtests.c
|
||||
|
||||
# Files referenced from the bundle source
|
||||
FIRSTFILES = first.c first.h
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue