diff options
author | Erich Eckner <git@eckner.net> | 2017-10-09 09:38:24 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-10-09 09:38:24 +0200 |
commit | edbca7ea38a7900009950767f020c4c8e9316e20 (patch) | |
tree | 8a1ce07ffe678db7452a96395c13b9aa1dfbc592 | |
parent | a7842fd8a3ecac1ae449b9362336a4b56977c4b0 (diff) | |
download | Make-edbca7ea38a7900009950767f020c4c8e9316e20.tar.xz |
zielFkt: entferne alle ":" vom Ende, expandiere "*" wie von der Manpage versprochen
-rw-r--r-- | Make.lpi | 7 | ||||
-rw-r--r-- | Make.lps | 100 | ||||
-rw-r--r-- | dateibeziehungen.pas | 48 |
3 files changed, 89 insertions, 66 deletions
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="10"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> @@ -32,6 +32,11 @@ <LaunchingApplication PathPlusParams="/usr/bin/screen -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> </local> </RunParams> + <RequiredPackages Count="1"> + <Item1> + <PackageName Value="LCLBase"/> + </Item1> + </RequiredPackages> <Units Count="5"> <Unit0> <Filename Value="Make.lpr"/> @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectSession> - <Version Value="9"/> + <Version Value="10"/> <BuildModes Active="Default"/> <Units Count="17"> <Unit0> <Filename Value="Make.lpr"/> <IsPartOfProject Value="True"/> - <TopLine Value="32"/> - <CursorPos Y="26"/> + <TopLine Value="25"/> + <CursorPos X="39" Y="51"/> <UsageCount Value="87"/> <Loaded Value="True"/> </Unit0> @@ -21,21 +21,20 @@ <Unit2> <Filename Value="tools.pas"/> <IsPartOfProject Value="True"/> - <EditorIndex Value="2"/> + <EditorIndex Value="4"/> <TopLine Value="51"/> <CursorPos X="32" Y="409"/> - <FoldState Value=" T3iF03B pibjN0K1 pj4jS0D4[95W07n"/> <UsageCount Value="66"/> <Loaded Value="True"/> </Unit2> <Unit3> <Filename Value="../units/mystringlistunit.pas"/> <IsPartOfProject Value="True"/> - <EditorIndex Value="-1"/> - <TopLine Value="83"/> - <CursorPos Y="221"/> - <FoldState Value=" T3i803718 pialE0E116I"/> + <EditorIndex Value="2"/> + <TopLine Value="451"/> + <CursorPos X="36" Y="369"/> <UsageCount Value="63"/> + <Loaded Value="True"/> </Unit3> <Unit4> <Filename Value="dateibeziehungen.pas"/> @@ -43,9 +42,9 @@ <UnitName Value="dateiBeziehungen"/> <IsVisibleTab Value="True"/> <EditorIndex Value="1"/> - <TopLine Value="1011"/> - <CursorPos X="58" Y="1031"/> - <FoldState Value=" T3k103C pjYkO0A4]9Tk60n3]97kL0P8]91k5071]9EI042 piel80G114*"/> + <TopLine Value="419"/> + <CursorPos Y="450"/> + <FoldState Value=" T3k103C2322 pigrM0P8 pj1k5070131]Mk7pG033%"/> <UsageCount Value="55"/> <Loaded Value="True"/> </Unit4> @@ -63,10 +62,11 @@ </Unit6> <Unit7> <Filename Value="../units/lowlevelunit.pas"/> - <EditorIndex Value="-1"/> - <TopLine Value="592"/> - <CursorPos X="24" Y="616"/> + <EditorIndex Value="3"/> + <TopLine Value="857"/> + <CursorPos X="18" Y="862"/> <UsageCount Value="10"/> + <Loaded Value="True"/> </Unit7> <Unit8> <Filename Value="/usr/lib/fpc/src/rtl/objpas/sysutils/datih.inc"/> @@ -134,122 +134,122 @@ <JumpHistory Count="30" HistoryIndex="29"> <Position1> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="636" Column="12" TopLine="603"/> + <Caret Line="458" Column="25" TopLine="430"/> </Position1> <Position2> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="637" Column="10" TopLine="604"/> + <Caret Line="463" Column="25" TopLine="435"/> </Position2> <Position3> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="672" Column="22" TopLine="616"/> + <Caret Line="476" Column="44" TopLine="447"/> </Position3> <Position4> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="673" Column="15" TopLine="617"/> + <Caret Line="72" Column="13" TopLine="54"/> </Position4> <Position5> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="674" Column="14" TopLine="618"/> + <Caret Line="289" Column="11" TopLine="150"/> </Position5> <Position6> <Filename Value="dateibeziehungen.pas"/> + <Caret Line="309" Column="11" TopLine="219"/> </Position6> <Position7> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="90" TopLine="56"/> + <Caret Line="475" Column="23" TopLine="446"/> </Position7> <Position8> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="292" TopLine="219"/> + <Caret Line="476" Column="47" TopLine="447"/> </Position8> <Position9> - <Filename Value="dateibeziehungen.pas"/> - <Caret Line="311" TopLine="291"/> + <Filename Value="../units/lowlevelunit.pas"/> + <Caret Line="616" Column="24" TopLine="592"/> </Position9> <Position10> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="471" TopLine="403"/> + <Caret Line="755" TopLine="728"/> </Position10> <Position11> - <Filename Value="dateibeziehungen.pas"/> - <Caret Line="560" TopLine="471"/> + <Filename Value="../units/mystringlistunit.pas"/> + <Caret Line="40" Column="26" TopLine="25"/> </Position11> <Position12> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="588" TopLine="568"/> + <Caret Line="801" Column="20" TopLine="775"/> </Position12> <Position13> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="595" TopLine="575"/> + <Caret Line="72" Column="13" TopLine="54"/> </Position13> <Position14> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="625" TopLine="598"/> + <Caret Line="289" Column="11" TopLine="150"/> </Position14> <Position15> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="928" Column="30" TopLine="908"/> + <Caret Line="309" Column="11" TopLine="219"/> </Position15> <Position16> - <Filename Value="tools.pas"/> - <Caret Line="124" TopLine="45"/> + <Filename Value="dateibeziehungen.pas"/> + <Caret Line="475" Column="23" TopLine="446"/> </Position16> <Position17> - <Filename Value="tools.pas"/> - <Caret Line="112" Column="28" TopLine="88"/> + <Filename Value="dateibeziehungen.pas"/> + <Caret Line="476" Column="47" TopLine="447"/> </Position17> <Position18> - <Filename Value="tools.pas"/> - <Caret Line="32" Column="41" TopLine="12"/> + <Filename Value="dateibeziehungen.pas"/> + <Caret Line="801" Column="22" TopLine="782"/> </Position18> <Position19> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="116" Column="29" TopLine="98"/> </Position19> <Position20> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="952" Column="30" TopLine="687"/> + <Caret Line="72" Column="13" TopLine="43"/> </Position20> <Position21> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="388" Column="80" TopLine="349"/> + <Caret Line="289" Column="11" TopLine="150"/> </Position21> <Position22> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="408" Column="22" TopLine="379"/> + <Caret Line="309" Column="11" TopLine="219"/> </Position22> <Position23> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="738" Column="65" TopLine="685"/> + <Caret Line="476" Column="13" TopLine="446"/> </Position23> <Position24> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="739" Column="8" TopLine="719"/> + <Caret Line="66" Column="30" TopLine="48"/> </Position24> <Position25> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="726" Column="44" TopLine="598"/> + <Caret Line="419" Column="90" TopLine="315"/> </Position25> <Position26> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="739" Column="9" TopLine="660"/> + <Caret Line="66" Column="72" TopLine="48"/> </Position26> <Position27> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="783" Column="19" TopLine="751"/> + <Caret Line="419" Column="93" TopLine="294"/> </Position27> <Position28> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="333" Column="35" TopLine="317"/> + <Caret Line="428" Column="20" TopLine="322"/> </Position28> <Position29> - <Filename Value="dateibeziehungen.pas"/> - <Caret Line="400" Column="21" TopLine="378"/> + <Filename Value="../units/lowlevelunit.pas"/> + <Caret Line="107" Column="18" TopLine="89"/> </Position29> <Position30> <Filename Value="dateibeziehungen.pas"/> - <Caret Line="401" Column="13" TopLine="378"/> + <Caret Line="446" Column="16" TopLine="418"/> </Position30> </JumpHistory> </ProjectSession> diff --git a/dateibeziehungen.pas b/dateibeziehungen.pas index e362cc4..98f0735 100644 --- a/dateibeziehungen.pas +++ b/dateibeziehungen.pas @@ -421,23 +421,37 @@ var i,ebene,ende: longint; s,t,u: string; wasda: boolean; + sR: tSearchRec; begin result:=false; if pos('{',zielFkt)=0 then begin if not quellersetzung(zielFkt,quellen,quellen.count) then exit; - zielFkt:=unescape(zielFkt); - wasda:=false; - for i:=0 to _dats.count-1 do - if zielFkt=_dats[i].name then begin - wasda:=true; + if pos('*',zielFkt)=0 then begin + zielFkt:=unescape(zielFkt); + wasda:=false; + for i:=0 to _dats.count-1 do + if zielFkt=_dats[i].name then begin + wasda:=true; + ziele.add(_dats[i]); + end; + if not wasda then begin + result:=true; + _dats.add(tDateiMitDatum.create); + _dats.last.name:=zielFkt; + _dats.last.aktuell:=aNichtVorhanden; ziele.add(_dats[i]); end; - if not wasda then begin - result:=true; - _dats.add(tDateiMitDatum.create); - _dats.last.name:=zielFkt; - _dats.last.aktuell:=aNichtVorhanden; - ziele.add(_dats[i]); + end + else begin + i:=findFirst(zielFkt,$3f,sR); + while i=0 do begin + if not zieleHinzufuegen(ziele,quellen,extractFileDir(zielFkt)+'/'+sR.name) then begin + findClose(sR); + exit; + end; + i:=findNext(sR); + end; + findClose(sR); end; end else begin @@ -712,7 +726,7 @@ end; function tMach.liesMachDatei: boolean; var f: tMyStringList; - s: string; + s,t: string; na: tGenerischeAbhaengigkeit; rek: boolean; posi: longint; @@ -753,7 +767,7 @@ begin // eine zu überwachende Datei wasIst:=ztSuche; - if wasIst in [ztZiel,ztBefehl] then + if wasIst in [ztBefehl] then delete(s,length(s),1); if (wasWar=ztBefehl) and (wasIst<>ztBefehl) then begin @@ -794,8 +808,12 @@ begin na.befehleFkt.add(s); end; ztZiel: - while s<>'' do - na.zieleFkt.add(erstesArgument(s)); + while s<>'' do begin + t:=erstesArgument(s); + if rightStr(t,1)=':' then + delete(t,length(t),1); + na.zieleFkt.add(t); + end; ztQuelle: begin setlength(na.quellenREs,length(na.quellenREs)+1); na.quellenREs[length(na.quellenREs)-1]:=s; |