mailr8817 - /branches/relax_disp/sconstruct


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by sebastien . morin . 1 on February 17, 2009 - 19:01:
Author: semor
Date: Tue Feb 17 19:01:26 2009
New Revision: 8817

URL: http://svn.gna.org/viewcvs/relax?rev=8817&view=rev
Log:
Grouped together the compilation of C modules for both relaxation curve 
fitting and dispersion.

This is as proposed in posts at:
https://mail.gna.org/public/relax-devel/2009-02/msg00007.html
(Message-id: <7f080ed10902170918l1dd302b5q744ec9ecdc570e1b@xxxxxxxxxxxxxx>)
and
https://mail.gna.org/public/relax-devel/2009-02/msg00008.html
(Message-id: <7f080ed10902170921w635fe002m3ef0816d7e4f9d79@xxxxxxxxxxxxxx>



Modified:
    branches/relax_disp/sconstruct

Modified: branches/relax_disp/sconstruct
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/sconstruct?rev=8817&r1=8816&r2=8817&view=diff
==============================================================================
--- branches/relax_disp/sconstruct (original)
+++ branches/relax_disp/sconstruct Tue Feb 17 19:01:26 2009
@@ -174,9 +174,9 @@
         # C module compilation.
         #######################
 
-        # Setup the rules for building the relaxation curve fitting C 
modules (and set it as the default).
-        self.relax_fit()
-        Default(self.relax_fit_object)
+        # Setup the rules for building the C modules (and set it as the 
default).
+        self.compile()
+        Default(self.compile_object)
 
 
 
@@ -210,7 +210,7 @@
         binary_dist_env = Environment(BUILDERS={'dummy' : 
Builder(action=self.dummy)})
         binary_dist_env.dummy(target='binary_dist', source=None)
         binary_dist_env.Depends('binary_dist', 'version_check')           # 
First check the program version number.
-        binary_dist_env.Depends('binary_dist', self.relax_fit_object)     # 
Compile the C code.
+        binary_dist_env.Depends('binary_dist', self.compile_object)     # 
Compile the C code.
         binary_dist_env.Depends('binary_dist', 'manual_clean_nodeps')     # 
Clean up the temporary manual files.
         binary_dist_env.Depends('binary_dist', 'clean')                   # 
Then clean up all other temporary files.
         binary_dist_env.Depends('binary_dist', 'package_bin')             # 
Package the binary distribution.
@@ -463,15 +463,17 @@
         Help(string)
 
 
-    def relax_fit(self):
-        """Function for setting up scons for building the relaxation curve 
fitting C modules."""
+    def compile(self):
+        """Function for setting up scons for building the C modules."""
 
         # The directory.
         dir = 'maths_fns'
 
         # File names.
         files = ['c_chi2.c',
+                 'dispersion.c',
                  'exponential.c',
+                 'relax_disp.c',
                  'relax_fit.c']
 
         # Construct the python include path (for Python.h).
@@ -487,7 +489,7 @@
         else:
             cflags = '-I' + py_include_fullpath + ' -I' + numpy_path
 
-        # Relaxation curve fitting build environment.
+        # Build environment.
         env = Environment()
 
         # Python library path.
@@ -509,13 +511,14 @@
         if SYSTEM == 'Windows':
             suffix = '.pyd'
 
-        # Loop over the relaxation curve fitting files.
+        # Loop over the files.
         nodes = []
         for file in files:
             nodes.append(env.SharedObject(dir + path.sep + file, 
CCFLAGS=cflags))
 
-        # Build the relaxation curve fitting module.
-        self.relax_fit_object = env.SharedLibrary(target=dir + path.sep + 
'relax_fit', source=nodes, SHLIBPREFIX=prefix, SHLIBSUFFIX=suffix)
+        # Build the C modules.
+        self.compile_object = env.SharedLibrary(target=dir + path.sep + 
'relax_fit', source=nodes, SHLIBPREFIX=prefix, SHLIBSUFFIX=suffix)
+        self.compile_object.append(env.SharedLibrary(target=dir + path.sep + 
'relax_disp', source=nodes, SHLIBPREFIX=prefix, SHLIBSUFFIX=suffix))
 
         # Print out string returning function.
         def print_string(target, source, env):
@@ -523,7 +526,8 @@
             string = string + "###########################\n"
             string = string + "# Compiling the C modules #\n"
             string = string + "###########################\n\n\n"
-            string = string + "Building the relaxation curve fitting module 
" + `str(self.relax_fit_object[0])` + "\n"
+            string = string + "Building the relaxation curve fitting module 
" + `str(self.compile_object[0])` + "\n"
+            string = string + "Building the relaxation dispersion module " + 
`str(self.compile_object[1])` + "\n"
             return string
 
         # Add the print out as an action to take before constructing the 
first object.




Related Messages


Powered by MHonArc, Updated Tue Feb 17 19:20:04 2009