From 6d86ed36a5c5c46c21b6136614de859277218098 Mon Sep 17 00:00:00 2001 From: pmarecha Date: Thu, 24 Jun 2010 08:07:11 +0000 Subject: Remove useless chdir(s) --- scilab2c/macros/buildmacros.sce | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/scilab2c/macros/buildmacros.sce b/scilab2c/macros/buildmacros.sce index dde02652..41e3ace0 100644 --- a/scilab2c/macros/buildmacros.sce +++ b/scilab2c/macros/buildmacros.sce @@ -1,27 +1,22 @@ -// ==================================================================== -// Allan CORNET -// Simon LIPP -// INRIA 2008 // This file is released into the public domain -// ==================================================================== + Directories = [ "ASTManagement", ... - "CCodeGeneration", ... - "ErrorMessages", ... - "findDeps", ... - "FunctionAnnotation", ... - "FunctionList", ... - "GeneralFunctions", ... - "SymbolTable", ... - "ToolInitialization" ]; + "CCodeGeneration", ... + "ErrorMessages", ... + "findDeps", ... + "FunctionAnnotation", ... + "FunctionList", ... + "GeneralFunctions", ... + "SymbolTable", ... + "ToolInitialization" ]; -current_path_buildmacros = get_absolute_file_path('buildmacros.sce'); +current_path_buildmacros = get_absolute_file_path("buildmacros.sce"); for K=1:size(Directories,"*") - if isdir( current_path_buildmacros + filesep() + Directories(K) ) then - chdir( current_path_buildmacros + filesep() + Directories(K) ); - exec("buildmacros.sce"); - chdir(current_path_buildmacros); + myfile = current_path_buildmacros + filesep() + Directories(K) + filesep() + "buildmacros.sce"; + if isfile(myfile) then + exec(myfile); end end -- cgit