Jed Brown committed 144a5b5

config: only define DATAFILESPATH for non-null value

Adding DATAFILESPATH to ones environment is a reasonable way to allow
the tests to run automatically. This was suppressed by adding an empty
definition to $PETSC_ARCH/conf/petscvariables, requiring one to invoke
make with DATAFILESPATH=$DATAFILESPATH or some equivalent. If we just
don't write empty values, the make variable inherits the environment.
So the priority is now:

1. explicit parameter passed to make

2. explicit DATAFILESPATH argument passed to configure

3. other static locations like /home/petsc/datafiles that are searched
at configure time (maybe these should be removed?)

4. user's environment when invoking make

Comments (0)

Files changed (1)


       self.datafilespath = os.path.join('/home','petsc','datafiles')
     elif os.path.isdir(os.path.join(self.petscdir.dir, '..', 'datafiles')) &  os.path.isdir(os.path.join(self.petscdir.dir, '..', 'datafiles', 'matrices')):
       self.datafilespath = os.path.join(self.petscdir.dir, '..', 'datafiles')
-    self.addMakeMacro('DATAFILESPATH',self.datafilespath)
+    if self.datafilespath is not None:
+      self.addMakeMacro('DATAFILESPATH',self.datafilespath)
   def configure(self):