summaryrefslogtreecommitdiff
path: root/math/cocoalib/files/patch-src_tests_Makefile
diff options
context:
space:
mode:
authorLorenzo Salvadore <salvadore@FreeBSD.org>2020-06-11 20:22:23 +0000
committerLorenzo Salvadore <salvadore@FreeBSD.org>2020-06-11 20:22:23 +0000
commit0b69618b648a5f56a59f6a26900819169e945fa2 (patch)
tree934a53cd96d8dd36e2a74585301e1674aab9bcd6 /math/cocoalib/files/patch-src_tests_Makefile
parentFix format (diff)
math/cocoalib: Update to 0.99710
Also: - build the port by patching existing Makefiles instead of copying a new one from ${FILESDIR} in the hope that this eases maintainance; - change the SMALLDEG option so that it now applies a patch conditionally instead of using ${REINPLACE_CMD}. Approved by: gerald (mentor) Differential Revision: https://reviews.freebsd.org/D25234
Notes
Notes: svn path=/head/; revision=538535
Diffstat (limited to 'math/cocoalib/files/patch-src_tests_Makefile')
-rw-r--r--math/cocoalib/files/patch-src_tests_Makefile129
1 files changed, 129 insertions, 0 deletions
diff --git a/math/cocoalib/files/patch-src_tests_Makefile b/math/cocoalib/files/patch-src_tests_Makefile
new file mode 100644
index 000000000000..063bd5ffe2be
--- /dev/null
+++ b/math/cocoalib/files/patch-src_tests_Makefile
@@ -0,0 +1,129 @@
+--- src/tests/Makefile.orig 2020-06-11 13:17:06 UTC
++++ src/tests/Makefile
+@@ -1,11 +1,5 @@
+ # Makefile for CoCoALib/src/tests/ directory
+
+-COCOA_ROOT=../..
+-include $(COCOA_ROOT)/configuration/autoconf.mk
+-CWD=src/tests/
+-
+-DEPEND_FILE=Makefile_dependencies
+-
+ TESTS=test-empty.C \
+ test-BigInt1.C test-BigInt2.C test-BigInt3.C \
+ test-BigRat1.C test-BigRat2.C test-BigRat3.C test-BigRat4.C \
+@@ -66,110 +60,11 @@ TESTS=test-empty.C \
+ test-utils1.C test-utils2.C
+ # test-RingTwinFloat3.C test-OpenMath2.C -- skip these tests for the moment
+
++all: ${TESTS:.C=}
++ bash RunTests.sh ${.ALLSRC}
+
+-EXECS=$(TESTS:.C=)
+-
+-
+-default:
+- @echo "*** src/tests/Makefile: default target ***"
+- @(cd $(COCOA_ROOT); $(MAKE) check)
+-
+-$(COCOA_LIB):
+- @echo "Compiling CoCoALib..."
+- @(cd $(COCOA_ROOT); $(MAKE) library)
+-
+-.PHONY: lib
+-lib: $(COCOA_LIB)
+-
+-.PHONY: library
+-library: $(COCOA_LIB)
+-
+-
+-# This target should be made only after the CoCoA library has been compiled;
+-# normally it would be called by the command "make check" in the CoCoALib root
+-# directory.
+-.PHONY: executables
+-executables: $(EXECS)
+-
+-$(EXECS): $(COCOA_LIB)
+-
+-
+-# This target should be made only after the CoCoA library has been compiled;
+-# normally it would be called by the command "make RunTests" in the CoCoALib root
+-# directory. Most of the work is done by the RunTests.sh script.
+-.PHONY: check
+-check: $(EXECS)
+- @./RunTests.sh $(EXECS) 2> /dev/null # discard err mesgs from the shell script
+-
+-
+-.PHONY: valgrind
+-valgrind: executables
+- @./ValgrindTests.sh $(EXECS)
+-
+-
+-.PHONY: clean clean-local
+-clean: clean-local
+- @echo "Cleaned CoCoALib/$(CWD)"
+-
+-clean-local:
+- @/bin/rm -f ./*.o gmon.out core a.out ./*~ ./.*~ ./.\#*
+- @/bin/rm -f $(EXECS) "$(DEPEND_FILE).new" "$(DEPEND_FILE).old" ./*.cout ./*.cerr
+- @/bin/rm -rf ./*.dSYM
+-
+-.PHONY: veryclean
+-veryclean: clean-local
+- @true >| "$(DEPEND_FILE)" # Empties $(DEPEND_FILE)
+- @echo "Verycleaned CoCoALib/$(CWD)"
+-
+-
+-# Morally the DEPEND_FILE depends on $(TESTS), but I do not tell make
+-# this as it tends to rebuild it too often.
+-
+-# This target checks whether we should really build DEPEND_FILE
+-.PHONY: dependencies
+-dependencies:
+- @if [ \! -s "$(DEPEND_FILE)" -o \! "$(DEPEND_FILE)" -nt "$(COCOA_HDR)" ] ; \
+- then \
+- $(MAKE) create-dependencies; \
+- fi
+-
+-# This is the target which really does rebuild the DEPEND_FILE
+-.PHONY: create-dependencies
+-create-dependencies:
+- @/bin/rm -rf $(DEPEND_FILE).new
+- @echo "Rebuilding dependencies in <CoCoALib>/$(CWD)"
+- @echo "##################################################################" >> $(DEPEND_FILE).new
+- @echo "# --- CoCoALib version $(COCOALIB_VERSION) ---" >> $(DEPEND_FILE).new
+- @echo "# Dependencies for directory CoCoALib/src/tests/" >> $(DEPEND_FILE).new
+- @echo "# DO NOT EDIT: this file is automatically generated; to regenerate" >> $(DEPEND_FILE).new
+- @echo "# run \`make dependencies' in the CoCoALib root directory." >> $(DEPEND_FILE).new
+- @echo "##################################################################" >> $(DEPEND_FILE).new
+- @echo >> $(DEPEND_FILE).new
+- @echo "#----------------------------------------------------------" >> $(DEPEND_FILE).new
+- @echo "# all executables also depend on libcocoa.a -- see Makefile" >> $(DEPEND_FILE).new
+- @echo "#----------------------------------------------------------" >> $(DEPEND_FILE).new
+- @echo >> $(DEPEND_FILE).new
+- @for srcfile in $(TESTS); \
+- do \
+- execfile=`basename $$srcfile .C`; \
+- echo "$$execfile: $$srcfile" >> $(DEPEND_FILE).new; \
+- echo >> $(DEPEND_FILE).new; \
+- done
+- @if [ -s "$(DEPEND_FILE)" ] ; \
+- then \
+- /bin/mv -f "$(DEPEND_FILE)" "$(DEPEND_FILE).old" ; \
+- fi
+- @/bin/mv $(DEPEND_FILE).new $(DEPEND_FILE)
+-
+-
+-# Tests using external libs depend on those libs
+-test-frobby1: $(FROBBY_LIBS)
+-test-normaliz1: $(NORMALIZ_LIBS)
+-
+-$(DEPEND_FILE):
+- @touch "$(DEPEND_FILE)"
+-
+-include $(DEPEND_FILE)
++.C:
++ ${CXX} ${CXXFLAGS} -o ${.TARGET} ${.IMPSRC} ${LDFLAGS}
+
+ #############################################################################
+ # Next few lines are for RCS header/log