Mercurial > hg > octave-lyh
comparison scripts/pkg/pkg.m @ 5976:b1a1c10bf2fd
[project @ 2006-08-30 20:02:52 by dbateman]
author | dbateman |
---|---|
date | Wed, 30 Aug 2006 20:02:52 +0000 |
parents | 51684d05b4bf |
children | f1375e3f3b97 |
comparison
equal
deleted
inserted
replaced
5975:e64059303a6f | 5976:b1a1c10bf2fd |
---|---|
549 endfunction | 549 endfunction |
550 | 550 |
551 function create_pkgadddel (desc, packdir, nm) | 551 function create_pkgadddel (desc, packdir, nm) |
552 pkg = [desc.dir "/" nm]; | 552 pkg = [desc.dir "/" nm]; |
553 fid = fopen(pkg, "wt"); | 553 fid = fopen(pkg, "wt"); |
554 | |
554 if (fid >= 0) | 555 if (fid >= 0) |
555 ## Search all dot-m files for PKG commands | 556 ## Search all dot-m files for PKG commands |
556 lst = dir ([packdir "inst/*.m"]); | 557 lst = dir ([packdir "inst/*.m"]); |
557 for i=1:length(lst) | 558 for i=1:length(lst) |
558 nm = lst(i).name; | 559 nam = [packdir "inst/" lst(i).name]; |
559 fwrite (fid, extract_pkg (nm, ['^[#%][#%]* *' nm ': *(.*)$'])); | 560 fwrite (fid, extract_pkg (nam, ['^[#%][#%]* *' nm ': *(.*)$'])); |
560 endfor | 561 endfor |
561 | 562 |
562 ## Search all C++ source files for PKG commands | 563 ## Search all C++ source files for PKG commands |
563 lst = dir ([packdir "src/*.cc"]); | 564 lst = dir ([packdir "src/*.cc"]); |
564 for i=1:length(lst) | 565 for i=1:length(lst) |
565 nm = lst(i).name; | 566 nam = [packdir "src/" lst(i).name]; |
566 fwrite (fid, extract_pkg (nm, ['^//* *' nm ': *(.*)$'])); | 567 fwrite (fid, extract_pkg (nam, ['^//* *' nm ': *(.*)$'])); |
567 fwrite (fid, extract_pkg (nm, ['^/\** *' nm ': *(.*) *\*/$'])); | 568 fwrite (fid, extract_pkg (nam, ['^/\** *' nm ': *(.*) *\*/$'])); |
568 endfor | 569 endfor |
569 | 570 |
570 ## Add developer included PKG commands | 571 ## Add developer included PKG commands |
571 if (exist([packdir nm],"file")) | 572 if (exist([packdir nm],"file")) |
572 fid2 = fopen([packdir nm],"rt"); | 573 fid2 = fopen([packdir nm],"rt"); |