[cig-commits] r3977 - in mc/3D/CitcomS/trunk: . CitcomS
CitcomS/Components CitcomS/Components/Advection_diffusion
CitcomS/Components/Exchanger CitcomS/Components/Sphere
CitcomS/Components/Stokes_solver CitcomS/Solver bin
leif at geodynamics.org
leif at geodynamics.org
Thu Jul 6 16:20:42 PDT 2006
Author: leif
Date: 2006-07-06 16:20:42 -0700 (Thu, 06 Jul 2006)
New Revision: 3977
Added:
mc/3D/CitcomS/trunk/CitcomS/__init__.py
Removed:
mc/3D/CitcomS/trunk/CitcomS/__init__.py.in
Modified:
mc/3D/CitcomS/trunk/CitcomS/
mc/3D/CitcomS/trunk/CitcomS/Components/
mc/3D/CitcomS/trunk/CitcomS/Components/Advection_diffusion/
mc/3D/CitcomS/trunk/CitcomS/Components/Exchanger/
mc/3D/CitcomS/trunk/CitcomS/Components/Sphere/
mc/3D/CitcomS/trunk/CitcomS/Components/Stokes_solver/
mc/3D/CitcomS/trunk/CitcomS/Makefile.am
mc/3D/CitcomS/trunk/CitcomS/SimpleApp.py
mc/3D/CitcomS/trunk/CitcomS/Solver/
mc/3D/CitcomS/trunk/Makefile.am
mc/3D/CitcomS/trunk/bin/Makefile.am
mc/3D/CitcomS/trunk/configure.ac
Log:
Issue32: "make install" is now optional. Users can now
simply "configure", "make", and then add the "bin"
subdirectory of the source/build directory to their PATH.
In this mode, changes to C/C++ simply require a "make"
from the top-level directory ("make" from a subdirectory
will not work in the near future). Changes to the Python
code do not require you to run "make" at all -- simply
re-run 'citcoms'.
Property changes on: mc/3D/CitcomS/trunk/CitcomS
___________________________________________________________________
Name: svn:ignore
- Makefile.in
+ Makefile.in
*.pyc
Property changes on: mc/3D/CitcomS/trunk/CitcomS/Components
___________________________________________________________________
Name: svn:ignore
+ *.pyc
Property changes on: mc/3D/CitcomS/trunk/CitcomS/Components/Advection_diffusion
___________________________________________________________________
Name: svn:ignore
+ *.pyc
Property changes on: mc/3D/CitcomS/trunk/CitcomS/Components/Exchanger
___________________________________________________________________
Name: svn:ignore
+ *.pyc
Property changes on: mc/3D/CitcomS/trunk/CitcomS/Components/Sphere
___________________________________________________________________
Name: svn:ignore
+ *.pyc
Property changes on: mc/3D/CitcomS/trunk/CitcomS/Components/Stokes_solver
___________________________________________________________________
Name: svn:ignore
+ *.pyc
Modified: mc/3D/CitcomS/trunk/CitcomS/Makefile.am
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/Makefile.am 2006-07-06 22:22:48 UTC (rev 3976)
+++ mc/3D/CitcomS/trunk/CitcomS/Makefile.am 2006-07-06 23:20:42 UTC (rev 3977)
@@ -24,6 +24,7 @@
# $Id$
nobase_pkgpyexec_PYTHON = \
+ __init__.py \
Components/Advection_diffusion/Advection_diffusion.py \
Components/Advection_diffusion/__init__.py \
Components/BC.py \
@@ -61,16 +62,9 @@
Solver/Solver.py
nodist_pkgpyexec_PYTHON = \
- config.py \
- __init__.py
-do_subst = sed \
- -e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g'
+ config.py
config.py: $(top_builddir)/portinfo $(top_builddir)/Makefile
$(PYCONFIG) -h $(top_builddir)/portinfo -m $(top_builddir)/Makefile -o $@
-__init__.py: $(srcdir)/__init__.py.in
- $(do_subst) < $(srcdir)/__init__.py.in > $@ || (rm -f $@ && exit 1)
CLEANFILES = $(nodist_pkgpyexec_PYTHON)
-EXTRA_DIST = \
- __init__.py.in
## end of Makefile.am
Modified: mc/3D/CitcomS/trunk/CitcomS/SimpleApp.py
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/SimpleApp.py 2006-07-06 22:22:48 UTC (rev 3976)
+++ mc/3D/CitcomS/trunk/CitcomS/SimpleApp.py 2006-07-06 23:20:42 UTC (rev 3977)
@@ -136,7 +136,10 @@
from config import makefile
list.append(makefile['pkgsysconfdir'])
except ImportError, KeyError:
- pass
+ # The user is running directly from the source directory.
+ from os.path import dirname, join
+ etc = join(dirname(dirname(__file__)), 'etc')
+ list.append(etc)
return list
Property changes on: mc/3D/CitcomS/trunk/CitcomS/Solver
___________________________________________________________________
Name: svn:ignore
+ *.pyc
Copied: mc/3D/CitcomS/trunk/CitcomS/__init__.py (from rev 3976, mc/3D/CitcomS/trunk/CitcomS/__init__.py.in)
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/__init__.py.in 2006-07-06 22:22:48 UTC (rev 3976)
+++ mc/3D/CitcomS/trunk/CitcomS/__init__.py 2006-07-06 23:20:42 UTC (rev 3977)
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+#
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#<LicenseText>
+#
+# CitcomS.py by Eh Tan, Eun-seo Choi, and Pururav Thoutireddy.
+# Copyright (C) 2002-2005, California Institute of Technology.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+#</LicenseText>
+#
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+
+def copyright():
+ return "CitcomS pyre module: Copyright (c) 1998-2003 California Institute of Technology";
+
+
+# version
+def _getVersion():
+ try:
+ from config import makefile
+ return makefile['PACKAGE_VERSION']
+ except ImportError, KeyError:
+ return "development"
+
+__version__ = _getVersion()
+__id__ = "$Id$"
+
+# End of file
Deleted: mc/3D/CitcomS/trunk/CitcomS/__init__.py.in
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/__init__.py.in 2006-07-06 22:22:48 UTC (rev 3976)
+++ mc/3D/CitcomS/trunk/CitcomS/__init__.py.in 2006-07-06 23:20:42 UTC (rev 3977)
@@ -1,37 +0,0 @@
-#!/usr/bin/env python
-#
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-#<LicenseText>
-#
-# CitcomS.py by Eh Tan, Eun-seo Choi, and Pururav Thoutireddy.
-# Copyright (C) 2002-2005, California Institute of Technology.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-#</LicenseText>
-#
-#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#
-
-def copyright():
- return "CitcomS pyre module: Copyright (c) 1998-2003 California Institute of Technology";
-
-
-# version
-__version__ = "@PACKAGE_VERSION@"
-__id__ = "$Id$"
-
-# End of file
Modified: mc/3D/CitcomS/trunk/Makefile.am
===================================================================
--- mc/3D/CitcomS/trunk/Makefile.am 2006-07-06 22:22:48 UTC (rev 3976)
+++ mc/3D/CitcomS/trunk/Makefile.am 2006-07-06 23:20:42 UTC (rev 3977)
@@ -26,14 +26,14 @@
ACLOCAL_AMFLAGS = -I ./m4
if COND_PYRE
- MAYBE_PYRE = etc examples module pyre tests visual
+ MAYBE_PYRE = CitcomS etc examples module tests visual
endif
-SUBDIRS = $(MAYBE_PYTHIA) $(MAYBE_EXCHANGER) lib $(MAYBE_PYRE) drivers
+SUBDIRS = $(MAYBE_PYTHIA) $(MAYBE_EXCHANGER) lib $(MAYBE_PYRE) bin
DIST_SUBDIRS = \
$(MAYBE_DIST_PYTHIA) $(MAYBE_DIST_EXCHANGER) \
- lib drivers \
- etc examples module pyre tests visual
+ lib bin \
+ CitcomS etc examples module tests visual
EXTRA_DIST = \
doc/CitComS.doxyconf
Modified: mc/3D/CitcomS/trunk/bin/Makefile.am
===================================================================
--- mc/3D/CitcomS/trunk/bin/Makefile.am 2006-07-06 22:22:48 UTC (rev 3976)
+++ mc/3D/CitcomS/trunk/bin/Makefile.am 2006-07-06 23:20:42 UTC (rev 3977)
@@ -25,17 +25,22 @@
# $Id$
bin_PROGRAMS = CitcomSFull CitcomSRegional
-nodist_bin_SCRIPTS =
+noinst_PROGRAMS =
+noinst_SCRIPTS =
if COND_PYRE
-nodist_bin_SCRIPTS += citcoms
+noinst_SCRIPTS += citcoms
+noinstPYTHONPATH = $$top_srcdir
if COND_EMBEDDING
bin_PROGRAMS += pycitcoms
+ noinst_PROGRAMS += pycitcoms-noinst
INTERPRETER = $(bindir)/pycitcoms
+ noinstINTERPRETER = $$here/pycitcoms-noinst
else
INTERPRETER = $(PYTHON)
+ noinstINTERPRETER = $(PYTHON)
endif
endif
@@ -62,32 +67,56 @@
CitcomSRegional_LDADD = $(top_builddir)/lib/libCitcomS.la $(MPILIBS)
# citcoms (top-level Python script)
-do_subst = sed \
- -e 's|[@]INTERPRETER[@]|$(INTERPRETER)|g' \
- -e 's|[@]PYTHONPATH[@]|$(PYTHONPATH)|g'
citcoms: $(srcdir)/citcoms.in
- $(do_subst) < $(srcdir)/citcoms.in > $@ || (rm -f $@ && exit 1)
-CLEANFILES = $(nodist_bin_SCRIPTS)
+ here=`pwd`; \
+ top_srcdir=`cd $(top_srcdir) && pwd`; \
+ sed \
+ -e "s|[@]INTERPRETER[@]|$(noinstINTERPRETER)|g" \
+ -e "s|[@]PYTHONPATH[@]|$(noinstPYTHONPATH)|g" \
+ < $(srcdir)/citcoms.in > $@ || (rm -f $@ && exit 1)
+ chmod +x $@
+install-exec-hook:
+ here=`pwd`; \
+ sed \
+ -e "s|[@]INTERPRETER[@]|$(INTERPRETER)|g" \
+ -e "s|[@]PYTHONPATH[@]|$(PYTHONPATH)|g" \
+ < $(srcdir)/citcoms.in > $(DESTDIR)$(bindir)/citcoms || (rm -f $@ && exit 1)
+ chmod +x $(DESTDIR)$(bindir)/citcoms
+CLEANFILES = $(noinst_SCRIPTS)
EXTRA_DIST = citcoms.in
# pycitcoms (libCitcomS + CitcomSmodule + libExchanger +
-# Exchangermodule + embedded Python interpreter)
+# Exchangermodule + embedded Python interpreter). A special
+# 'pycitcoms-noinst' is also created in the build directory, as the
+# 'pycitcoms' libtool wrapper script is unusable as an interpreter.
pycitcoms_SOURCES = pycitcoms.cc
-pycitcoms_LDADD = \
+pycitcoms_LDADD = $(pycitcomsldadd)
+pycitcoms_noinst_SOURCES = pycitcoms.cc
+pycitcoms_noinst_LDFLAGS = -no-install
+pycitcoms_noinst_LDADD = $(pycitcomsldadd)
+pycitcomsldadd = \
$(top_builddir)/module/libPyxMPImodule.a \
$(top_builddir)/module/Exchanger/libExchangermodule.a \
$(top_builddir)/module/libCitcomSmodule.a \
$(top_builddir)/lib/libCitcomS.la
+pycitcomslink = $(CXXLINK) $(PYTHON_LDFLAGS) $(PYTHON_LINKFORSHARED)
+pycitcomslibs = \
+ -lExchanger -l_mpimodule -ljournal \
+ $(PYTHON_BLDLIBRARY) \
+ $(MPILIBS) \
+ $(FCLIBS) \
+ $(PYTHON_LIBS) $(PYTHON_MODLIBS) $(PYTHON_SYSLIBS) \
+ $(LIBS) \
+ $(PYTHON_LDLAST)
pycitcoms$(EXEEXT): $(pycitcoms_OBJECTS) $(pycitcoms_DEPENDENCIES)
@rm -f pycitcoms$(EXEEXT)
- $(CXXLINK) $(PYTHON_LDFLAGS) $(PYTHON_LINKFORSHARED) \
+ $(pycitcomslink) \
$(pycitcoms_LDFLAGS) $(pycitcoms_OBJECTS) $(pycitcoms_LDADD) \
- -lExchanger -l_mpimodule -ljournal \
- $(PYTHON_BLDLIBRARY) \
- $(MPILIBS) \
- $(FCLIBS) \
- $(PYTHON_LIBS) $(PYTHON_MODLIBS) $(PYTHON_SYSLIBS) \
- $(LIBS) \
- $(PYTHON_LDLAST)
+ $(pycitcomslibs)
+pycitcoms-noinst$(EXEEXT): $(pycitcoms_OBJECTS) $(pycitcoms_DEPENDENCIES)
+ @rm -f pycitcoms-noinst$(EXEEXT)
+ $(pycitcomslink) \
+ $(pycitcoms_noinst_LDFLAGS) $(pycitcoms_noinst_OBJECTS) $(pycitcoms_noinst_LDADD) \
+ $(pycitcomslibs)
## end of Makefile.am
Modified: mc/3D/CitcomS/trunk/configure.ac
===================================================================
--- mc/3D/CitcomS/trunk/configure.ac 2006-07-06 22:22:48 UTC (rev 3976)
+++ mc/3D/CitcomS/trunk/configure.ac 2006-07-06 23:20:42 UTC (rev 3977)
@@ -27,7 +27,7 @@
AC_PREREQ(2.59)
AC_INIT([CitcomS], [2.1.0], [cig-mc at geodynamics.org], [CitcomS])
AC_CONFIG_AUX_DIR([./aux-config])
-AC_CONFIG_SRCDIR([drivers/Citcom.c])
+AC_CONFIG_SRCDIR([bin/Citcom.c])
AC_CONFIG_HEADER([portinfo])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
@@ -140,13 +140,13 @@
AC_SUBST(LIBM)
AC_CONFIG_FILES([Makefile
- drivers/Makefile
+ bin/Makefile
+ CitcomS/Makefile
etc/Makefile
examples/Makefile
lib/Makefile
module/Makefile
module/Exchanger/Makefile
- pyre/Makefile
tests/Makefile
visual/Makefile])
More information about the cig-commits
mailing list