purge_modnum(flag)
Add here a paragraph of the function description. Other paragraph can be added
Add here a paragraph of the function description
Add here scilab instructions and comments
//purge_modnum //Entrée flag 'clean' pour enlever les fichiers objets (.obj,.o) // 'distclean' pour enlever // les fichiers objets (.obj .o) // les fichiers binaire .bin // les librairies (name lib .so .dll .lib .def) // les palettes (*.cosf) //WARNING : i don't find a way to delete dll in windob //because protected function []=purge_modnum(flag) //set here directories to be explored (in MODNUM) macros_dir = '/macros/'+... ['scicos_util'; 'signal'; 'misc'; 'generate_doc'; 'gen_doc_util'; 'find_file'; 'xmltotek' 'build_util'; 'scicos_blocks/Communication'; 'scicos_blocks/NonLinear'; 'scicos_blocks/Pll'; 'scicos_blocks/Skins'; 'scicos_blocks/Sources'; 'scicos_blocks/Tools']; routines_dir = '/routines/'+... ['mod_num_lib'; 'scicos']; pal_dir = ['/macros/scicos_blocks'] if MSDOS then macros_dir=pathconvert(macros_dir,%f,%t,'w'); routines_dir=pathconvert(routines_dir,%f,%t,'w'); pal_dir=pathconvert(pal_dir,%f,%t,'w'); rm_cmd='del /F '; obj_ext='*.obj'; lib_ext='*.dll *.exp *.lib *.def'; else rm_cmd="rm -f "; obj_ext='*.o' lib_ext='*.so' end select flag case 'clean' then cur_rep=pwd(); for i=1:size(routines_dir,'*') chdir(MODNUM+routines_dir(i)); tt='unix_g(rm_cmd+obj_ext)'; ierr=execstr(tt,'errcatch'); end chdir(cur_rep); case 'distclean' then cur_rep=pwd(); for i=1:size(macros_dir,'*') chdir(MODNUM+macros_dir(i)); tt='unix_g(rm_cmd+''*.bin lib names'')'; ierr=execstr(tt,'errcatch'); end for i=1:size(routines_dir,'*') chdir(MODNUM+routines_dir(i)); tt='unix_g(rm_cmd+obj_ext)'; ierr=execstr(tt,'errcatch'); tt='unix_g(rm_cmd+lib_ext)'; ierr=execstr(tt,'errcatch'); end for i=1:size(pal_dir,'*') chdir(MODNUM+pal_dir(i)); tt='unix_g(rm_cmd+''*.cosf'')'; ierr=execstr(tt,'errcatch'); end chdir(MODNUM); tt='unix_g(rm_cmd+''loader.sce'')'; ierr=execstr(tt,'errcatch'); chdir(cur_rep); else printf("Invalid flag\n"); end endfunction