Home > atmlab > arts > arts_autoset_includes.m

arts_autoset_includes

PURPOSE ^

ARTS_AUTOSET_INCLUDES Sets ARTS_INCLUDES to match ARTS_PATH

SYNOPSIS ^

function arts_autoset_includes

DESCRIPTION ^

 ARTS_AUTOSET_INCLUDES   Sets ARTS_INCLUDES to match ARTS_PATH

    This function sets atmlab('ARTS_INCLUDES') based on atmlab('ARTS_PATH'),
    to ensure consistency between arts version and include files used.

 FORMAT   arts_autoset_includes

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

arts_autoset_includes.m

SOURCE CODE ^

0001 % ARTS_AUTOSET_INCLUDES   Sets ARTS_INCLUDES to match ARTS_PATH
0002 %
0003 %    This function sets atmlab('ARTS_INCLUDES') based on atmlab('ARTS_PATH'),
0004 %    to ensure consistency between arts version and include files used.
0005 %
0006 % FORMAT   arts_autoset_includes
0007 
0008 % 2014-05-21   Created by Patrick Eriksson.
0009 
0010 function arts_autoset_includes
0011 
0012 p = atmlab( 'ARTS_PATH' );
0013 
0014 if isnan(p) | isempty(p) 
0015   error( 'atmlab(''ARTS_PATH'') gives NaN or [].' );
0016 end
0017 if exist(p) ~= 2
0018   error( 'atmlab(''ARTS_PATH'') returns an invalid path.' );
0019 end
0020 
0021 artsdir = fileparts( fileparts( fileparts( p ) ) );
0022 
0023 atmlab( 'ARTS_INCLUDES', fullfile( artsdir, 'controlfiles', 'general') );

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005