mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-03 12:59:40 +01:00
implemented creating Makefile for packages
git-svn-id: trunk@7816 -
This commit is contained in:
parent
80cf1894eb
commit
14c1088427
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -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
|
||||
|
||||
2171
components/rtticontrols/Makefile
Normal file
2171
components/rtticontrols/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
27
components/rtticontrols/Makefile.fpc
Normal file
27
components/rtticontrols/Makefile.fpc
Normal 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)
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user