summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2014-09-12 12:08:13 +0200
committerErich Eckner <git@eckner.net>2014-09-12 12:08:13 +0200
commit5994d8d97ca8f83b689d5ce8efe910eb906b2602 (patch)
tree9fd2da717b68ffdd1c1793c1293720e18fe94b99
parent396180c5d4cc28dbd81cea1981c515345383fd1f (diff)
downloadMake-5994d8d97ca8f83b689d5ce8efe910eb906b2602.tar.xz
"%basedir{n}" und "%num'test1'" eingefügt
-rwxr-xr-xMakebin1355061 -> 1359741 bytes
-rw-r--r--Make.lpi2
-rw-r--r--Make.lpr51
-rw-r--r--Make.lps71
4 files changed, 85 insertions, 39 deletions
diff --git a/Make b/Make
index 1d2f907..5151bd0 100755
--- a/Make
+++ b/Make
Binary files differ
diff --git a/Make.lpi b/Make.lpi
index e5786fe..9c353cd 100644
--- a/Make.lpi
+++ b/Make.lpi
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
diff --git a/Make.lpr b/Make.lpr
index 942f568..d8769e6 100644
--- a/Make.lpr
+++ b/Make.lpr
@@ -211,8 +211,9 @@ begin
fin:=s[length(s)]=';';
if fin then delete(s,length(s),1);
beg:=not (s[1] in [' ',#9]);
- if (notQuotedPos(':',s)>0) xor beg then begin
+ if (notQuotedPos(':',s)=0) and beg then begin
closefile(f);
+ writeln('In der Quell-Ziel-Zuordnung muss ein (unzitierter) Doppelpunkt auftauchen!');
exit;
end;
if beg then begin
@@ -285,8 +286,8 @@ begin
end;
function Quellersetzung(var worin: string; Quelle: string): boolean;
-var s: string;
- i: integer;
+var s,t: string;
+ i,a,e: integer;
begin
result:=false;
while pos('%nurmit''',worin)>0 do begin
@@ -321,6 +322,29 @@ begin
end;
while pos('%basename',worin)>0 do
worin:=copy(worin,1,pos('%basename',worin)-1)+s+copy(worin,pos('%basename',worin)+9,length(worin));
+ while pos('%basedir(',worin)>0 do begin
+ a:=pos('%basedir(',worin);
+ s:=copy(worin,1,a-1);
+ while (a<=length(worin)) and (worin[a]<>'(') do
+ inc(a);
+ e:=a;
+ while (e<=length(worin)) and (worin[e]<>')') do
+ inc(e);
+ i:=strtoint(copy(worin,a+1,e-a-1));
+ if (e<length(worin)) and (worin[e+1]='/') then
+ inc(e);
+ t:=extractfilepath(Quelle);
+ a:=length(t);
+ while i>0 do begin
+ while (a>0) and (t[a]='/') do
+ dec(a);
+ while (a>0) and (t[a]<>'/') do
+ dec(a);
+ dec(i);
+ end;
+ delete(t,1,a);
+ worin:=s+t+copy(worin,e+1,length(worin));
+ end;
s:=extractfilepath(Quelle);
while pos('%basedir/',worin)>0 do
worin:=copy(worin,1,pos('%basedir/',worin)-1)+s+copy(worin,pos('%basedir/',worin)+9,length(worin));
@@ -330,6 +354,27 @@ begin
worin:=copy(worin,1,pos('%BASEDIR/',worin)-1)+extractfilepath(inputfile)+copy(worin,pos('%BASEDIR/',worin)+9,length(worin));
while pos('%BASEDIR',worin)>0 do
worin:=copy(worin,1,pos('%BASEDIR',worin)-1)+extractfilepath(inputfile)+copy(worin,pos('%BASEDIR',worin)+8,length(worin));
+ while pos('%num''',worin)>0 do begin
+ a:=pos('%num''',worin);
+ e:=a;
+ while (e<=length(worin)) and (worin[e]<>'''') do
+ inc(e);
+ inc(e);
+ while (e<=length(worin)) and (worin[e]<>'''') do
+ inc(e);
+ s:=copy(worin,a,e-a-1);
+ for i:=length(s) downto 1 do
+ if s[i] in ['0'..'9'] then
+ break
+ else
+ delete(s,i,1);
+ for i:=length(s) downto 1 do
+ if not (s[i] in ['0'..'9']) then begin
+ delete(s,1,i);
+ break;
+ end;
+ worin:=copy(worin,1,a-1)+s+copy(worin,e+1,length(worin));
+ end;
end;
function bashMatch(was,worauf: string): boolean;
diff --git a/Make.lps b/Make.lps
index e675069..c7bb64c 100644
--- a/Make.lps
+++ b/Make.lps
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectSession>
<Version Value="9"/>
@@ -11,9 +11,9 @@
<IsVisibleTab Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
- <TopLine Value="194"/>
- <CursorPos X="24" Y="221"/>
- <UsageCount Value="27"/>
+ <TopLine Value="637"/>
+ <CursorPos X="60" Y="658"/>
+ <UsageCount Value="30"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
@@ -22,7 +22,7 @@
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
- <UsageCount Value="27"/>
+ <UsageCount Value="30"/>
<DefaultSyntaxHighlighter Value="None"/>
</Unit1>
<Unit2>
@@ -40,124 +40,125 @@
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="Make.lpr"/>
- <Caret Line="235" Column="19" TopLine="202"/>
+ <Caret Line="82" Column="33" TopLine="48"/>
</Position1>
<Position2>
<Filename Value="Make.lpr"/>
- <Caret Line="433" Column="62" TopLine="399"/>
+ <Caret Line="96" Column="10" TopLine="62"/>
</Position2>
<Position3>
<Filename Value="Make.lpr"/>
- <Caret Line="444" Column="40" TopLine="411"/>
+ <Caret Line="221" Column="24" TopLine="22"/>
</Position3>
<Position4>
<Filename Value="Make.lpr"/>
- <Caret Line="445" Column="33" TopLine="412"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
</Position4>
<Position5>
<Filename Value="Make.lpr"/>
- <Caret Line="447" Column="54" TopLine="414"/>
+ <Caret Line="287" Column="24" TopLine="278"/>
</Position5>
<Position6>
<Filename Value="Make.lpr"/>
- <Caret Line="448" Column="42" TopLine="415"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
</Position6>
<Position7>
<Filename Value="Make.lpr"/>
- <Caret Line="471" Column="42" TopLine="438"/>
+ <Caret Line="287" Column="24" TopLine="252"/>
</Position7>
<Position8>
<Filename Value="Make.lpr"/>
- <Caret Line="472" Column="42" TopLine="439"/>
+ <Caret Line="354" Column="26" TopLine="343"/>
</Position8>
<Position9>
<Filename Value="Make.lpr"/>
- <Caret Line="473" Column="35" TopLine="440"/>
+ <Caret Line="454" Column="32" TopLine="401"/>
</Position9>
<Position10>
<Filename Value="Make.lpr"/>
- <Caret Line="475" Column="46" TopLine="442"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
</Position10>
<Position11>
<Filename Value="Make.lpr"/>
- <Caret Line="477" Column="45" TopLine="444"/>
+ <Caret Line="217" Column="12" TopLine="190"/>
</Position11>
<Position12>
<Filename Value="Make.lpr"/>
- <Caret Line="478" Column="39" TopLine="445"/>
+ <Caret Line="107" Column="28" TopLine="44"/>
</Position12>
<Position13>
<Filename Value="Make.lpr"/>
- <Caret Line="525" Column="12" TopLine="491"/>
+ <Caret Line="154" Column="11" TopLine="119"/>
</Position13>
<Position14>
<Filename Value="Make.lpr"/>
- <Caret Line="527" Column="10" TopLine="493"/>
+ <Caret Line="158" Column="11" TopLine="123"/>
</Position14>
<Position15>
<Filename Value="Make.lpr"/>
- <Caret Line="534" Column="38" TopLine="500"/>
+ <Caret Line="175" Column="97" TopLine="140"/>
</Position15>
<Position16>
<Filename Value="Make.lpr"/>
- <Caret Line="535" Column="40" TopLine="501"/>
+ <Caret Line="217" Column="13" TopLine="204"/>
</Position16>
<Position17>
<Filename Value="Make.lpr"/>
- <Caret Line="539" Column="12" TopLine="505"/>
+ <Caret Line="300" Column="11" TopLine="238"/>
</Position17>
<Position18>
<Filename Value="Make.lpr"/>
- <Caret Line="540" Column="10" TopLine="506"/>
+ <Caret Line="369" Column="62" TopLine="335"/>
</Position18>
<Position19>
<Filename Value="Make.lpr"/>
- <Caret Line="542" Column="24" TopLine="508"/>
+ <Caret Line="360" Column="50" TopLine="339"/>
</Position19>
<Position20>
<Filename Value="Make.lpr"/>
- <Caret Line="543" Column="22" TopLine="509"/>
+ <Caret Line="288" Column="24" TopLine="280"/>
</Position20>
<Position21>
<Filename Value="Make.lpr"/>
- <Caret Line="548" Column="24" TopLine="514"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
</Position21>
<Position22>
<Filename Value="Make.lpr"/>
- <Caret Line="549" Column="31" TopLine="515"/>
+ <Caret Line="288" Column="24" TopLine="253"/>
</Position22>
<Position23>
<Filename Value="Make.lpr"/>
- <Caret Line="552" Column="10" TopLine="518"/>
+ <Caret Line="395" Column="27" TopLine="375"/>
</Position23>
<Position24>
<Filename Value="Make.lpr"/>
- <Caret Line="221" Column="19" TopLine="201"/>
+ <Caret Line="439" Column="25" TopLine="408"/>
</Position24>
<Position25>
<Filename Value="Make.lpr"/>
- <Caret Line="550" Column="1" TopLine="531"/>
+ <Caret Line="444" Column="25" TopLine="410"/>
</Position25>
<Position26>
<Filename Value="Make.lpr"/>
- <Caret Line="34" Column="12" TopLine="13"/>
+ <Caret Line="451" Column="25" TopLine="432"/>
</Position26>
<Position27>
<Filename Value="Make.lpr"/>
- <Caret Line="61" Column="10" TopLine="27"/>
+ <Caret Line="461" Column="17" TopLine="447"/>
</Position27>
<Position28>
<Filename Value="Make.lpr"/>
- <Caret Line="81" Column="10" TopLine="47"/>
+ <Caret Line="525" Column="51" TopLine="504"/>
</Position28>
<Position29>
<Filename Value="Make.lpr"/>
- <Caret Line="82" Column="33" TopLine="48"/>
+ <Caret Line="239" Column="33" TopLine="217"/>
</Position29>
<Position30>
<Filename Value="Make.lpr"/>
- <Caret Line="96" Column="10" TopLine="62"/>
+ <Caret Line="658" Column="60" TopLine="635"/>
</Position30>
</JumpHistory>
</ProjectSession>
+ <EditorMacros Count="0"/>
</CONFIG>