From 4abd1ba54a494d39f62d432ee0c61379014ac156 Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Wed, 19 Nov 2003 09:37:37 +0000 Subject: [PATCH] - --- Cantera/src/config.h | 4 ++-- Makefile.in | 11 +++++++--- config.h | 4 ++-- config/configure | 37 ++++++++++++++++++++------------- config/configure.in | 25 +++++++++++++--------- tools/Makefile.in | 19 +++++++++-------- tools/bin/finish_install.py | 33 +++++++++++++++++++++-------- tools/man/mixmaster.1 | 2 +- tools/src/finish_install.py.in | 22 ++++++++++++++++---- tools/templates/f77/demo.mak.in | 4 ++-- 10 files changed, 104 insertions(+), 57 deletions(-) diff --git a/Cantera/src/config.h b/Cantera/src/config.h index 5d677dfdb..f3ee038c5 100755 --- a/Cantera/src/config.h +++ b/Cantera/src/config.h @@ -1,4 +1,4 @@ -/* ../config.h. Generated automatically by configure. */ +/* ../config.h. Generated by configure. */ // // Run the 'configure' script to generate 'config.h' from this input file. // @@ -47,7 +47,7 @@ typedef int ftnlen; // Fortran hidden string length type // The configure script defines this if the operatiing system is Mac // OS X, This used to add some Mac-specific directories to the default // data file search path. -/* #undef DARWIN */ +#define DARWIN 1 //--------- Cantera -------------- diff --git a/Makefile.in b/Makefile.in index 450e8c316..84e51e7e5 100755 --- a/Makefile.in +++ b/Makefile.in @@ -150,6 +150,7 @@ finish-install: @INSTALL@ examples/cxx/*.h @ct_demodir@/c++ @INSTALL@ examples/cxx/Makefile @ct_demodir@/c++ chown -R @username@ @ct_demodir@/c++ + @INSTALL@ -d @ct_demodir@/f77 @INSTALL@ Cantera/fortran/f77demos/*.f @ct_demodir@/f77 @INSTALL@ tools/templates/f77/demo_ftnlib.cpp @ct_demodir@/f77 @@ -157,8 +158,13 @@ finish-install: @INSTALL@ Cantera/fortran/f77demos/f77demos.mak @ct_demodir@/f77/Makefile chown -R @username@ @ct_demodir@/f77 - @INSTALL@ README*.txt @ct_dir@ - @INSTALL@ License.* @ct_dir@ + ln -s @ct_demodir@ @prefix@/cantera/demos + ln -s @ct_datadir@ @prefix@/cantera/data + ln -s @ct_templdir@ @prefix@/cantera/templates + ln -s @ct_tutdir@ @prefix@/cantera/tutorials + + @INSTALL@ README*.txt @prefix@/cantera + @INSTALL@ License.* @prefix@/cantera @INSTALL@ tools/src/finish_install.py tools/bin (PYTHONPATH=''; @PYTHON_CMD@ tools/bin/finish_install.py @prefix@ @PYTHON_CMD@) #@INSTALL@ bin/ctmkmf @ct_bindir@/ctnew @@ -181,7 +187,6 @@ uninstall: rm -r -f @ct_docdir@ rm -r -f @ct_tutdir@ rm -r -f @prefix@/matlab/toolbox/cantera - rm -r -f @ct_doc cd tools; make uninstall clean: diff --git a/config.h b/config.h index 5d677dfdb..f3ee038c5 100755 --- a/config.h +++ b/config.h @@ -1,4 +1,4 @@ -/* ../config.h. Generated automatically by configure. */ +/* ../config.h. Generated by configure. */ // // Run the 'configure' script to generate 'config.h' from this input file. // @@ -47,7 +47,7 @@ typedef int ftnlen; // Fortran hidden string length type // The configure script defines this if the operatiing system is Mac // OS X, This used to add some Mac-specific directories to the default // data file search path. -/* #undef DARWIN */ +#define DARWIN 1 //--------- Cantera -------------- diff --git a/config/configure b/config/configure index a61955c90..aac5a7085 100755 --- a/config/configure +++ b/config/configure @@ -271,7 +271,7 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="Cantera.README" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS local_inst ct_libdir ct_incdir ct_bindir ct_datadir ct_demodir ct_mandir ct_tutdir ct_docdir ct_dir CANTERA_LIBDIR CANTERA_INCDIR CT_TOOLS_BIN CANTERA_BINDIR CANTERA_EXAMPLES_DIR CANTERA_DATADIR username ctroot build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os buildlib MAKE ARCHIVE SOEXT SHARED PIC LCXX_FLAGS LCXX_END_LIBS USERDIR INCL_USER_CODE KERNEL BUILD_CK LIB_DIR LAPACK_LIBRARY build_lapack BLAS_LIBRARY build_blas LOCAL_LIBS CT_SHARED_LIB BUILD_F90 PYTHON_CMD BUILD_PYTHON BUILD_MATLAB BUILD_CLIB export_name CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXX_DEPENDS F77 FFLAGS ac_ct_F77 FLIBS OS_IS_DARWIN OS_IS_WIN SHARED_CTLIB mex_ext F77_EXT CXX_EXT OBJ_EXT EXE_EXT local_math_libs math_libs SO LDSHARED LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS local_inst ctversion ct_libdir ct_incdir ct_bindir ct_datadir ct_demodir ct_templdir ct_mandir ct_tutdir ct_docdir ct_dir CANTERA_LIBDIR CANTERA_INCDIR CT_TOOLS_BIN CANTERA_BINDIR CANTERA_EXAMPLES_DIR CANTERA_DATADIR username ctroot build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os buildlib MAKE ARCHIVE SOEXT SHARED PIC LCXX_FLAGS LCXX_END_LIBS USERDIR INCL_USER_CODE KERNEL BUILD_CK LIB_DIR LAPACK_LIBRARY build_lapack BLAS_LIBRARY build_blas LOCAL_LIBS CT_SHARED_LIB BUILD_F90 PYTHON_CMD BUILD_PYTHON BUILD_MATLAB BUILD_CLIB export_name CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXX_DEPENDS F77 FFLAGS ac_ct_F77 FLIBS OS_IS_DARWIN OS_IS_WIN SHARED_CTLIB mex_ext F77_EXT CXX_EXT OBJ_EXT EXE_EXT local_math_libs math_libs SO LDSHARED LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1298,25 +1298,28 @@ echo "Cantera will be installed in ${prefix}" ctversion=${CANTERA_VERSION} + if test -z $local_inst; then ct_libdir=${prefix}/lib/cantera-${ctversion} ct_incdir=${prefix}/include/cantera ct_bindir=${prefix}/bin -ct_datadir=${prefix}/share/cantera/${ctversion}/data -ct_demodir=${prefix}/share/cantera/${ctversion}/demos -ct_tutdir=${prefix}/share/cantera/${ctversion}/tutorials -ct_docdir=${prefix}/share/cantera/${ctversion}/doc -ct_dir=${prefix}/share/cantera/${ctversion} +ct_datadir=${prefix}/cantera/${ctversion}/data +ct_demodir=${prefix}/cantera/${ctversion}/demos +ct_templdir=${prefix}/cantera/${ctversion}/templates +ct_tutdir=${prefix}/cantera/${ctversion}/tutorials +ct_docdir=${prefix}/cantera/${ctversion}/doc +ct_dir=${prefix}/cantera/${ctversion} ct_mandir=${prefix}/share/man else ct_libdir=${prefix}/lib/cantera-${ctversion} ct_incdir=${prefix}/include/cantera ct_bindir=${prefix}/bin -ct_datadir=${prefix}/share/cantera/${ctversion}/data -ct_demodir=${prefix}/share/cantera/${ctversion}/demos -ct_tutdir=${prefix}/share/cantera/${ctversion}/tutorials -ct_docdir=${prefix}/share/cantera/${ctversion}/doc -ct_dir=${prefix}/share/cantera/${ctversion} +ct_datadir=${prefix}/cantera/${ctversion}/data +ct_demodir=${prefix}/cantera/${ctversion}/demos +ct_templdir=${prefix}/cantera/${ctversion}/templates +ct_tutdir=${prefix}/cantera/${ctversion}/tutorials +ct_docdir=${prefix}/cantera/${ctversion}/doc +ct_dir=${prefix}/cantera/${ctversion} ct_mandir=${prefix}/share/man fi @@ -1330,6 +1333,7 @@ fi + CANTERA_DATADIR=$datadir/cantera/data # @@ -3079,7 +3083,7 @@ fi # Provide some information about the compiler. -echo "$as_me:3082:" \ +echo "$as_me:3086:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -3256,7 +3260,7 @@ _ACEOF # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" -(eval echo $as_me:3259: \"$ac_link\") >&5 +(eval echo $as_me:3263: \"$ac_link\") >&5 ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS @@ -3336,7 +3340,7 @@ _ACEOF # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" -(eval echo $as_me:3339: \"$ac_link\") >&5 +(eval echo $as_me:3343: \"$ac_link\") >&5 ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS @@ -3597,7 +3601,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ac_config_files="$ac_config_files ../Cantera/Makefile ../Cantera/src/Makefile ../Cantera/src/zeroD/Makefile ../Cantera/src/oneD/Makefile ../Cantera/src/converters/Makefile ../Cantera/src/transport/Makefile ../Cantera/clib/src/Makefile ../Cantera/fortran/src/Makefile ../Cantera/fortran/f77demos/f77demos.mak ../Cantera/matlab/Makefile ../Cantera/python/Makefile ../Cantera/python/setup.py ../Cantera/cxx/Makefile ../Cantera/user/Makefile ../Cantera/python/src/Makefile ../ext/lapack/Makefile ../ext/blas/Makefile ../ext/cvode/Makefile ../ext/math/Makefile ../ext/tpx/Makefile ../ext/Makefile ../ext/recipes/Makefile ../examples/Makefile ../examples/cxx/Makefile ../Makefile ../tools/Makefile ../tools/src/Makefile ../tools/src/sample.mak ../tools/src/finish_install.py ../tools/templates/f77/demo.mak ../tools/templates/cxx/demo.mak ../tools/testtools/Makefile ../data/inputs/Makefile ../test_problems/Makefile ../test_problems/cxx_ex/Makefile ../test_problems/silane_equil/Makefile ../test_problems/surfkin/Makefile ../test_problems/diamondSurf/Makefile" + ac_config_files="$ac_config_files ../Cantera/Makefile ../Cantera/src/Makefile ../Cantera/src/zeroD/Makefile ../Cantera/src/oneD/Makefile ../Cantera/src/converters/Makefile ../Cantera/src/transport/Makefile ../Cantera/clib/src/Makefile ../Cantera/fortran/src/Makefile ../Cantera/fortran/f77demos/f77demos.mak ../Cantera/matlab/Makefile ../Cantera/python/Makefile ../Cantera/python/setup.py ../Cantera/cxx/Makefile ../Cantera/user/Makefile ../Cantera/python/src/Makefile ../ext/lapack/Makefile ../ext/blas/Makefile ../ext/cvode/Makefile ../ext/math/Makefile ../ext/tpx/Makefile ../ext/Makefile ../ext/recipes/Makefile ../examples/Makefile ../examples/cxx/Makefile ../Makefile ../tools/Makefile ../tools/src/Makefile ../tools/src/sample.mak ../tools/src/finish_install.py ../tools/src/package4mac ../tools/templates/f77/demo.mak ../tools/templates/cxx/demo.mak ../tools/testtools/Makefile ../data/inputs/Makefile ../test_problems/Makefile ../test_problems/cxx_ex/Makefile ../test_problems/silane_equil/Makefile ../test_problems/surfkin/Makefile ../test_problems/diamondSurf/Makefile" test "x$prefix" = xNONE && prefix=$ac_default_prefix @@ -4098,6 +4102,7 @@ do "../tools/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../tools/src/Makefile" ;; "../tools/src/sample.mak" ) CONFIG_FILES="$CONFIG_FILES ../tools/src/sample.mak" ;; "../tools/src/finish_install.py" ) CONFIG_FILES="$CONFIG_FILES ../tools/src/finish_install.py" ;; + "../tools/src/package4mac" ) CONFIG_FILES="$CONFIG_FILES ../tools/src/package4mac" ;; "../tools/templates/f77/demo.mak" ) CONFIG_FILES="$CONFIG_FILES ../tools/templates/f77/demo.mak" ;; "../tools/templates/cxx/demo.mak" ) CONFIG_FILES="$CONFIG_FILES ../tools/templates/cxx/demo.mak" ;; "../tools/testtools/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../tools/testtools/Makefile" ;; @@ -4193,11 +4198,13 @@ s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@local_inst@,$local_inst,;t t +s,@ctversion@,$ctversion,;t t s,@ct_libdir@,$ct_libdir,;t t s,@ct_incdir@,$ct_incdir,;t t s,@ct_bindir@,$ct_bindir,;t t s,@ct_datadir@,$ct_datadir,;t t s,@ct_demodir@,$ct_demodir,;t t +s,@ct_templdir@,$ct_templdir,;t t s,@ct_mandir@,$ct_mandir,;t t s,@ct_tutdir@,$ct_tutdir,;t t s,@ct_docdir@,$ct_docdir,;t t diff --git a/config/configure.in b/config/configure.in index 939824bdc..e43fdfdf7 100755 --- a/config/configure.in +++ b/config/configure.in @@ -53,26 +53,29 @@ AC_SUBST(prefix) AC_SUBST(local_inst) ctversion=${CANTERA_VERSION} +AC_SUBST(ctversion) if test -z $local_inst; then ct_libdir=${prefix}/lib/cantera-${ctversion} ct_incdir=${prefix}/include/cantera ct_bindir=${prefix}/bin -ct_datadir=${prefix}/share/cantera/${ctversion}/data -ct_demodir=${prefix}/share/cantera/${ctversion}/demos -ct_tutdir=${prefix}/share/cantera/${ctversion}/tutorials -ct_docdir=${prefix}/share/cantera/${ctversion}/doc -ct_dir=${prefix}/share/cantera/${ctversion} +ct_datadir=${prefix}/cantera/${ctversion}/data +ct_demodir=${prefix}/cantera/${ctversion}/demos +ct_templdir=${prefix}/cantera/${ctversion}/templates +ct_tutdir=${prefix}/cantera/${ctversion}/tutorials +ct_docdir=${prefix}/cantera/${ctversion}/doc +ct_dir=${prefix}/cantera/${ctversion} ct_mandir=${prefix}/share/man else ct_libdir=${prefix}/lib/cantera-${ctversion} ct_incdir=${prefix}/include/cantera ct_bindir=${prefix}/bin -ct_datadir=${prefix}/share/cantera/${ctversion}/data -ct_demodir=${prefix}/share/cantera/${ctversion}/demos -ct_tutdir=${prefix}/share/cantera/${ctversion}/tutorials -ct_docdir=${prefix}/share/cantera/${ctversion}/doc -ct_dir=${prefix}/share/cantera/${ctversion} +ct_datadir=${prefix}/cantera/${ctversion}/data +ct_demodir=${prefix}/cantera/${ctversion}/demos +ct_templdir=${prefix}/cantera/${ctversion}/templates +ct_tutdir=${prefix}/cantera/${ctversion}/tutorials +ct_docdir=${prefix}/cantera/${ctversion}/doc +ct_dir=${prefix}/cantera/${ctversion} ct_mandir=${prefix}/share/man fi @@ -81,6 +84,7 @@ AC_SUBST(ct_incdir) AC_SUBST(ct_bindir) AC_SUBST(ct_datadir) AC_SUBST(ct_demodir) +AC_SUBST(ct_templdir) AC_SUBST(ct_mandir) AC_SUBST(ct_tutdir) AC_SUBST(ct_docdir) @@ -470,6 +474,7 @@ AC_OUTPUT(../Cantera/Makefile \ ../tools/src/Makefile \ ../tools/src/sample.mak \ ../tools/src/finish_install.py \ + ../tools/src/package4mac \ ../tools/templates/f77/demo.mak \ ../tools/templates/cxx/demo.mak \ ../tools/testtools/Makefile \ diff --git a/tools/Makefile.in b/tools/Makefile.in index 786137fcc..251758883 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -18,6 +18,7 @@ apps-install: man-install: @INSTALL@ -d @ct_mandir@/man1 @INSTALL@ man/ck2cti.1 @ct_mandir@/man1 + @INSTALL@ man/mixmaster.1 @ct_mandir@/man1 uninstall: rm -r -f @ct_mandir@/man1/ck2cti.1 @@ -36,12 +37,12 @@ depends: cd testtools; @MAKE@ depends templates-install: - @INSTALL@ -d @prefix@/cantera/templates - @INSTALL@ -d @prefix@/cantera/templates/f77 - @INSTALL@ -m 644 templates/f77/*.cpp @prefix@/cantera/templates/f77 - @INSTALL@ -m 644 templates/f77/*.f @prefix@/cantera/templates/f77 - @INSTALL@ -m 644 templates/f77/*.mak @prefix@/cantera/templates/f77 - @INSTALL@ -d @prefix@/cantera/templates/cxx - @INSTALL@ -m 644 templates/cxx/*.cpp @prefix@/cantera/templates/cxx - @INSTALL@ -m 644 templates/cxx/*.mak @prefix@/cantera/templates/cxx - chown -R @username@ @prefix@/cantera/templates \ No newline at end of file + @INSTALL@ -d @ct_dir@/templates + @INSTALL@ -d @ct_dir@/templates/f77 + @INSTALL@ -m 644 templates/f77/*.cpp @ct_dir@/templates/f77 + @INSTALL@ -m 644 templates/f77/*.f @ct_dir@/templates/f77 + @INSTALL@ -m 644 templates/f77/*.mak @ct_dir@/templates/f77 + @INSTALL@ -d @ct_dir@/templates/cxx + @INSTALL@ -m 644 templates/cxx/*.cpp @ct_dir@/templates/cxx + @INSTALL@ -m 644 templates/cxx/*.mak @ct_dir@/templates/cxx + chown -R @username@ @ct_dir@/templates \ No newline at end of file diff --git a/tools/bin/finish_install.py b/tools/bin/finish_install.py index bff9d3408..15e865718 100644 --- a/tools/bin/finish_install.py +++ b/tools/bin/finish_install.py @@ -10,9 +10,10 @@ if icyg == 0: bindir = '/usr/local/bin' libdir = '/usr/local/lib/cantera-1.5.3' hdrdir = '/usr/local/include/cantera' -demodir = '/usr/local/share/cantera/1.5.3/demos' -datadir = '/usr/local/share/cantera/1.5.3/data' -ctdir = '/usr/local/share/cantera/1.5.3' +demodir = '/usr/local/cantera/1.5.3/demos' +datadir = '/usr/local/cantera/1.5.3/data' +templdir = '/usr/local/cantera/1.5.3/templates' +ctdir = '/usr/local/cantera/1.5.3' f = open(ctdir+'/setup_cantera','w') f.write('#!/bin/sh\n') @@ -53,17 +54,30 @@ f.close() # write the script to run MixMaster f = open(bindir+'/mixmaster','w') -f.write('#!/bin/sh\n'+pycmd+"""w -c 'from MixMaster import MixMaster; MixMaster() +f.write('#!/bin/sh\n'+pycmd+"""w -c 'from MixMaster import MixMaster; MixMaster()' """) f.close() + +# write the script to copy files to build a new app +f = open(bindir+'/ctnew','w') +f.write("""#!/bin/sh +if test $1 = '-f77'; then +cp """+templdir+"""/f77/*.* . +else +cp """+templdir+"""/cxx/*.* . +fi +""") +f.close() + + try: import Cantera ctpath = Cantera.__path__[0] except: ctpath = "-" -fm = open(prefix+"/cantera/ctpath.m","w") +fm = open(ctdir+"/ctpath.m","w") fm.write("""path(path,'"""+prefix+"""/matlab/toolbox/cantera/cantera')\n""") fm.write("""path(path,'"""+prefix+"""/matlab/toolbox/cantera/cantera/1D')\n""") fm.close() @@ -85,7 +99,7 @@ File locations: Matlab tutorials """+prefix+"""/matlab/toolbox/cantera/cantera-tutorials An m-file to set the correct matlab path for Cantera - is at """+prefix+"""/cantera/ctpath.m""" + is at """+ctdir+"""/ctpath.m""" if ctpath <> "-": print """ @@ -103,14 +117,15 @@ else: ###################################################################### """ -print """ - setup script """+prefix+"""/cantera/setup_cantera +print """ + + setup script """+ctdir+"""/setup_cantera The setup script configures the environment for Cantera. It is recommended that you run this script by typing - source """+prefix+"""/cantera/setup_cantera + source """+ctdir+"""/setup_cantera before using Cantera, or else include its contents in your shell login script. diff --git a/tools/man/mixmaster.1 b/tools/man/mixmaster.1 index 91605b81f..f7b5846c6 100644 --- a/tools/man/mixmaster.1 +++ b/tools/man/mixmaster.1 @@ -1,4 +1,4 @@ -.TH "ck2cti" 1 "16 Nov 2003" "ck2cti" \" -*- nroff -*- +.TH "mixmaster" 1 "16 Nov 2003" "mixmaster" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/tools/src/finish_install.py.in b/tools/src/finish_install.py.in index 1f0356f12..0f1cfb398 100644 --- a/tools/src/finish_install.py.in +++ b/tools/src/finish_install.py.in @@ -12,6 +12,7 @@ libdir = '@ct_libdir@' hdrdir = '@ct_incdir@' demodir = '@ct_demodir@' datadir = '@ct_datadir@' +templdir = '@ct_templdir@' ctdir = '@ct_dir@' f = open(ctdir+'/setup_cantera','w') @@ -57,13 +58,26 @@ f.write('#!/bin/sh\n'+pycmd+"""w -c 'from MixMaster import MixMaster; MixMaster( """) f.close() + +# write the script to copy files to build a new app +f = open(bindir+'/ctnew','w') +f.write("""#!/bin/sh +if test $1 = '-f77'; then +cp """+templdir+"""/f77/*.* . +else +cp """+templdir+"""/cxx/*.* . +fi +""") +f.close() + + try: import Cantera ctpath = Cantera.__path__[0] except: ctpath = "-" -fm = open(prefix+"/cantera/ctpath.m","w") +fm = open(ctdir+"/ctpath.m","w") fm.write("""path(path,'"""+prefix+"""/matlab/toolbox/cantera/cantera')\n""") fm.write("""path(path,'"""+prefix+"""/matlab/toolbox/cantera/cantera/1D')\n""") fm.close() @@ -85,7 +99,7 @@ File locations: Matlab tutorials """+prefix+"""/matlab/toolbox/cantera/cantera-tutorials An m-file to set the correct matlab path for Cantera - is at """+prefix+"""/cantera/ctpath.m""" + is at """+ctdir+"""/ctpath.m""" if ctpath <> "-": print """ @@ -106,12 +120,12 @@ else: print """ - setup script """+prefix+"""/cantera/setup_cantera + setup script """+ctdir+"""/setup_cantera The setup script configures the environment for Cantera. It is recommended that you run this script by typing - source """+prefix+"""/cantera/setup_cantera + source """+ctdir+"""/setup_cantera before using Cantera, or else include its contents in your shell login script. diff --git a/tools/templates/f77/demo.mak.in b/tools/templates/f77/demo.mak.in index 6d030b2ac..954a02b35 100644 --- a/tools/templates/f77/demo.mak.in +++ b/tools/templates/f77/demo.mak.in @@ -50,10 +50,10 @@ CXX_FLAGS = @CXXFLAGS@ EXT_LIBS = @LOCAL_LIBS@ -lctcxx # the directory where the Cantera libraries are located -CANTERA_LIBDIR=@CANTERA_LIBDIR@ +CANTERA_LIBDIR=@ct_libdir@ # the directory where Cantera include files may be found. -CANTERA_INCDIR=@CANTERA_INCDIR@ +CANTERA_INCDIR=@ct_incdir@ # flags passed to the C++ compiler/linker for the linking step LCXX_FLAGS = -L$(CANTERA_LIBDIR) @CXXFLAGS@