mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 12:49:45 +02:00
Fix failure for windows make, related to the use of redirection,
which on mingw32 make generate the use of a batch file, incompatible with forward slashes usd for createlst and gparmake. * utils/createlst.pp: Modify to add a first parameter with the name of the output file. Makefile.fpc: Adapt to new parameter of createlst. Change list name for directory TEST from TESTfilelist.lst to filelistTEST.lst to avoid generating files that start as the directory. git-svn-id: trunk@34328 -
This commit is contained in:
parent
c4347e28b9
commit
05542fbed9
@ -527,16 +527,16 @@ $(MAKEINC): $(GPARMAKE) $(CREATELST)
|
|||||||
# new call with a gap insuring that all the previous files have lower index
|
# new call with a gap insuring that all the previous files have lower index
|
||||||
# even if CHUNKSIZE is equal to 1.
|
# even if CHUNKSIZE is equal to 1.
|
||||||
$(Q)$(MAKE) $(TEST_OUTPUTDIR)
|
$(Q)$(MAKE) $(TEST_OUTPUTDIR)
|
||||||
$(Q)$(CREATELST) $(TESTDIRS) > testfilelist.lst
|
$(CREATELST) filelisttest.lst $(TESTDIRS)
|
||||||
$(Q)$(GPARMAKE) $(MAKEINC) test 1 $(CHUNKSIZE) @testfilelist.lst
|
$(GPARMAKE) $(MAKEINC) test 1 $(CHUNKSIZE) @filelisttest.lst
|
||||||
$(Q)$(CREATELST) tbs > tbsfilelist.lst
|
$(CREATELST) filelisttbs.lst tbs
|
||||||
$(Q)$(GPARMAKE) -a $(MAKEINC) tbs 10000 $(CHUNKSIZE) @tbsfilelist.lst
|
$(GPARMAKE) -a $(MAKEINC) tbs 10000 $(CHUNKSIZE) @filelisttbs.lst
|
||||||
$(Q)$(CREATELST) tbf > tbffilelist.lst
|
$(CREATELST) filelisttbf.lst tbf
|
||||||
$(Q)$(GPARMAKE) -a $(MAKEINC) tbf 15000 $(CHUNKSIZE) @tbffilelist.lst
|
$(GPARMAKE) -a $(MAKEINC) tbf 15000 $(CHUNKSIZE) @filelisttbf.lst
|
||||||
$(Q)$(CREATELST) webtbs > webtbsfilelist.lst
|
$(CREATELST) filelistwebtbs.lst webtbs
|
||||||
$(Q)$(GPARMAKE) -a $(MAKEINC) webtbs 20000 $(CHUNKSIZE) @webtbsfilelist.lst
|
$(GPARMAKE) -a $(MAKEINC) webtbs 20000 $(CHUNKSIZE) @filelistwebtbs.lst
|
||||||
$(Q)$(CREATELST) webtbf > webtbffilelist.lst
|
$(CREATELST) filelistwebtbf.lst webtbf
|
||||||
$(Q)$(GPARMAKE) -a $(MAKEINC) webtbf 30000 $(CHUNKSIZE) @webtbffilelist.lst
|
$(GPARMAKE) -a $(MAKEINC) webtbf 30000 $(CHUNKSIZE) @filelistwebtbf.lst
|
||||||
|
|
||||||
|
|
||||||
# only include the targets to compile/run the tests when we want to
|
# only include the targets to compile/run the tests when we want to
|
||||||
|
@ -4,32 +4,61 @@ uses
|
|||||||
SysUtils, Classes;
|
SysUtils, Classes;
|
||||||
|
|
||||||
var
|
var
|
||||||
i: LongInt;
|
i,ioerror : LongInt;
|
||||||
|
outfile : text;
|
||||||
sr: TSearchRec;
|
sr: TSearchRec;
|
||||||
path: String;
|
path: String;
|
||||||
sl: TStringList;
|
sl: TStringList;
|
||||||
begin
|
begin
|
||||||
if ParamCount = 0 then begin
|
if ParamCount < 2 then
|
||||||
Writeln('createlst PATH [PATH [...]]');
|
begin
|
||||||
Exit;
|
Writeln('createlst OUTPUTFILE PATH [PATH [...]]');
|
||||||
|
Halt(1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
sl := TStringList.Create;
|
sl := TStringList.Create;
|
||||||
|
|
||||||
for i := 1 to ParamCount do begin
|
{$i-}
|
||||||
|
assign(outfile,paramstr(1));
|
||||||
|
rewrite(outfile);
|
||||||
|
ioerror:=IOResult;
|
||||||
|
|
||||||
|
if ioerror<>0 then
|
||||||
|
begin
|
||||||
|
Writeln('Rewrite(',ParamStr(1),') failed, IOResult=',ioerror);
|
||||||
|
Halt(2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
for i := 2 to ParamCount do
|
||||||
|
begin
|
||||||
path := IncludeTrailingPathDelimiter(ParamStr(i));
|
path := IncludeTrailingPathDelimiter(ParamStr(i));
|
||||||
if FindFirst(path + 't*.pp', 0, sr) = 0 then begin
|
if FindFirst(path + 't*.pp', 0, sr) = 0 then
|
||||||
|
begin
|
||||||
repeat
|
repeat
|
||||||
sl.Add(path + sr.Name);
|
sl.Add(path + sr.Name);
|
||||||
until FindNext(sr) <> 0;
|
until FindNext(sr) <> 0;
|
||||||
|
|
||||||
FindClose(sr);
|
FindClose(sr);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
sl.Sort;
|
sl.Sort;
|
||||||
for i := 0 to sl.Count - 1 do
|
for i := 0 to sl.Count - 1 do
|
||||||
Writeln(sl[i]);
|
begin
|
||||||
|
Writeln(outfile,sl[i]);
|
||||||
|
ioerror:=IOResult;
|
||||||
|
if ioerror<>0 then
|
||||||
|
begin
|
||||||
|
Writeln('write to file ',ParamStr(1),' failed, IOResult=',ioerror);
|
||||||
|
Halt(3);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
close(outfile);
|
||||||
|
ioerror:=IOResult;
|
||||||
|
if ioerror<>0 then
|
||||||
|
begin
|
||||||
|
Writeln('Close(',ParamStr(1),') failed, IOResult=',ioerror);
|
||||||
|
Halt(4);
|
||||||
|
end;
|
||||||
sl.Free;
|
sl.Free;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user