[MOAB-dev] r2611 - MOAB/trunk/tools/iMesh

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Fri Jan 30 13:38:21 CST 2009


Author: kraftche
Date: 2009-01-30 13:38:21 -0600 (Fri, 30 Jan 2009)
New Revision: 2611

Modified:
   MOAB/trunk/tools/iMesh/Makefile.am
Log:
autogenerate iMesh_extensions_protos.h & fix broken iMesh_protos.h after adding generation of iMeshP_protos.h

Modified: MOAB/trunk/tools/iMesh/Makefile.am
===================================================================
--- MOAB/trunk/tools/iMesh/Makefile.am	2009-01-30 18:45:33 UTC (rev 2610)
+++ MOAB/trunk/tools/iMesh/Makefile.am	2009-01-30 19:38:21 UTC (rev 2611)
@@ -1,5 +1,5 @@
 AUTOMAKE_OPTIONS = foreign
-BUILT_SOURCES = iMesh_protos.h iMeshP_protos.h
+BUILT_SOURCES = iMesh_protos.h iMeshP_protos.h iMesh_extensions_protos.h
 
 if USE_BABEL
   babel_DIR = SIDL
@@ -77,9 +77,9 @@
 	echo "IMESH_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/iMesh-Defs.inc
 	echo "MOAB_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/iMesh-Defs.inc
 
-SEDEXPR = 's/^[[:space:]]*void[[:space:]][[:space:]]*$(FPFX)_\([a-z][_a-zA-Z0-9]*\)[[:space:]]*(.*$$/$(FPFX)_\1/p'
 
 FPFX=iMesh
+SEDEXPR = 's/^[[:space:]]*void[[:space:]][[:space:]]*$(FPFX)_\([a-z][_a-zA-Z0-9]*\)[[:space:]]*(.*$$/$(FPFX)_\1/p'
 iMesh_protos.h: iMesh.h
 	echo '#include "MBCN_FCDefs.h"' > $@
 	echo '#ifdef FC_FUNC_' >> $@
@@ -92,8 +92,7 @@
 	echo >> $@
 	echo "#endif" >> $@
 
-FPFX=iMeshP
-iMeshP_protos.h: iMeshP.h
+iMesh_extensions_protos.h: iMesh_extensions.h
 	echo '#include "MBCN_FCDefs.h"' > $@
 	echo '#ifdef FC_FUNC_' >> $@
 	echo >> $@
@@ -104,3 +103,17 @@
         done
 	echo >> $@
 	echo "#endif" >> $@
+
+PFPFX=iMeshP
+PSEDEXPR = 's/^[[:space:]]*void[[:space:]][[:space:]]*$(PFPFX)_\([a-z][_a-zA-Z0-9]*\)[[:space:]]*(.*$$/$(PFPFX)_\1/p'
+iMeshP_protos.h: iMeshP.h
+	echo '#include "MBCN_FCDefs.h"' > $@
+	echo '#ifdef FC_FUNC_' >> $@
+	echo >> $@
+	for func in `$(SED) -n $(PSEDEXPR) $<`; do \
+	  lower=`echo $$func | tr '[:upper:]' '[:lower:]'`; \
+          upper=`echo $$func | tr '[:lower:]' '[:upper:]'`; \
+	  echo "#define $$func FC_FUNC_( $$lower, $$upper )" >> $@; \
+        done
+	echo >> $@
+	echo "#endif" >> $@



More information about the moab-dev mailing list