[cgma-dev] r1817 - in cgm/trunk: . cgm_apps cgm_apps/examples/driverc++ cgm_apps/examples/facetdriver

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Thu May 15 16:22:52 CDT 2008


Author: kraftche
Date: 2008-05-15 16:22:52 -0500 (Thu, 15 May 2008)
New Revision: 1817

Added:
   cgm/trunk/cgm_apps/Makefile.am
   cgm/trunk/cgm_apps/examples/driverc++/Makefile.am
   cgm/trunk/cgm_apps/examples/driverc++/mergechk_huge
   cgm/trunk/cgm_apps/examples/driverc++/mergechk_merge
   cgm/trunk/cgm_apps/examples/facetdriver/Makefile.am
   cgm/trunk/cgm_apps/examples/facetdriver/facets_90
Removed:
   cgm/trunk/cgm_apps/examples/driverc++/Makefile
   cgm/trunk/cgm_apps/examples/facetdriver/Makefile
Modified:
   cgm/trunk/Makefile.am
   cgm/trunk/configure.in
Log:
Fix 'make check' with separate build tree: use automake to build tests
from examples subdir such that make magic (VPATHS and such), 
LD_LIBRARY_PATHS, etc. are correct.

Fix 'make check' such that it actually runs 'mergechk' and 'facet' after
building them.


Modified: cgm/trunk/Makefile.am
===================================================================
--- cgm/trunk/Makefile.am	2008-05-15 20:21:51 UTC (rev 1816)
+++ cgm/trunk/Makefile.am	2008-05-15 21:22:52 UTC (rev 1817)
@@ -1,10 +1,6 @@
 AUTOMAKE_OPTIONS = foreign
-SUBDIRS = util geom init itaps test
+SUBDIRS = util geom init itaps test cgm_apps
 
-if build_ACIS
-  ACIS_EXAMPLE_TEST=cd cgm_apps/examples/driverc++; make check-TESTS
-endif
-
 # Automake doesn't seem to have a directory defined for
 # platform-dependent data (or include) files. So put 
 # in $(libdir).  Define a $(cfgdir) to get around automake's
@@ -12,21 +8,6 @@
 cfgdir = $(libdir)
 cfg_DATA = cgm.make
 
-EXTRA_DIST = \
-	cgm_apps/examples/README \
-	cgm_apps/examples/facetdriver/Makefile \
-	cgm_apps/examples/facetdriver/facets.cpp \
-	cgm_apps/examples/facetdriver/README \
-	cgm_apps/examples/driverc++/Makefile \
-	cgm_apps/examples/driverc++/mergechk.cpp \
-	cgm_apps/examples/driverc++/merge.sat
-
-example_test:
-	cd cgm_apps/examples/facetdriver; make check-TESTS
-	$(ACIS_EXAMPLE_TEST)
-
-check: example_test
-
 # By default, cmg.make will define these to $(srcdir).  We
 # want to override that during the INSTALL of the file so
 # that the correct values are set (e.g. if someone does 

Added: cgm/trunk/cgm_apps/Makefile.am
===================================================================
--- cgm/trunk/cgm_apps/Makefile.am	                        (rev 0)
+++ cgm/trunk/cgm_apps/Makefile.am	2008-05-15 21:22:52 UTC (rev 1817)
@@ -0,0 +1,2 @@
+AUTOMAKE_OPTIONS = foreign
+SUBDIRS = examples

Deleted: cgm/trunk/cgm_apps/examples/driverc++/Makefile
===================================================================
--- cgm/trunk/cgm_apps/examples/driverc++/Makefile	2008-05-15 20:21:51 UTC (rev 1816)
+++ cgm/trunk/cgm_apps/examples/driverc++/Makefile	2008-05-15 21:22:52 UTC (rev 1817)
@@ -1,11 +0,0 @@
-CGM_DIR = ../../..
-include ${CGM_DIR}/lib/cgm.make
-
-all: mergechk 
-
-mergechk:  mergechk.o  ${CGM_LIBS_FILES}
-	$(CGM_CXX) -o mergechk $(LDFLAGS) mergechk.o $(CGM_LIBS_LINK)
-
-.cpp.o:
-	$(CGM_CXX) ${CGM_CXXFLAGS} ${CGM_INCLUDES} -c -o $@ $<
-

Added: cgm/trunk/cgm_apps/examples/driverc++/Makefile.am
===================================================================
--- cgm/trunk/cgm_apps/examples/driverc++/Makefile.am	                        (rev 0)
+++ cgm/trunk/cgm_apps/examples/driverc++/Makefile.am	2008-05-15 21:22:52 UTC (rev 1817)
@@ -0,0 +1,17 @@
+EXTRA_DIST = README merge.sat huge.sat
+
+check_PROGRAMS = mergechk
+
+TESTS = mergechk_merge mergechk_huge
+
+CPPFLAGS += -I$(top_srcdir)/util \
+            -I$(top_srcdir)/geom \
+            -I$(top_srcdir)/geom/ACIS
+
+LDFLAGS += -L$(ACIS_LIB_DIR) -R$(ACIS_LIB_DIR)
+
+mergechk_SOURCES = mergechk.cpp
+
+LDADD = ../../../geom/libcubit_geom.la \
+        ../../../geom/ACIS/libcubit_ACIS.la
+

Added: cgm/trunk/cgm_apps/examples/driverc++/mergechk_huge
===================================================================
--- cgm/trunk/cgm_apps/examples/driverc++/mergechk_huge	                        (rev 0)
+++ cgm/trunk/cgm_apps/examples/driverc++/mergechk_huge	2008-05-15 21:22:52 UTC (rev 1817)
@@ -0,0 +1,2 @@
+#!/bin/sh
+./mergechk $srcdir/huge.sat


Property changes on: cgm/trunk/cgm_apps/examples/driverc++/mergechk_huge
___________________________________________________________________
Name: svn:executable
   + *

Added: cgm/trunk/cgm_apps/examples/driverc++/mergechk_merge
===================================================================
--- cgm/trunk/cgm_apps/examples/driverc++/mergechk_merge	                        (rev 0)
+++ cgm/trunk/cgm_apps/examples/driverc++/mergechk_merge	2008-05-15 21:22:52 UTC (rev 1817)
@@ -0,0 +1,2 @@
+#!/bin/sh
+./mergechk $srcdir/merge.sat


Property changes on: cgm/trunk/cgm_apps/examples/driverc++/mergechk_merge
___________________________________________________________________
Name: svn:executable
   + *

Deleted: cgm/trunk/cgm_apps/examples/facetdriver/Makefile
===================================================================
--- cgm/trunk/cgm_apps/examples/facetdriver/Makefile	2008-05-15 20:21:51 UTC (rev 1816)
+++ cgm/trunk/cgm_apps/examples/facetdriver/Makefile	2008-05-15 21:22:52 UTC (rev 1817)
@@ -1,22 +0,0 @@
-CGM_DIR = ../../..
-include $(CGM_DIR)/lib/cgm.make
-
-### main rule
-
-facets: facets.o ${CGM_LIBS_FILES}
-	${CXX} ${LDFLAGS} facets.o ${CGM_LIBS_LINK} -o facets
-
-check: facets
-
-check-TESTS: check
-	./facets 90
-
-clean_all:
-	find . -name "*.o" -exec rm -f \{\} \;
-	rm -f facets
-
-## replace some default suffix rules
-.SUFFIXES : .o .cpp
-
-.cpp.o : 
-	${CXX} ${CXXFLAGS} ${CGM_INCLUDES} -c $<

Added: cgm/trunk/cgm_apps/examples/facetdriver/Makefile.am
===================================================================
--- cgm/trunk/cgm_apps/examples/facetdriver/Makefile.am	                        (rev 0)
+++ cgm/trunk/cgm_apps/examples/facetdriver/Makefile.am	2008-05-15 21:22:52 UTC (rev 1817)
@@ -0,0 +1,15 @@
+EXTRA_DIST = README
+
+check_PROGRAMS = facets
+
+facets_SOURCES = facets.cpp
+
+TESTS = facets_90
+
+CPPFLAGS += -I$(top_srcdir)/util \
+            -I$(top_srcdir)/geom \
+            -I$(top_srcdir)/geom/Cholla \
+            -I$(top_srcdir)/geom/facet
+
+LDADD = ../../../geom/libcubit_geom.la \
+        ../../../geom/facet/libcubit_facet.la 

Added: cgm/trunk/cgm_apps/examples/facetdriver/facets_90
===================================================================
--- cgm/trunk/cgm_apps/examples/facetdriver/facets_90	                        (rev 0)
+++ cgm/trunk/cgm_apps/examples/facetdriver/facets_90	2008-05-15 21:22:52 UTC (rev 1817)
@@ -0,0 +1,3 @@
+#!/bin/sh
+./facets 90
+


Property changes on: cgm/trunk/cgm_apps/examples/facetdriver/facets_90
___________________________________________________________________
Name: svn:executable
   + *

Modified: cgm/trunk/configure.in
===================================================================
--- cgm/trunk/configure.in	2008-05-15 20:21:51 UTC (rev 1816)
+++ cgm/trunk/configure.in	2008-05-15 21:22:52 UTC (rev 1817)
@@ -344,6 +344,10 @@
 	   itaps/SIDL/Makefile
 	   itaps/SIDL/iGeom-SIDL-Defs.inc
            test/Makefile
+           cgm_apps/Makefile
+           cgm_apps/examples/Makefile
+           cgm_apps/examples/driverc++/Makefile
+           cgm_apps/examples/facetdriver/Makefile
 	   )
 
 AC_OUTPUT




More information about the cgma-dev mailing list