summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Make.lps136
-rw-r--r--dateibeziehungen.pas90
2 files changed, 130 insertions, 96 deletions
diff --git a/Make.lps b/Make.lps
index c6ab4f8..c6d62d4 100644
--- a/Make.lps
+++ b/Make.lps
@@ -7,33 +7,33 @@
<Unit0>
<Filename Value="Make.lpr"/>
<IsPartOfProject Value="True"/>
- <TopLine Value="46"/>
- <CursorPos X="84" Y="76"/>
- <UsageCount Value="106"/>
+ <TopLine Value="48"/>
+ <CursorPos X="18" Y="31"/>
+ <UsageCount Value="108"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="Machdatei.txt"/>
<IsPartOfProject Value="True"/>
- <UsageCount Value="106"/>
+ <UsageCount Value="108"/>
<DefaultSyntaxHighlighter Value="None"/>
</Unit1>
<Unit2>
<Filename Value="tools.pas"/>
<IsPartOfProject Value="True"/>
- <EditorIndex Value="4"/>
+ <EditorIndex Value="5"/>
<TopLine Value="420"/>
<CursorPos X="18" Y="440"/>
- <UsageCount Value="85"/>
+ <UsageCount Value="87"/>
<Loaded Value="True"/>
</Unit2>
<Unit3>
<Filename Value="../units/mystringlistunit.pas"/>
<IsPartOfProject Value="True"/>
- <EditorIndex Value="2"/>
- <TopLine Value="287"/>
- <CursorPos X="14" Y="322"/>
- <UsageCount Value="82"/>
+ <EditorIndex Value="3"/>
+ <TopLine Value="655"/>
+ <CursorPos X="59" Y="664"/>
+ <UsageCount Value="84"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
@@ -42,10 +42,10 @@
<UnitName Value="dateiBeziehungen"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
- <TopLine Value="590"/>
- <CursorPos X="56" Y="623"/>
- <FoldState Value=" T3ja03B41219"/>
- <UsageCount Value="74"/>
+ <TopLine Value="584"/>
+ <CursorPos X="88" Y="587"/>
+ <FoldState Value=" T3ja03C pjYkO0B4]9ZkD0l317]B9oZ0E113]B5m20e5."/>
+ <UsageCount Value="76"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
@@ -62,10 +62,10 @@
</Unit6>
<Unit7>
<Filename Value="../units/lowlevelunit.pas"/>
- <EditorIndex Value="3"/>
+ <EditorIndex Value="4"/>
<TopLine Value="1276"/>
<CursorPos X="81" Y="1311"/>
- <UsageCount Value="20"/>
+ <UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
@@ -103,10 +103,11 @@
</Unit12>
<Unit13>
<Filename Value="../units/systemunit.pas"/>
- <EditorIndex Value="-1"/>
- <TopLine Value="228"/>
- <CursorPos Y="252"/>
- <UsageCount Value="14"/>
+ <EditorIndex Value="2"/>
+ <TopLine Value="13"/>
+ <CursorPos X="45" Y="33"/>
+ <UsageCount Value="15"/>
+ <Loaded Value="True"/>
</Unit13>
<Unit14>
<Filename Value="/usr/lib/fpc/src/packages/fcl-base/src/custapp.pp"/>
@@ -131,105 +132,126 @@
<DefaultSyntaxHighlighter Value="None"/>
</Unit16>
</Units>
- <JumpHistory Count="25" HistoryIndex="24">
+ <JumpHistory Count="30" HistoryIndex="29">
<Position1>
- <Filename Value="tools.pas"/>
+ <Filename Value="../units/mystringlistunit.pas"/>
+ <Caret Line="322" Column="14" TopLine="287"/>
</Position1>
<Position2>
- <Filename Value="tools.pas"/>
- <Caret Line="37" Column="56" TopLine="7"/>
+ <Filename Value="../units/mystringlistunit.pas"/>
+ <Caret Line="46" Column="15" TopLine="17"/>
</Position2>
<Position3>
- <Filename Value="tools.pas"/>
- <Caret Line="144" Column="16" TopLine="122"/>
+ <Filename Value="../units/mystringlistunit.pas"/>
+ <Caret Line="666" Column="53" TopLine="639"/>
</Position3>
<Position4>
- <Filename Value="tools.pas"/>
- <Caret Line="147" Column="83" TopLine="129"/>
+ <Filename Value="dateibeziehungen.pas"/>
+ <Caret Line="633" TopLine="605"/>
</Position4>
<Position5>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="878" Column="24" TopLine="865"/>
+ <Caret Line="601" Column="24" TopLine="585"/>
</Position5>
<Position6>
- <Filename Value="tools.pas"/>
- <Caret Line="141" Column="31" TopLine="133"/>
+ <Filename Value="dateibeziehungen.pas"/>
+ <Caret Line="83" Column="23" TopLine="65"/>
</Position6>
<Position7>
- <Filename Value="tools.pas"/>
- <Caret Line="36" Column="45" TopLine="18"/>
+ <Filename Value="../units/mystringlistunit.pas"/>
+ <Caret Line="47" Column="32" TopLine="32"/>
</Position7>
<Position8>
- <Filename Value="tools.pas"/>
- <Caret Line="18" Column="3"/>
+ <Filename Value="../units/mystringlistunit.pas"/>
+ <Caret Line="679" TopLine="650"/>
</Position8>
<Position9>
- <Filename Value="tools.pas"/>
- <Caret Line="37" Column="102" TopLine="36"/>
+ <Filename Value="../units/mystringlistunit.pas"/>
+ <Caret Line="670" Column="44" TopLine="652"/>
</Position9>
<Position10>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="429" Column="44" TopLine="411"/>
+ <Filename Value="Make.lpr"/>
+ <Caret Line="31" Column="18" TopLine="48"/>
</Position10>
<Position11>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="891" Column="3" TopLine="867"/>
+ <Caret Line="106" Column="28" TopLine="88"/>
</Position11>
<Position12>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1004" Column="45" TopLine="987"/>
+ <Caret Line="971" TopLine="755"/>
</Position12>
<Position13>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="854" Column="7" TopLine="836"/>
+ <Caret Line="78" Column="29" TopLine="61"/>
</Position13>
<Position14>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1005" Column="53" TopLine="981"/>
+ <Caret Line="566" Column="50" TopLine="210"/>
</Position14>
<Position15>
<Filename Value="dateibeziehungen.pas"/>
+ <Caret Line="955" TopLine="673"/>
</Position15>
<Position16>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="101" Column="33" TopLine="72"/>
</Position16>
<Position17>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="727" Column="18" TopLine="705"/>
+ <Caret Line="78" Column="29" TopLine="49"/>
</Position17>
<Position18>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1011" Column="38" TopLine="982"/>
+ <Caret Line="573" Column="38" TopLine="573"/>
</Position18>
<Position19>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="727" Column="13" TopLine="708"/>
+ <Filename Value="../units/mystringlistunit.pas"/>
+ <Caret Line="47" Column="25" TopLine="31"/>
</Position19>
<Position20>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="875" Column="22" TopLine="859"/>
+ <Filename Value="../units/systemunit.pas"/>
+ <Caret Line="329" Column="3" TopLine="295"/>
</Position20>
<Position21>
- <Filename Value="tools.pas"/>
- <Caret Line="54" Column="21" TopLine="37"/>
+ <Filename Value="../units/systemunit.pas"/>
+ <Caret Line="31" Column="38"/>
</Position21>
<Position22>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="875" Column="22" TopLine="859"/>
+ <Caret Line="599" Column="41" TopLine="574"/>
</Position22>
<Position23>
- <Filename Value="dateibeziehungen.pas"/>
- <Caret Line="717" Column="79" TopLine="693"/>
+ <Filename Value="../units/mystringlistunit.pas"/>
+ <Caret Line="47" Column="88" TopLine="32"/>
</Position23>
<Position24>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="1003" Column="117" TopLine="992"/>
+ <Caret Line="599" Column="41" TopLine="574"/>
</Position24>
<Position25>
<Filename Value="dateibeziehungen.pas"/>
- <Caret Line="599" TopLine="581"/>
+ <Caret Line="603" Column="15" TopLine="586"/>
</Position25>
+ <Position26>
+ <Filename Value="dateibeziehungen.pas"/>
+ <Caret Line="633" Column="74" TopLine="607"/>
+ </Position26>
+ <Position27>
+ <Filename Value="dateibeziehungen.pas"/>
+ <Caret Line="603" TopLine="579"/>
+ </Position27>
+ <Position28>
+ <Filename Value="dateibeziehungen.pas"/>
+ <Caret Line="608" Column="25" TopLine="593"/>
+ </Position28>
+ <Position29>
+ <Filename Value="../units/systemunit.pas"/>
+ <Caret Line="24" Column="16" TopLine="7"/>
+ </Position29>
+ <Position30>
+ <Filename Value="../units/systemunit.pas"/>
+ <Caret Line="324" Column="6" TopLine="300"/>
+ </Position30>
</JumpHistory>
</ProjectSession>
</CONFIG>
diff --git a/dateibeziehungen.pas b/dateibeziehungen.pas
index b83fd88..151eb79 100644
--- a/dateibeziehungen.pas
+++ b/dateibeziehungen.pas
@@ -565,23 +565,55 @@ end;
procedure tGenerischeAbhaengigkeit.generiereErben(var es: tExpliziteAbhaengigkeiten);
var
- i,j: longint;
- s: string;
- neuSums: tMyStringList;
+ i,j,befCnt: longint;
+ s: string;
+ neuSums: tMyStringList;
begin
neuSums:=tMyStringList.create;
for i:=0 to matchCount-1 do begin
+ befCnt:=0;
es.add(tExpliziteAbhaengigkeit.create);
for j:=0 to quellen[i].count-1 do
es.last.quellen.add(quellen[i][j]);
for j:=0 to ziele[i].count-1 do
es.last.ziele.add(ziele[i][j]);
- for j:=0 to befehleFkt.count-1 do begin
+
+ neuSums.clear;
+ for j:=0 to quellen[i].count-1 do
+ neuSums.add(escapeStringToRegex(escape(quellen[i][j].name,'$','\'),rtShell,'"/'));
+ for j:=0 to ziele[i].count-1 do
+ neuSums.add(escapeStringToRegex(escape(ziele[i][j].name,'$','\'),rtShell,'"/'));
+ neuSums.sort;
+ neuSums.uniq('-');
+ neuSums.appendTo( // Quell- und Zielsummen entfernen
+ es.last.befehle,
+ argMax,
+ 'sed "/ ',
+ '\$/d; / ',
+ '\$/d" -i "'+escape(_pruefSummenDatei,'"\','\')+'"'
+ );
+
+ neuSums.clear;
+ for j:=0 to quellen[i].count-1 do
+ neuSums.add(quellen[i][j].name);
+ neuSums.sort;
+ neuSums.uniq('-');
+ neuSums.appendTo( // Quellsummen erzeugen
+ es.last.befehle,
+ argMax,
+ 'sha512sum "',
+ '" "',
+ '" >> "'+escape(_pruefSummenDatei,'"\','\')+'"'
+ );
+
+ for j:=0 to befehleFkt.count-1 do begin // eigentliche Befehle ausführen
s:=befehleFkt[j];
- if quellErsetzung(s,rtKein,quellen[i],quellen[i].count) then
+ if quellErsetzung(s,rtKein,quellen[i],quellen[i].count) then begin
es.last.befehle.add(s);
+ inc(befCnt);
+ end;
end;
- if es.last.befehle.count=0 then
+ if befCnt=0 then
fehler(
'Keine Befehle auszuführen für explizite Abhängigkeit!'#10+
'Befehle:'#10+
@@ -589,39 +621,19 @@ begin
'Quellen:'#10+
quellen[i].toString
);
- if quellen[i].count + ziele[i].count > 0 then begin
- // sha512summen erneuern
-
- s:='sed "';
- for j:=0 to quellen[i].count-1 do
- s:=s+'/\s'+escapeStringToRegex(escape(quellen[i][j].name,'$','\'),rtShell,'"/')+'\$/d; ';
- for j:=0 to ziele[i].count-1 do
- s:=s+'/\s'+escapeStringToRegex(escape(ziele[i][j].name,'$','\'),rtShell,'"/')+'\$/d; ';
- s:=s+'" -i "'+escape(_pruefSummenDatei,'"\','\')+'"';
- es.last.befehle.insert(0,s); // _vorher_ Quellen und Ziele entfernen ...
-
- s:='sha512sum';
- neuSums.clear;
- for j:=0 to quellen[i].count-1 do
- neuSums.add(quellen[i][j].name);
- neuSums.sort;
- neuSums.uniq('-');
- for j:=0 to neuSums.count-1 do
- s:=s+' "'+escape(neuSums[j],'"\','\')+'"';
- s:=s+' >> "'+escape(_pruefSummenDatei,'"\','\')+'"';
- es.last.befehle.insert(1,s); // ... und Quellen aktualisieren
-
- s:='sha512sum';
- neuSums.clear;
- for j:=0 to ziele[i].count-1 do
- neuSums.add(ziele[i][j].name);
- neuSums.sort;
- neuSums.uniq('-');
- for j:=0 to neuSums.count-1 do
- s:=s+' "'+escape(neuSums[j],'"\','\')+'"';
- s:=s+' >> "'+escape(_pruefSummenDatei,'"\','\')+'"';
- es.last.befehle.add(s); // _nachher_ Ziele aktualisieren
- end;
+
+ neuSums.clear;
+ for j:=0 to ziele[i].count-1 do
+ neuSums.add(ziele[i][j].name);
+ neuSums.sort;
+ neuSums.uniq('-');
+ neuSums.appendTo( // Zielsummen erzeugen
+ es.last.befehle,
+ argMax,
+ 'sha512sum "',
+ '" "',
+ '" >> "'+escape(_pruefSummenDatei,'"\','\')+'"'
+ );
end;
neuSums.free;
end;