summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjofret2009-05-14 06:45:04 +0000
committerjofret2009-05-14 06:45:04 +0000
commitf8c08a8e0ac1fdce7c97d64f7ee4bfd9e37bb6c7 (patch)
tree35e75b3391776c50972615dbe5ae5077cf6a35f4
parentb1b4a7cee593b80c5191ff2a3c50da3d0f545a24 (diff)
downloadscilab2c-f8c08a8e0ac1fdce7c97d64f7ee4bfd9e37bb6c7.tar.gz
scilab2c-f8c08a8e0ac1fdce7c97d64f7ee4bfd9e37bb6c7.tar.bz2
scilab2c-f8c08a8e0ac1fdce7c97d64f7ee4bfd9e37bb6c7.zip
only need to load SharedInfo and FileInfo once
-rw-r--r--macros/runsci2c.sci36
1 files changed, 24 insertions, 12 deletions
diff --git a/macros/runsci2c.sci b/macros/runsci2c.sci
index f34e4e3d..3a5bd0c9 100644
--- a/macros/runsci2c.sci
+++ b/macros/runsci2c.sci
@@ -52,10 +52,11 @@ RunSci2CMainDir = pwd();
[FileInfoDatFile,SharedInfoDatFile] = INIT_SCI2C(UserScilabMainFile, ...
UserSciFilesPaths, SCI2COutputPath, RunMode);
-// --- Load RunMode. ---
+// -- Load FileInfo and SharedInfo
load(SharedInfoDatFile,'SharedInfo');
+load(FileInfoDatFile,'FileInfo');
+
RunMode = SharedInfo.RunMode;
-clear ShareInfo
// --- Generation of the library structure. ---
if (RunMode == 'GenLibraryStructure' | RunMode == 'All')
@@ -90,37 +91,48 @@ end
// ---------------------------
allSources = getAllSources();
allHeaders = getAllHeaders();
+allInterfaces = getAllInterfaces();
+
mkdir(SCI2COutputPath+"/src/");
mkdir(SCI2COutputPath+"/src/c/");
mkdir(SCI2COutputPath+"/includes/");
-//pause
+mkdir(SCI2COutputPath+"/interfaces/");
+
+// -- Sources
+PrintStepInfo('Copying sources needed in ' + SCI2COutputPath + ...
+ "/src/c/", FileInfo.GeneralReport,'both');
for i = 1:size(allSources, "*")
- disp("Copying "+allSources(i)+" in "+SCI2COutputPath+"/src/c/");
+ //disp("Copying "+allSources(i)+" in "+SCI2COutputPath+"/src/c/");
copyfile(allSources(i), SCI2COutputPath+"/src/c/");
end
+
+// -- Includes
+PrintStepInfo('Copying headers needed in ' + SCI2COutputPath + ...
+ "/includes/", FileInfo.GeneralReport,'both');
for i = 1:size(allHeaders, "*")
- disp("Copying "+allHeaders(i)+" in "+SCI2COutputPath+"/includes/");
+ //disp("Copying "+allHeaders(i)+" in "+SCI2COutputPath+"/includes/");
copyfile(allHeaders(i), SCI2COutputPath+"/includes/");
end
+// -- Interfaces
+PrintStepInfo('Copying interfaces needed in ' + SCI2COutputPath + ...
+ "/interfaces/", FileInfo.GeneralReport,'both');
+for i = 1:size(allInterfaces, "*")
+ //disp("Copying "+allInterfaces(i)+" in "+SCI2COutputPath+"/interfaces/");
+ copyfile(allInterfaces(i), SCI2COutputPath+"/interfaces/");
+end
// --------------------------
// --- Generate Makefile. ---
// --------------------------
-load(FileInfoDatFile,'FileInfo');
-load(SharedInfoDatFile,'SharedInfo');
C_GenerateMakefile(FileInfo,SharedInfo);
-clear FileInfo
-clear SharedInfo
// -----------------
// --- Epilogue. ---
// -----------------
-load(FileInfoDatFile,'FileInfo');
if (RunMode == 'All' | RunMode == 'Translate')
PrintStepInfo('Translation Successfully Completed!!!',FileInfo.GeneralReport,'both');
elseif (RunMode == 'GenLibraryStructure')
PrintStepInfo('Library Structure Successfully Created!!!',FileInfo.GeneralReport,'both');
end
-clear FileInfo
-endfunction \ No newline at end of file
+endfunction