makeskel: Adds more output info in case of error and fixes compilation through Lazarus (by adding +)

git-svn-id: trunk@18219 -
This commit is contained in:
sekelsenmat 2011-08-16 13:27:35 +00:00
parent 00304a6446
commit 83b2948ec1
2 changed files with 25 additions and 22 deletions

View File

@ -1,23 +1,25 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <Version Value="9"/>
<Version Value="6"/>
<General> <General>
<Flags> <Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/> <MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/> <MainUnitHasTitleStatement Value="False"/>
<LRSInOutputDirectory Value="False"/>
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<TargetFileExt Value=""/>
<ActiveEditorIndexAtStart Value="1"/>
</General> </General>
<VersionInfo> <VersionInfo>
<ProjectVersion Value=""/>
<Language Value=""/> <Language Value=""/>
<CharSet Value=""/> <CharSet Value=""/>
<StringTable ProductVersion=""/>
</VersionInfo> </VersionInfo>
<BuildModes Count="1">
<Item1 Name="default" Default="True"/>
</BuildModes>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
<IgnoreBinaries Value="False"/> <IgnoreBinaries Value="False"/>
@ -27,6 +29,7 @@
<RunParams> <RunParams>
<local> <local>
<FormatVersion Value="1"/> <FormatVersion Value="1"/>
<CommandLineParams Value="--package=fpvectorial --input=/home/felipe/Programas/fpctrunk/packages/fpvectorial/src/fpvectorial.pas"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local> </local>
</RunParams> </RunParams>
@ -35,33 +38,25 @@
<Filename Value="makeskel.pp"/> <Filename Value="makeskel.pp"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="MakeSkel"/> <UnitName Value="MakeSkel"/>
<CursorPos X="8" Y="22"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="dglobals.pp"/> <Filename Value="dglobals.pp"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="dGlobals"/> <UnitName Value="dGlobals"/>
<CursorPos X="40" Y="311"/>
<TopLine Value="300"/>
<EditorIndex Value="1"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
</Unit1> </Unit1>
</Units> </Units>
<JumpHistory Count="1" HistoryIndex="0">
<Position1>
<Filename Value="makeskel.pp"/>
<Caret Line="22" Column="8" TopLine="1"/>
</Position1>
</JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="8"/> <Version Value="10"/>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Other> <Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>
</CompilerOptions> </CompilerOptions>

View File

@ -15,8 +15,12 @@
} }
{%RunCommand $MakeExe($(EdFile)) --package=fpvectorial --input=/home/felipe/Programas/fpctrunk/packages/fpvectorial/src/fpvectorial.pas}
program MakeSkel; program MakeSkel;
{$mode objfpc}
{$h+}
uses uses
SysUtils, Classes, Gettext, SysUtils, Classes, Gettext,
dGlobals, PasTree, PParser,PScanner; dGlobals, PasTree, PParser,PScanner;
@ -379,6 +383,7 @@ Var
Engine: TSkelEngine; Engine: TSkelEngine;
begin begin
Result:='';
Assign(f, AOutputName); Assign(f, AOutputName);
Rewrite(f); Rewrite(f);
Try Try
@ -399,7 +404,10 @@ begin
Engine.DocumentFile(F,InputFiles[I],OSTarget,CPUTarget); Engine.DocumentFile(F,InputFiles[I],OSTarget,CPUTarget);
except except
on E:Exception do on E:Exception do
begin
WriteLn('Error while documenting: '+E.message);
Result:='Error while documenting: '+E.message; Result:='Error while documenting: '+E.message;
end;
end; end;
Finally Finally
Engine.Free; Engine.Free;