From b0d255ae2ac6167276c709307da09a7b344c1ed8 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 22 Mar 2017 11:23:37 +0300 Subject: [PATCH] New target (check-cpp) to avoid Makefile.direct parallel build issue (Cherry-pick commit 4dfe88e from 'master' branch.) * Makefile.direct: Add comment about check-cpp. * Makefile.direct (test_cpp): Replace dependency on "c++" with "gc_cpp.o base_lib"; link with gc_cpp.o directly. * Makefile.direct (check-cpp): New target (same as c++-t but do not depend on c++ target and pass no arguments to test_cpp). --- Makefile.direct | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile.direct b/Makefile.direct index 1355398d..f01c5dd6 100644 --- a/Makefile.direct +++ b/Makefile.direct @@ -8,6 +8,7 @@ # check - prints porting information, then builds basic version of gc.a, # and runs some tests of collector and cords. Does not add cords or # c++ interface to gc.a +# check-cpp - runs C++ test without adding C++ (and cords) interface to gc.a # cord/de - builds dumb editor based on cords. ABI_FLAG= @@ -254,11 +255,14 @@ cords: $(CORD_OBJS) cord/cordtest $(UTILS) base_lib gc_cpp.o: $(srcdir)/gc_cpp.cc $(srcdir)/include/gc_cpp.h $(srcdir)/include/gc.h $(CXX) -c $(CXXFLAGS) $(srcdir)/gc_cpp.cc -test_cpp: $(srcdir)/tests/test_cpp.cc $(srcdir)/include/gc_cpp.h $(srcdir)/include/gc.h c++ \ - $(UTILS) +test_cpp: $(srcdir)/tests/test_cpp.cc $(srcdir)/include/gc_cpp.h $(srcdir)/include/gc.h \ + gc_cpp.o base_lib $(UTILS) rm -f test_cpp - ./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc.a -ldld `./threadlibs` - ./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc.a `./threadlibs` + ./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.o gc.a -ldld `./threadlibs` + ./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.o gc.a `./threadlibs` + +check-cpp: test_cpp + ./test_cpp c++-t: c++ test_cpp ./test_cpp 1 -- 2.40.0