New target (check-cpp) to avoid Makefile.direct parallel build issue
authorIvan Maidanski <ivmai@mail.ru>
Wed, 22 Mar 2017 08:23:37 +0000 (11:23 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 22 Mar 2017 08:29:52 +0000 (11:29 +0300)
* 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

index 5785290..6327f98 100644 (file)
@@ -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,10 +255,13 @@ 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)
-       ./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`
+test_cpp: $(srcdir)/tests/test_cpp.cc $(srcdir)/include/gc_cpp.h $(srcdir)/include/gc.h \
+  gc_cpp.o base_lib $(UTILS)
+       ./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