[Mobies-commit] [commit] r3926 - in UDM/trunk: . bin lib src src/Udm src/UdmBase src/UdmOclPat/GOCL/src src/UdmPOI src/UdmSwig tests tests/testUdmCint
ksmyth at redhat1.isis.vanderbilt.edu
ksmyth at redhat1.isis.vanderbilt.edu
Thu Nov 3 14:35:55 CDT 2011
Author: ksmyth
Date: Thu Nov 3 14:35:55 2011
New Revision: 3926
Log:
Add --without-antlr and --without-xalan options
Deleted:
UDM/trunk/src/UdmOclPat/GOCL/src/GOCL.dsp
UDM/trunk/src/UdmOclPat/GOCL/src/GOCL.dsw
Modified:
UDM/trunk/bin/Makefile.am
UDM/trunk/configure.ac
UDM/trunk/lib/Makefile.am
UDM/trunk/src/Makefile.am
UDM/trunk/src/Udm/Udm.cpp
UDM/trunk/src/UdmBase/Makefile.am
UDM/trunk/src/UdmPOI/UdmPOI.cpp
UDM/trunk/src/UdmSwig/Makefile.am
UDM/trunk/tests/Makefile.am
UDM/trunk/tests/testUdmCint/main.cpp
UDM/trunk/tests/testUdmCint/testReadSBML2Ex.cpp
Modified: UDM/trunk/bin/Makefile.am
==============================================================================
--- UDM/trunk/bin/Makefile.am Thu Nov 3 14:29:20 2011 (r3925)
+++ UDM/trunk/bin/Makefile.am Thu Nov 3 14:35:55 2011 (r3926)
@@ -1,7 +1,17 @@
## Makefile.am -- Process this file with automake to produce Makefile.in
-bin_PROGRAMS = Udm UdmBackendDump UdmCopy UdmOclPat UdmToXmi \
- UdmViz XmiToUdm
+
+OPTPROGRAMS =
+if ! NO_XALAN
+OPTPROGRAMS += UdmToXmi
+OPTPROGRAMS += XmiToUdm
+endif
+if ! NO_ANTLR
+OPTPROGRAMS += UdmOclPat
+endif
+
+
+bin_PROGRAMS = Udm UdmBackendDump UdmCopy UdmViz $(OPTPROGRAMS)
Udm_SOURCES =
Modified: UDM/trunk/configure.ac
==============================================================================
--- UDM/trunk/configure.ac Thu Nov 3 14:29:20 2011 (r3925)
+++ UDM/trunk/configure.ac Thu Nov 3 14:35:55 2011 (r3926)
@@ -7,7 +7,7 @@
# judm paths are longer than 99 characters, so force pax format
AM_INIT_AUTOMAKE([tar-pax])
AC_CONFIG_SRCDIR([src/UdmBase/UdmBase.cpp])
-AC_CONFIG_SUBDIRS([src/UdmOclPat/GOCL])
+#AC_CONFIG_SUBDIRS([src/UdmOclPat/GOCL])
AC_LANG([C++])
AC_DISABLE_STATIC
@@ -39,6 +39,7 @@
[Name of antlr (version 1.33) from PCCTS [[default=antlr]]]),
[antlr_name="$withval"],
[antlr_name="antlr"])
+AS_IF([test x$with_antlr != xno], [
AC_CHECK_PROG(antlr, $antlr_name, $antlr_name)
if test x$antlr = x; then
AC_MSG_ERROR([$antlr_name not found])
@@ -50,12 +51,33 @@
AC_MSG_RESULT([no])
AC_MSG_ERROR([antlr version 1.33 is needed])
fi
+ AM_CONDITIONAL([NO_ANTLR], [false])
+], [
+ AM_CONDITIONAL([NO_ANTLR], [true])
+ AC_DEFINE(NO_ANTLR, 1, [Define this to disable antlr])
+])
+
+AC_ARG_WITH(xalan,
+[ --disable-xalan ])
+
+AS_IF([test "x$enable_xalan" != "xno"], [
+ AC_DEFINE(NO_XALAN, 1, [Define this to disable xalan])
+ AM_CONDITIONAL([NO_XALAN], [true])
+ enable_xalan=no
+ XALANLIBS=""
+],
+[
+ AM_CONDITIONAL([NO_XALAN], [false])
+ enable_xalan=yes
+ XALANLIBS="-lxalan-c"
+])
+
+
# Checks for libraries.
CPPUNITLIBS="-lcppunit -ldl"
DLOPENLIBS=""
MINIZIPLIBS="-lz -lminizip"
-XALANLIBS="-lxalan-c"
XERCESLIBS="-lxerces-c"
# Checks for header files.
Modified: UDM/trunk/lib/Makefile.am
==============================================================================
--- UDM/trunk/lib/Makefile.am Thu Nov 3 14:29:20 2011 (r3925)
+++ UDM/trunk/lib/Makefile.am Thu Nov 3 14:35:55 2011 (r3926)
@@ -1,5 +1,14 @@
## Makefile.am -- Process this file with automake to produce Makefile.in
+if ! NO_XALAN
+XALANLIBS += ../src/UdmXmi/libudmxmi.la
+endif
+
+if ! NO_ANTLR
+XALANLIBS += ../src/UdmOcl/libudmocl.la \
+ ../src/UdmOclPat/GOCL/src/libgocl.la
+endif
+
lib_LTLIBRARIES = libudm.la libUdmSwig.la
libudm_la_SOURCES =
@@ -9,9 +18,6 @@
../src/UdmBase/libudmbase.la \
../src/UdmUtil/libudmutil.la \
../src/UdmDom/libudmdom.la \
- ../src/UdmXmi/libudmxmi.la \
- ../src/UdmOcl/libudmocl.la \
- ../src/UdmOclPat/GOCL/src/libgocl.la \
$(XERCESLIBS) $(XALANLIBS) $(MINIZIPLIBS) $(DLOPENLIBS)
libudm_la_LDFLAGS = -version-info 3:1:3
# Force C++ linking
Modified: UDM/trunk/src/Makefile.am
==============================================================================
--- UDM/trunk/src/Makefile.am Thu Nov 3 14:29:20 2011 (r3925)
+++ UDM/trunk/src/Makefile.am Thu Nov 3 14:35:55 2011 (r3926)
@@ -1,4 +1,12 @@
## Makefile.am -- Process this file with automake to produce Makefile.in
-SUBDIRS = Uml UdmBase UdmDom UdmUtil UdmPOI UdmXmi UdmOcl UdmOclPat UdmSwig \
- Udm UdmCopy UdmBackendDump UdmViz UdmToXmi XmiToUdm
+
+SUBDIRS = Uml UdmBase UdmDom UdmUtil UdmPOI UdmSwig \
+ Udm UdmCopy UdmBackendDump UdmViz
+if ! NO_XALAN
+SUBDIRS += UdmXmi UdmToXmi XmiToUdm
+endif
+
+if ! NO_ANTLR
+SUBDIRS += UdmOcl UdmOclPat
+endif
\ No newline at end of file
Modified: UDM/trunk/src/Udm/Udm.cpp
==============================================================================
--- UDM/trunk/src/Udm/Udm.cpp Thu Nov 3 14:29:20 2011 (r3925)
+++ UDM/trunk/src/Udm/Udm.cpp Thu Nov 3 14:35:55 2011 (r3926)
@@ -328,6 +328,7 @@
return 0;
};
+#ifndef NO_XALAN
//check for XMI input
//1. If there is no DTDPath, it can not be an XMI Input
@@ -394,6 +395,7 @@
inputfile = input_udm;
}
+#endif /* NO_XALAN */
UdmDom::DomDataNetwork nw(Uml::diagram);
nw.OpenExisting(inputfile,"", Udm::CHANGES_LOST_DEFAULT);
Modified: UDM/trunk/src/UdmBase/Makefile.am
==============================================================================
--- UDM/trunk/src/UdmBase/Makefile.am Thu Nov 3 14:29:20 2011 (r3925)
+++ UDM/trunk/src/UdmBase/Makefile.am Thu Nov 3 14:35:55 2011 (r3926)
@@ -5,4 +5,4 @@
noinst_LTLIBRARIES = libudmbase.la
libudmbase_la_SOURCES = cint_string.cpp UdmBase.cpp UdmProject.cpp \
UmlExt.cpp DTDGen.cpp Project.cpp UdmStatic.cpp \
- DTDGen.h UdmTomi.cpp
+ DTDGen.h UdmTomi.cpp UdmProject_xsd.h
Modified: UDM/trunk/src/UdmPOI/UdmPOI.cpp
==============================================================================
--- UDM/trunk/src/UdmPOI/UdmPOI.cpp Thu Nov 3 14:29:20 2011 (r3925)
+++ UDM/trunk/src/UdmPOI/UdmPOI.cpp Thu Nov 3 14:35:55 2011 (r3926)
@@ -36,7 +36,9 @@
#include <Uml.h>
#include <UmlExt.h>
#include <UdmDom.h>
+#ifndef NO_ANTLR
#include <UdmOcl.h>
+#endif
#include <cstring>
#if (_MSC_VER == 1600) /* VS2010 */
@@ -1477,6 +1479,8 @@
};
+
+#ifndef NO_ANTLR
bool UdmPseudoDataNetwork::OCL_Evaluate(cint_string& res)
{
CINT_DN_TRY(dn_id);
@@ -1510,6 +1514,12 @@
return true;
CINT_DN_CATCH
}
+#else
+bool UdmPseudoDataNetwork::OCL_Evaluate(cint_string& res)
+{
+ // TODO: print a warning that constraints are disabled
+}
+#endif /* NO_ANTLR */
bool UPO_SetDiagram(UdmPseudoObject &diagram_what, const char* name)
Modified: UDM/trunk/src/UdmSwig/Makefile.am
==============================================================================
--- UDM/trunk/src/UdmSwig/Makefile.am Thu Nov 3 14:29:20 2011 (r3925)
+++ UDM/trunk/src/UdmSwig/Makefile.am Thu Nov 3 14:35:55 2011 (r3926)
@@ -2,6 +2,11 @@
SWIG = @swig@
+SWIG_FLAGS =
+if NO_ANTLR
+SWIG_FLAGS += -DNO_ANTLR
+endif
+
# gcc 4 optimizations based on strict aliasing break constructs like
# jresult = *(UdmPseudoObject **)&result; // jresult is not changed
AM_CPPFLAGS = -I$(top_srcdir)/include -fno-strict-aliasing
@@ -20,7 +25,7 @@
@rm -f sources-temp
@touch sources-temp
mkdir -p ../../judm/src/UdmSwig/edu/vanderbilt/isis/udm/swig
- $(SWIG) -java -package edu.vanderbilt.isis.udm.swig \
+ $(SWIG) $(SWIG_FLAGS) -java -package edu.vanderbilt.isis.udm.swig \
-outdir ../../judm/src/UdmSwig/edu/vanderbilt/isis/udm/swig \
-v -c++ -o UdmSwig_wrap.cpp $(srcdir)/UdmSwig.i
@mv -f sources-temp $@
Modified: UDM/trunk/tests/Makefile.am
==============================================================================
--- UDM/trunk/tests/Makefile.am Thu Nov 3 14:29:20 2011 (r3925)
+++ UDM/trunk/tests/Makefile.am Thu Nov 3 14:35:55 2011 (r3926)
@@ -2,5 +2,9 @@
SUBDIRS = test_childrenorder test_cintstring test_domstringdn \
test_generic test_generic2 test_libs test_ns test_crosslinks \
- testGetAdjacentObjects testOCL test_refports test_simpleudmops \
+ testGetAdjacentObjects test_refports test_simpleudmops \
testUdmCint
+
+if ! NO_ANTLR
+SUBDIRS += testOCL
+endif
\ No newline at end of file
Modified: UDM/trunk/tests/testUdmCint/main.cpp
==============================================================================
--- UDM/trunk/tests/testUdmCint/main.cpp Thu Nov 3 14:29:20 2011 (r3925)
+++ UDM/trunk/tests/testUdmCint/main.cpp Thu Nov 3 14:35:55 2011 (r3926)
@@ -250,6 +250,7 @@
}//end gene
+#ifndef NO_ANTLR
cint_string res;
if(!dn.OCL_Evaluate(res))
{
@@ -262,6 +263,7 @@
}
cout << string(res.buffer()) << endl;
+#endif
RemoveXsd(xsdn);
Modified: UDM/trunk/tests/testUdmCint/testReadSBML2Ex.cpp
==============================================================================
--- UDM/trunk/tests/testUdmCint/testReadSBML2Ex.cpp Thu Nov 3 14:29:20 2011 (r3925)
+++ UDM/trunk/tests/testUdmCint/testReadSBML2Ex.cpp Thu Nov 3 14:35:55 2011 (r3926)
@@ -147,6 +147,7 @@
}
+#ifndef NO_ANTLR
cint_string res;
if(!dn.OCL_Evaluate(res))
{
@@ -155,12 +156,12 @@
std::cout << __LINE__ <<std::endl;
std::cout << str.buffer() <<std::endl;
exit(1);
-
+
}
cout << string(res.buffer()) << endl;
-
-
+#endif
+
UPO_UnLoadDiagram(diagram_file);
}
More information about the Mobies-commit
mailing list