]> granicus.if.org Git - curl/commitdiff
tests/libtest: Add lib1521 to nodist_SOURCES
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Mon, 4 Jun 2018 18:28:59 +0000 (20:28 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 6 Jun 2018 21:55:21 +0000 (23:55 +0200)
Since 467da3af0, lib1521.c is generated instead of checked in. According
to the commit message, the intention was to remove it from the tarball
as well. However, it is still present when running make dist. To remove
it, add it to nodist_lib1521_SOURCES. This also means there is no need
for the manually added dist-rule in the Makefile.

Also update CMakelists.txt to handle the fact that we now may have
nodist_SOURCES.

tests/libtest/CMakeLists.txt
tests/libtest/Makefile.am
tests/libtest/Makefile.inc

index 6211aaae4cbcdfba7549506bae671683c1f81d5a..bea8d60c80853b4f6a8a455922656f73f7014c4e 100644 (file)
@@ -27,7 +27,11 @@ transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.
 include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake)
 
 foreach(TEST_NAME ${noinst_PROGRAMS})
-  setup_test(${TEST_NAME} ${${TEST_NAME}_SOURCES})
+  if(DEFINED ${TEST_NAME}_SOURCES)
+    setup_test(${TEST_NAME} ${${TEST_NAME}_SOURCES})
+  else()
+    setup_test(${TEST_NAME} ${nodist_${TEST_NAME}_SOURCES})
+  endif()
 endforeach()
 
 # Allows for hostname override to make tests machine independent.
index a6ab719fc58f0cdd1dd0d468e0930894adf8bbed..03eeb06dad115f8b8a2726a8299842d9ac712287 100644 (file)
@@ -131,6 +131,3 @@ lib1521.c: $(top_srcdir)/tests/libtest/mk-lib1521.pl $(top_srcdir)/include/curl/
 
 checksrc:
        @PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
-
-dist:
-       rm lib1521.c
index b926724c7ad73010cf3da7e6db59b774628098ab..ed536a5646b4e2cc5b4e9bb58cf32591623da1ed 100644 (file)
@@ -405,7 +405,7 @@ lib1517_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1517
 lib1520_SOURCES = lib1520.c $(SUPPORTFILES)
 lib1520_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1520
 
-lib1521_SOURCES = lib1521.c $(SUPPORTFILES)
+nodist_lib1521_SOURCES = lib1521.c $(SUPPORTFILES)
 lib1521_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)
 
 lib1525_SOURCES = lib1525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)