[MOAB-dev] r1240 - MOAB/trunk/tools/iMesh/SIDL

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Fri Aug 17 09:19:28 CDT 2007


Author: kraftche
Date: 2007-08-17 09:19:28 -0500 (Fri, 17 Aug 2007)
New Revision: 1240

Modified:
   MOAB/trunk/tools/iMesh/SIDL/Cclient.make
   MOAB/trunk/tools/iMesh/SIDL/Fclient.make
   MOAB/trunk/tools/iMesh/SIDL/Makefile.in
   MOAB/trunk/tools/iMesh/SIDL/common.make.in
   MOAB/trunk/tools/iMesh/SIDL/mserver.make
Log:
o Don't create empty babel.make stubs when building w/out babel--no longer needed
o Don't update timestamp if babel fails
o Add dependencies so that things rebuild when necessary
  - NOTE: the C-binding headers are listed explicitly in common.make.in
          as dependencies for the SIDL server IMPLSRC list.  The 
          common.make.in will need to be updated if the C-binding
          headers change.




Modified: MOAB/trunk/tools/iMesh/SIDL/Cclient.make
===================================================================
--- MOAB/trunk/tools/iMesh/SIDL/Cclient.make	2007-08-16 21:11:00 UTC (rev 1239)
+++ MOAB/trunk/tools/iMesh/SIDL/Cclient.make	2007-08-17 14:19:28 UTC (rev 1240)
@@ -1,6 +1,7 @@
 include babel.make
 
 TARGET_LIB = libiMeshCclient.la
+LTLIBS = ../mserver/libiMeshserver.la
 C_SRCS = $(STUBSRCS)
 CXX_SRCS =
 LIBLINK = $(LINK)

Modified: MOAB/trunk/tools/iMesh/SIDL/Fclient.make
===================================================================
--- MOAB/trunk/tools/iMesh/SIDL/Fclient.make	2007-08-16 21:11:00 UTC (rev 1239)
+++ MOAB/trunk/tools/iMesh/SIDL/Fclient.make	2007-08-17 14:19:28 UTC (rev 1240)
@@ -1,6 +1,7 @@
 include babel.make
 
 TARGET_LIB = libiMeshFclient.la
+LTLIBS = ../mserver/libiMeshserver.la
 C_SRCS = $(STUBSRCS)
 CXX_SRCS =
 LIBLINK = $(LINK)

Modified: MOAB/trunk/tools/iMesh/SIDL/Makefile.in
===================================================================
--- MOAB/trunk/tools/iMesh/SIDL/Makefile.in	2007-08-16 21:11:00 UTC (rev 1239)
+++ MOAB/trunk/tools/iMesh/SIDL/Makefile.in	2007-08-17 14:19:28 UTC (rev 1240)
@@ -192,30 +192,27 @@
 	@if test "x$(srcdir)" != "x."; then \
 	  for p in $(SERVER_FILES); do \
 	    $(ECHO) "cat $(srcdir)/$$p > $$p"; \
-	    cat $(srcdir)/$$p > $$p; \
+	    cat $(srcdir)/$$p > $$p || exit 1; \
 	  done \
 	fi
 	@if test "x$(USE_BABEL)" = "xyes"; then \
 	  $(ECHO) '$(BABEL) -sC++ $(SIDL_FILES_PATH) -o mserver' ; \
-	  $(BABEL) -sC++ $(SIDL_FILES_PATH) -o mserver; \
+	  $(BABEL) -sC++ $(SIDL_FILES_PATH) -o mserver && touch $@; \
 	fi
-	touch $@ 
 
 Cclient/babel.make: $(SIDL_FILES)
 	test -d Cclient || $(mkdir_p) Cclient || exit 1
 	@if test "x$(USE_BABEL)" = "xyes"; then \
 	  $(ECHO) '$(BABEL) -cC $(SIDL_FILES_PATH) -o Cclient' ; \
-	  $(BABEL) -cC $(SIDL_FILES_PATH) -o Cclient; \
+	  $(BABEL) -cC $(SIDL_FILES_PATH) -o Cclient && touch $@; \
 	fi
-	touch $@
 
 Fclient/babel.make: $(SIDL_FILES)
 	test -d Fclient || $(mkdir_p) Fclient || exit 1
 	@if test "x$(USE_BABEL)" = "xyes"; then \
 	  $(ECHO) '$(BABEL) -cF77 $(SIDL_FILES_PATH) -o Fclient' ; \
-	  $(BABEL) -cF77 $(SIDL_FILES_PATH) -o Fclient; \
+	  $(BABEL) -cF77 $(SIDL_FILES_PATH) -o Fclient && touch $@; \
 	fi
-	touch $@
 
 .SUFFIXES: .cpp .cc .c .lo
 
@@ -226,9 +223,13 @@
 	@$(ECHO) "./$< $(top_srcdir)/test/3k-tri-sphere.vtk"
 	@./$< $(top_srcdir)/test/3k-tri-sphere.vtk || $(ECHO) "<<<<<<<<<<<<<<<< testcxx FAILED >>>>>>>>>>>>>>>>>>>"
 
-testcxx : testcxx.lo all
+testcxx : testcxx.lo mserver/libiMeshserver.la
 	$(CXXLINK) $< mserver/libiMeshserver.la
 
+mserver/libiMeshserver.la : all
+
+testcxx.lo : mserver/babel.make
+
 .cpp.lo:
 	$(LTCXXCOMPILE) -c -o $@ $<
 

Modified: MOAB/trunk/tools/iMesh/SIDL/common.make.in
===================================================================
--- MOAB/trunk/tools/iMesh/SIDL/common.make.in	2007-08-16 21:11:00 UTC (rev 1239)
+++ MOAB/trunk/tools/iMesh/SIDL/common.make.in	2007-08-17 14:19:28 UTC (rev 1240)
@@ -1,8 +1,6 @@
 @SET_MAKE@
 
-LIBS = $(imesh_builddir)/libiMesh.la \
-       $(top_builddir)/libMOAB.la \
-       -L$(BABEL_DIR)/lib -lsidl
+LIBS = $(LTLIBS) -L$(BABEL_DIR)/lib -lsidl
 
 INCLUDES = -I$(BABEL_DIR)/include \
 	   -I$(builddir) -I$(srcdir) \
@@ -11,10 +9,10 @@
            -I$(sidl_srcdir) 
 
 imesh_srcdir = $(sidl_srcdir)/..
-imesh_builddir = $(sidl_builddir)/..
-sidl_srcdir = $(srcdir)/..
-sidl_builddir = $(builddir)/..
-srcdir = ../@srcdir@
+imesh_builddir = ../..
+sidl_srcdir = ../@srcdir@
+sidl_builddir = ..
+srcdir = ../@srcdir@/$(bdir)
 top_srcdir = ../@top_srcdir@
 VPATH = 
 pkgdatadir = $(datadir)/@PACKAGE@
@@ -168,13 +166,22 @@
 OBJECTS = $(C_SRCS:.c=.lo) $(CXX_SRCS:.cc=.lo)
 HEADERS = $(IMPLHDRS) $(IORHDRS) $(STUBHDRS)
 
-all: $(TARGET_LIB)
+all: debug $(TARGET_LIB)
 
+debug:
+	pwd
+	@echo "srcdir = $(srcdir)"
+	@echo "builddir = $(builddir)"
+	@echo "sidl_srcdir = $(sidl_srcdir)"
+	@echo "sidl_builddir = $(sidl_builddir)"
+	@echo "imesh_srcdir = $(imesh_srcdir)"
+	@echo "imesh_builddir = $(imesh_builddir)"
+
 install: install-lib install-headers
 
 uninstall: uninstall-lib uninstall-headers
 
-$(TARGET_LIB): $(OBJECTS)
+$(TARGET_LIB): $(OBJECTS) $(LTLIBS)
 	$(LIBLINK) -rpath $(libdir) $(LDFLAGS) $(OBJECTS) $(LIBADD) $(LIBS)
 
 
@@ -211,3 +218,22 @@
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
+
+
+# dependencies
+#
+# babel generates a babel.make.dependencies, but at least for 
+# 0.10.10, everything it lists depends either directly or 
+# indirectly on the SIDL file.  As we're using the 'babel.make'
+# as a timestamp, just depend on that to achieve nearly the 
+# same effect.
+$(OBJECTS) : babel.make
+
+# server implementation files also depend on the C interface
+IMESH_C_INC = $(imesh_srcdir)/iBase.h \
+              $(imesh_srcdir)/iMesh.h \
+              $(imesh_builddir)/iBase_FCDefs.h \
+	      $(imesh_srcdir)/iMesh_protos.h
+
+IMPLOBJS = $(IMPLSRCS:.cc=.lo)
+$(IMPLOBJS) : $(IMESH_C_INC)

Modified: MOAB/trunk/tools/iMesh/SIDL/mserver.make
===================================================================
--- MOAB/trunk/tools/iMesh/SIDL/mserver.make	2007-08-16 21:11:00 UTC (rev 1239)
+++ MOAB/trunk/tools/iMesh/SIDL/mserver.make	2007-08-17 14:19:28 UTC (rev 1240)
@@ -1,6 +1,7 @@
 include babel.make
 
 TARGET_LIB = libiMeshserver.la
+LTLIBS = ../../libiMesh.la
 C_SRCS = $(IORSRCS)
 CXX_SRCS = $(IMPLSRCS) $(SKELSRCS) $(STUBSRCS)
 LIBLINK = $(CXXLINK)




More information about the moab-dev mailing list