implemented creating Makefile for packages

git-svn-id: trunk@7816 -
This commit is contained in:
mattias 2005-09-24 18:03:09 +00:00
parent 80cf1894eb
commit 14c1088427
4 changed files with 2227 additions and 1 deletions

2
.gitattributes vendored
View File

@ -199,6 +199,8 @@ components/projecttemplates/idetemplateproject.pp svneol=native#text/plain
components/projecttemplates/projecttemplates.pp svneol=native#text/plain
components/projecttemplates/projtemplates.lpk svneol=native#text/plain
components/projecttemplates/projtemplates.pas svneol=native#text/plain
components/rtticontrols/Makefile svneol=native#text/plain
components/rtticontrols/Makefile.fpc svneol=native#text/plain
components/rtticontrols/baseicon.png -text svneol=unset#image/png
components/rtticontrols/examples/example1.lfm svneol=native#text/plain
components/rtticontrols/examples/example1.lrs svneol=native#text/pascal

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,27 @@
# Makefile.fpc for RunTimeTypeInfoControls 0.1
[package]
name=runtimetypeinfocontrols
version=0.1
[compiler]
unittargetdir=lib/
unitdir=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/gtk/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
options=-gl
[target]
units=runtimetypeinfocontrols.pas
[clean]
files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \
$(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) \
$(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) \
$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
[rules]
.PHONY: cleartarget all
cleartarget:
-$(DEL) $(COMPILER_UNITTARGETDIR)/runtimetypeinfocontrols$(PPUEXT)
all: cleartarget $(COMPILER_UNITTARGETDIR) runtimetypeinfocontrols$(PPUEXT)

View File

@ -1217,6 +1217,7 @@ var
MakefileFPCFilename: String;
UnitOutputPath: String;
UnitPath: String;
FPCMakeTool: TExternalToolOptions;
begin
Result:=mrCancel;
@ -1267,7 +1268,32 @@ begin
if Result<>mrOk then exit;
// call fpcmake to create the Makefile
FPCMakeTool:=TExternalToolOptions.Create;
try
FPCMakeTool.Title:='Creating Makefile for package '+APackage.IDAsString;
FPCMakeTool.WorkingDirectory:=APackage.Directory;
FPCMakeTool.Filename:='fpcmake';
FPCMakeTool.CmdLineParams:='-TAll';
FPCMakeTool.EnvironmentOverrides.Add(
'FPCDIR='+EnvironmentOptions.FPCSourceDirectory);
// clear old errors
SourceNotebook.ClearErrorLines;
// compile package
Result:=EnvironmentOptions.ExternalTools.Run(FPCMakeTool,
MainIDE.MacroList,nil,nil);
if Result<>mrOk then begin
Result:=MessageDlg('fpcmake failed',
'Calling fpcmake to create Makefile from '
+MakefileFPCFilename+' failed.',
mtError,[mbCancel],0);
exit;
end;
finally
// clean up
FPCMakeTool.Free;
end;
Result:=mrOk;
end;