diff --git a/Makefile b/Makefile index 5ba936174e..6dce8910a4 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ # -# Don't edit, this file is generated by FPCMake Version 1.1 [2003/03/28] +# Don't edit, this file is generated by FPCMake Version 1.1 [2003/05/15] # default: all -MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx +MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos macosx emx override PATH:=$(subst \,/,$(PATH)) ifeq ($(findstring ;,$(PATH)),) inUnix=1 @@ -110,38 +110,11 @@ endif override FPC:=$(subst $(SRCEXEEXT),,$(FPC)) override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT) ifndef FPC_VERSION -FPC_VERSION:=$(shell $(FPC) -iV) +FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO) +FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO)) endif -export FPC FPC_VERSION +export FPC FPC_VERSION FPC_COMPILERINFO unexport CHECKDEPEND ALLDEPENDENCIES -ifeq ($(findstring 1.0.,$(FPC_VERSION)),) -COMPILERINFO:=$(shell $(FPC) -iSP -iTP -iSO -iTO) -ifndef CPU_SOURCE -CPU_SOURCE:=$(word 1,$(COMPILERINFO)) -endif -ifndef CPU_TARGET -CPU_TARGET:=$(word 2,$(COMPILERINFO)) -endif -ifndef OS_SOURCE -OS_SOURCE:=$(word 3,$(COMPILERINFO)) -endif -ifndef OS_TARGET -OS_TARGET:=$(word 4,$(COMPILERINFO)) -endif -else -ifndef CPU_SOURCE -CPU_SOURCE:=$(shell $(FPC) -iSP) -endif -ifndef CPU_TARGET -CPU_TARGET:=$(shell $(FPC) -iTP) -endif -ifndef OS_SOURCE -OS_SOURCE:=$(shell $(FPC) -iSO) -endif -ifndef OS_TARGET -OS_TARGET:=$(shell $(FPC) -iTO) -endif -endif ifndef CPU_TARGET ifdef CPU_TARGET_DEFAULT CPU_TARGET=$(CPU_TARGET_DEFAULT) @@ -152,6 +125,24 @@ ifdef OS_TARGET_DEFAULT OS_TARGET=$(OS_TARGET_DEFAULT) endif endif +ifneq ($(words $(FPC_COMPILERINFO)),5) +FPC_COMPILERINFO+=$(shell $(FPC) -iSP) +FPC_COMPILERINFO+=$(shell $(FPC) -iTP) +FPC_COMPILERINFO+=$(shell $(FPC) -iSO) +FPC_COMPILERINFO+=$(shell $(FPC) -iTO) +endif +ifndef CPU_SOURCE +CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO)) +endif +ifndef CPU_TARGET +CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO)) +endif +ifndef OS_SOURCE +OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO)) +endif +ifndef OS_TARGET +OS_TARGET:=$(word 5,$(FPC_COMPILERINFO)) +endif FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET) FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE) ifneq ($(FULL_TARGET),$(FULL_SOURCE)) @@ -222,6 +213,15 @@ LCL_PLATFORM=gtk endif endif export LCL_PLATFORM +ifndef LAZARUS_CONFIG_DIR +ifeq ($(OS_TARGET),win32) +LAZARUS_CONFIG_DIR= +else +LAZARUS_CONFIG_DIR=$(HOME)/.lazarus +endif +endif +export LAZARUS_CONFIG_DIR +LAZARUS_IDE_CONFIG=$(LAZARUS_CONFIG_DIR)/idemake.cfg override TARGET_DIRS+=lcl components designer packager override TARGET_PROGRAMS+=lazarus override TARGET_EXAMPLEDIRS+=examples @@ -451,6 +451,97 @@ SHAREDLIBEXT=.so STATICLIBPREFIX=libp RSTEXT=.rst FPCMADE=fpcmade +ifeq ($(findstring 1.0.,$(FPC_VERSION)),) +ifeq ($(OS_TARGET),go32v1) +STATICLIBPREFIX= +FPCMADE=fpcmade.v1 +PACKAGESUFFIX=v1 +endif +ifeq ($(OS_TARGET),go32v2) +STATICLIBPREFIX= +FPCMADE=fpcmade.dos +ZIPSUFFIX=go32 +endif +ifeq ($(OS_TARGET),linux) +EXEEXT= +HASSHAREDLIB=1 +FPCMADE=fpcmade.lnx +ZIPSUFFIX=linux +endif +ifeq ($(OS_TARGET),freebsd) +EXEEXT= +HASSHAREDLIB=1 +FPCMADE=fpcmade.freebsd +ZIPSUFFIX=freebsd +endif +ifeq ($(OS_TARGET),netbsd) +EXEEXT= +HASSHAREDLIB=1 +FPCMADE=fpcmade.netbsd +ZIPSUFFIX=netbsd +endif +ifeq ($(OS_TARGET),openbsd) +EXEEXT= +HASSHAREDLIB=1 +FPCMADE=fpcmade.openbsd +ZIPSUFFIX=openbsd +endif +ifeq ($(OS_TARGET),win32) +SHAREDLIBEXT=.dll +FPCMADE=fpcmade.w32 +ZIPSUFFIX=w32 +endif +ifeq ($(OS_TARGET),os2) +AOUTEXT=.out +STATICLIBPREFIX= +SHAREDLIBEXT=.dll +FPCMADE=fpcmade.os2 +ZIPSUFFIX=os2 +ECHO=echo +endif +ifeq ($(OS_TARGET),emx) +AOUTEXT=.out +STATICLIBPREFIX= +SHAREDLIBEXT=.dll +FPCMADE=fpcmade.emx +ZIPSUFFIX=emx +ECHO=echo +endif +ifeq ($(OS_TARGET),amiga) +EXEEXT= +SHAREDLIBEXT=.library +FPCMADE=fpcmade.amg +endif +ifeq ($(OS_TARGET),atari) +EXEEXT=.ttp +FPCMADE=fpcmade.ata +endif +ifeq ($(OS_TARGET),beos) +EXEEXT= +FPCMADE=fpcmade.be +ZIPSUFFIX=be +endif +ifeq ($(OS_TARGET),sunos) +EXEEXT= +FPCMADE=fpcmade.sun +ZIPSUFFIX=sun +endif +ifeq ($(OS_TARGET),qnx) +EXEEXT= +FPCMADE=fpcmade.qnx +ZIPSUFFIX=qnx +endif +ifeq ($(OS_TARGET),netware) +EXEEXT=.nlm +STATICLIBPREFIX= +FPCMADE=fpcmade.nw +ZIPSUFFIX=nw +endif +ifeq ($(OS_TARGET),macos) +EXEEXT= +FPCMADE=fpcmade.mcc +endif +else ifeq ($(OS_TARGET),go32v1) PPUEXT=.pp1 OEXT=.o1 @@ -565,8 +656,8 @@ ZIPSUFFIX=qnx endif ifeq ($(OS_TARGET),netware) STATICLIBPREFIX= -PPUEXT=.ppn -OEXT=.on +PPUEXT=.ppu +OEXT=.o ASMEXT=.s SMARTEXT=.sl STATICLIBEXT=.a @@ -575,6 +666,16 @@ FPCMADE=fpcmade.nw ZIPSUFFIX=nw EXEEXT=.nlm endif +ifeq ($(OS_TARGET),macos) +PPUEXT=.ppu +ASMEXT=.s +OEXT=.o +SMARTEXT=.sl +STATICLIBEXT=.a +EXEEXT= +FPCMADE=fpcmade.mcc +endif +endif ifndef ECHO ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH)))) ifeq ($(ECHO),) @@ -798,6 +899,7 @@ TAREXT=.tar.gz endif override REQUIRE_PACKAGES=rtl fcl regexpr ifeq ($(OS_TARGET),linux) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_NETDB=1 @@ -807,13 +909,67 @@ REQUIRE_PACKAGES_REGEXPR=1 REQUIRE_PACKAGES_MYSQL=1 REQUIRE_PACKAGES_IBASE=1 endif +endif +ifeq ($(OS_TARGET),linux) +ifeq ($(CPU_TARGET),m68k) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_MYSQL=1 +REQUIRE_PACKAGES_IBASE=1 +endif +endif +ifeq ($(OS_TARGET),linux) +ifeq ($(CPU_TARGET),powerpc) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_MYSQL=1 +REQUIRE_PACKAGES_IBASE=1 +endif +endif +ifeq ($(OS_TARGET),linux) +ifeq ($(CPU_TARGET),sparc) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_MYSQL=1 +REQUIRE_PACKAGES_IBASE=1 +endif +endif +ifeq ($(OS_TARGET),linux) +ifeq ($(CPU_TARGET),x86_64) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_MYSQL=1 +REQUIRE_PACKAGES_IBASE=1 +endif +endif ifeq ($(OS_TARGET),go32v2) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_FCL=1 REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif endif ifeq ($(OS_TARGET),win32) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_NETDB=1 @@ -821,14 +977,21 @@ REQUIRE_PACKAGES_FCL=1 REQUIRE_PACKAGES_REGEXPR=1 REQUIRE_PACKAGES_MYSQL=1 REQUIRE_PACKAGES_IBASE=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif endif ifeq ($(OS_TARGET),os2) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_FCL=1 REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif endif ifeq ($(OS_TARGET),freebsd) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_NETDB=1 @@ -838,13 +1001,31 @@ REQUIRE_PACKAGES_REGEXPR=1 REQUIRE_PACKAGES_MYSQL=1 REQUIRE_PACKAGES_IBASE=1 endif +endif +ifeq ($(OS_TARGET),freebsd) +ifeq ($(CPU_TARGET),m68k) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_MYSQL=1 +REQUIRE_PACKAGES_IBASE=1 +endif +endif ifeq ($(OS_TARGET),beos) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_FCL=1 REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif endif ifeq ($(OS_TARGET),netbsd) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_NETDB=1 @@ -854,37 +1035,81 @@ REQUIRE_PACKAGES_REGEXPR=1 REQUIRE_PACKAGES_MYSQL=1 REQUIRE_PACKAGES_IBASE=1 endif +endif +ifeq ($(OS_TARGET),netbsd) +ifeq ($(CPU_TARGET),m68k) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_MYSQL=1 +REQUIRE_PACKAGES_IBASE=1 +endif +endif ifeq ($(OS_TARGET),amiga) +ifeq ($(CPU_TARGET),m68k) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_FCL=1 REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif endif ifeq ($(OS_TARGET),atari) +ifeq ($(CPU_TARGET),m68k) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_FCL=1 REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif endif ifeq ($(OS_TARGET),sunos) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_FCL=1 REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif +endif +ifeq ($(OS_TARGET),sunos) +ifeq ($(CPU_TARGET),sparc) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif endif ifeq ($(OS_TARGET),qnx) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_FCL=1 REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif endif ifeq ($(OS_TARGET),netware) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_FCL=1 REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif endif ifeq ($(OS_TARGET),openbsd) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_NETDB=1 @@ -894,11 +1119,68 @@ REQUIRE_PACKAGES_REGEXPR=1 REQUIRE_PACKAGES_MYSQL=1 REQUIRE_PACKAGES_IBASE=1 endif +endif +ifeq ($(OS_TARGET),openbsd) +ifeq ($(CPU_TARGET),m68k) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_MYSQL=1 +REQUIRE_PACKAGES_IBASE=1 +endif +endif ifeq ($(OS_TARGET),wdosx) +ifeq ($(CPU_TARGET),i386) REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_PASZLIB=1 REQUIRE_PACKAGES_FCL=1 REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif +endif +ifeq ($(OS_TARGET),palmos) +ifeq ($(CPU_TARGET),m68k) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif +endif +ifeq ($(OS_TARGET),macos) +ifeq ($(CPU_TARGET),powerpc) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif +endif +ifeq ($(OS_TARGET),macosx) +ifeq ($(CPU_TARGET),powerpc) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif +endif +ifeq ($(OS_TARGET),emx) +ifeq ($(CPU_TARGET),i386) +REQUIRE_PACKAGES_RTL=1 +REQUIRE_PACKAGES_PASZLIB=1 +REQUIRE_PACKAGES_FCL=1 +REQUIRE_PACKAGES_REGEXPR=1 +REQUIRE_PACKAGES_NETDB=1 +REQUIRE_PACKAGES_LIBASYNC=1 +endif endif ifdef REQUIRE_PACKAGES_RTL PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/$(OS_TARGET)/Makefile.fpc,$(PACKAGESDIR)))))) @@ -1198,6 +1480,11 @@ override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR) override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX) endif endif +ifeq ($(OS_TARGET),linux) +ifeq ($(FPC_VERSION),1.0.6) +override FPCOPTDEF+=HASUNIX +endif +endif ifdef GCCLIBDIR override FPCOPT+=-Fl$(GCCLIBDIR) endif @@ -1222,7 +1509,7 @@ override COMPILER:=$(FPC) $(FPCOPT) ifeq (,$(findstring -s ,$(COMPILER))) EXECPPAS= else -ifeq ($(OS_SOURCE),$(OS_TARGET)) +ifeq ($(FULL_SOURCE),$(FULL_TARGET)) EXECPPAS:=@$(PPAS) endif endif @@ -1236,6 +1523,9 @@ override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES) ifeq ($(OS_TARGET),os2) override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS)) endif +ifeq ($(OS_TARGET),emx) +override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS)) +endif endif fpc_exes: $(EXEFILES) ifdef TARGET_RSTS @@ -1252,6 +1542,9 @@ override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES) ifeq ($(OS_TARGET),os2) override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES)) endif +ifeq ($(OS_TARGET),emx) +override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES)) +endif endif ifdef TARGET_EXAMPLEDIRS HASEXAMPLES=1 @@ -1810,7 +2103,7 @@ distinstall: fpc_distinstall zipinstall: fpc_zipinstall zipsourceinstall: fpc_zipsourceinstall zipexampleinstall: fpc_zipexampleinstall $(addsuffix _zipexampleinstall,$(TARGET_DIRS)) -zipdistinstall: fpc_zipdistinstall $(addsuffix _zipdistinstall,$(TARGET_DIRS)) +zipdistinstall: fpc_zipdistinstall distclean: fpc_distclean $(addsuffix _distclean,$(TARGET_DIRS)) cleanall: fpc_cleanall $(addsuffix _cleanall,$(TARGET_DIRS)) info: fpc_info @@ -1819,7 +2112,7 @@ makefiles: fpc_makefiles ifneq ($(wildcard fpcmake.loc),) include fpcmake.loc endif -.PHONY: lcl components ide tools all clean +.PHONY: lcl components ide idepkg tools all clean .SUFFIXES: .rc .res %.res: %.rc windres -i $< -o $@ --preprocessor $(RCPP) @@ -1828,6 +2121,8 @@ ifeq ($(OS_TARGET), win32) $(MAKE) lazarus.res endif $(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) +idepkg: + $(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(OPT) @$(LAZARUS_IDE_CONFIG)' tools: lcl components $(MAKE) -C tools all: lcl components designer packager ide diff --git a/Makefile.fpc b/Makefile.fpc index a612997a9a..bd3e8234e6 100644 --- a/Makefile.fpc +++ b/Makefile.fpc @@ -45,9 +45,20 @@ LCL_PLATFORM=gtk endif endif export LCL_PLATFORM +# user config +ifndef LAZARUS_CONFIG_DIR +ifeq ($(OS_TARGET),win32) +LAZARUS_CONFIG_DIR= +else +LAZARUS_CONFIG_DIR=$(HOME)/.lazarus +endif +endif +export LAZARUS_CONFIG_DIR +# idemake.cfg +LAZARUS_IDE_CONFIG=$(LAZARUS_CONFIG_DIR)/idemake.cfg [rules] -.PHONY: lcl components ide tools all clean +.PHONY: lcl components ide idepkg tools all clean .SUFFIXES: .rc .res %.res: %.rc @@ -58,6 +69,9 @@ ifeq ($(OS_TARGET), win32) $(MAKE) lazarus.res endif $(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) + +idepkg: + $(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(OPT) @$(LAZARUS_IDE_CONFIG)' tools: lcl components $(MAKE) -C tools diff --git a/debugger/debugger.pp b/debugger/debugger.pp index 0d11f54929..6ac8259f30 100644 --- a/debugger/debugger.pp +++ b/debugger/debugger.pp @@ -249,6 +249,8 @@ type function Add(const ASource: String; const ALine: Integer): TDBGBreakPoint; procedure Add(NewBreakPoint: TDBGBreakPoint); function Find(const ASource: String; const ALine: Integer): TDBGBreakPoint; + function FindBreakPoint(const ASource: String; const ALine: Integer; + Ignore: TDBGBreakPoint): TDBGBreakPoint; procedure AddNotification(const ANotification: TDBGBreakPointsNotification); procedure RemoveNotification(const ANotification: TDBGBreakPointsNotification); procedure LoadFromXMLConfig(XMLConfig: TXMLConfig; const Path: string; @@ -1342,6 +1344,12 @@ end; function TDBGBreakPoints.Find(const ASource: String; const ALine: Integer): TDBGBreakPoint; +begin + Result := FindBreakPoint(ASource,ALine,nil); +end; + +function TDBGBreakPoints.FindBreakPoint(const ASource: String; + const ALine: Integer; Ignore: TDBGBreakPoint): TDBGBreakPoint; var n: Integer; begin @@ -1350,7 +1358,8 @@ begin Result := GetItem(n); if (Result.Line = ALine) and (CompareFilenames(Result.Source,ASource)=0) - then Exit; + and (Ignore<>Result) + then exit; end; Result := nil; end; @@ -1387,6 +1396,7 @@ var NewCount: Integer; i: Integer; NewBreakPoint: TDBGBreakPoint; + OldBreakPoint: TDBGBreakPoint; begin Clear; NewCount:=XMLConfig.GetValue(Path+'Count',0); @@ -1395,8 +1405,12 @@ begin NewBreakPoint:=TDBGBreakPoint(inherited Add); NewBreakPoint.LoadFromXMLConfig(XMLConfig, Path+'Item'+IntToStr(i+1)+'/',OnLoadFilename,OnGetGroup); + OldBreakPoint:=FindBreakPoint(NewBreakPoint.Source,NewBreakPoint.Line, + NewBreakPoint); writeln('TDBGBreakPoints.LoadFromXMLConfig i=',i,' ', - NewBreakPoint.InitialEnabled,' ',NewBreakPoint.Source,' ',NewBreakPoint.Line); + NewBreakPoint.InitialEnabled,' ',NewBreakPoint.Source,' ',NewBreakPoint.Line, + ' OldBreakPoint=',OldBreakPoint<>nil); + if OldBreakPoint<>nil then NewBreakPoint.Free; end; end; @@ -2131,6 +2145,9 @@ end; end. { ============================================================================= $Log$ + Revision 1.25 2003/05/26 10:34:47 mattias + implemented search, fixed double loading breakpoints + Revision 1.24 2003/05/23 16:46:13 mattias added message, that debugger is readonly while running diff --git a/ide/compileroptions.pp b/ide/compileroptions.pp index f71b8baa2a..d7698c7880 100644 --- a/ide/compileroptions.pp +++ b/ide/compileroptions.pp @@ -164,6 +164,7 @@ type FObjectPath: string; FSrcPath: string; fUnitOutputDir: string; + fDebugPath: string; fLCLWidgetType: string; // Parsing: @@ -253,6 +254,7 @@ type procedure SetUnitOutputDir(const AValue: string); virtual; procedure SetObjectPath(const AValue: string); virtual; procedure SetSrcPath(const AValue: string); virtual; + procedure SetDebugPath(const AValue: string); virtual; protected procedure LoadTheCompilerOptions(const Path: string); virtual; procedure SaveTheCompilerOptions(const Path: string); virtual; @@ -299,7 +301,8 @@ type property ParsedOpts: TParsedCompilerOptions read FParsedOpts; property BaseDirectory: string read FBaseDirectory write SetBaseDirectory; property TargetFilename: String read fTargetFilename write fTargetFilename; - property DefaultMakeOptionsFlags: TCompilerCmdLineOptions read FDefaultMakeOptionsFlags write SetDefaultMakeOptionsFlags; + property DefaultMakeOptionsFlags: TCompilerCmdLineOptions + read FDefaultMakeOptionsFlags write SetDefaultMakeOptionsFlags; property XMLFile: String read fXMLFile write fXMLFile; property XMLConfigFile: TXMLConfig read xmlconfig write xmlconfig; @@ -312,6 +315,7 @@ type property ObjectPath: string read FObjectPath write SetObjectPath; property SrcPath: string read FSrcPath write SetSrcPath; property UnitOutputDirectory: string read fUnitOutputDir write SetUnitOutputDir; + property DebugPath: string read FDebugPath write SetDebugPath; property LCLWidgetType: string read fLCLWidgetType write fLCLWidgetType; // parsing: @@ -319,7 +323,7 @@ type property D2Extensions: Boolean read fD2Ext write fD2Ext; property CStyleOperators: Boolean read fCStyleOp write fCStyleOp; property IncludeAssertionCode: Boolean - read fIncludeAssertionCode write fIncludeAssertionCode; + read fIncludeAssertionCode write fIncludeAssertionCode; property DelphiCompat: Boolean read fDelphiCompat write fDelphiCompat; property AllowLabel: Boolean read fAllowLabel write fAllowLabel; property UseAnsiStrings: Boolean read fUseAnsiStr write fUseAnsiStr; @@ -336,9 +340,11 @@ type property RangeChecks: Boolean read fRangeChecks write fRangeChecks; property OverflowChecks: Boolean read fOverflowChecks write fOverflowChecks; property StackChecks: Boolean read fStackChecks write fStackChecks; - property EmulatedFloatOpcodes: boolean read FEmulatedFloatOpcodes write FEmulatedFloatOpcodes; + property EmulatedFloatOpcodes: boolean read FEmulatedFloatOpcodes + write FEmulatedFloatOpcodes; property HeapSize: Integer read fHeapSize write fHeapSize; - property VerifyObjMethodCall: boolean read FEmulatedFloatOpcodes write FEmulatedFloatOpcodes; + property VerifyObjMethodCall: boolean read FEmulatedFloatOpcodes + write FEmulatedFloatOpcodes; property Generate: Integer read fGenerate write fGenerate; property TargetProcessor: Integer read fTargetProc write fTargetProc; property VariablesInRegisters: Boolean read fVarsInReg write fVarsInReg; @@ -381,8 +387,10 @@ type read fStopAfterErrCount write fStopAfterErrCount; // other - property DontUseConfigFile: Boolean read fDontUseConfigFile write fDontUseConfigFile; - property AdditionalConfigFile: Boolean read fAdditionalConfigFile write fAdditionalConfigFile; + property DontUseConfigFile: Boolean read fDontUseConfigFile + write fDontUseConfigFile; + property AdditionalConfigFile: Boolean read fAdditionalConfigFile + write fAdditionalConfigFile; property ConfigFilePath: String read fConfigFilePath write fConfigFilePath; property CustomOptions: string read fCustomOptions write SetCustomOptions; @@ -475,6 +483,10 @@ type edtUnitOutputDir: TEdit; btnUnitOutputDir: TButton; + grpDebugPath: TGroupBox; + edtDebugPath: TEdit; + DebugPathEditBtn: TPathEditorButton; + LCLWidgetTypeRadioGroup: TRadioGroup; { Parsing Controls } @@ -1010,6 +1022,12 @@ begin ParsedOpts.SetUnparsedValue(pcosSrcPath,FSrcPath); end; +procedure TBaseCompilerOptions.SetDebugPath(const AValue: string); +begin + if fDebugPath=AValue then exit; + fDebugPath:=AValue; +end; + procedure TBaseCompilerOptions.SetBaseDirectory(const AValue: string); begin if FBaseDirectory=AValue then exit; @@ -2036,6 +2054,7 @@ begin UnitOutputDirectory := ''; ObjectPath:=''; SrcPath:=''; + DebugPath:=''; fLCLWidgetType := 'gtk'; // parsing @@ -2127,6 +2146,7 @@ begin fLCLWidgetType := CompOpts.fLCLWidgetType; ObjectPath := CompOpts.FObjectPath; SrcPath := CompOpts.SrcPath; + DebugPath := CompOpts.DebugPath; // Parsing fStyle := CompOpts.fStyle; @@ -2213,6 +2233,7 @@ begin and (fUnitOutputDir = CompOpts.fUnitOutputDir) and (FObjectPath = CompOpts.FObjectPath) and (FSrcPath = CompOpts.FSrcPath) + and (fDebugPath = CompOpts.fDebugPath) and (fLCLWidgetType = CompOpts.fLCLWidgetType) @@ -2602,6 +2623,7 @@ begin grpLibraries.Enabled:=EnabledLinkerOpts; edtOtherSources.Text := CompilerOpts.SrcPath; edtUnitOutputDir.Text := CompilerOpts.UnitOutputDirectory; + edtDebugPath.Text := CompilerOpts.DebugPath; i:=LCLWidgetTypeRadioGroup.Items.IndexOf(CompilerOpts.LCLWidgetType); if i<0 then i:=0; @@ -2751,6 +2773,7 @@ begin CompilerOpts.OtherUnitFiles := edtOtherUnits.Text; CompilerOpts.SrcPath := edtOtherSources.Text; CompilerOpts.UnitOutputDirectory := edtUnitOutputDir.Text; + CompilerOpts.DebugPath := edtDebugPath.Text; i:=LCLWidgetTypeRadioGroup.Itemindex; if i<0 then i:=0; @@ -4327,6 +4350,44 @@ begin OnClick:=@FileBrowseBtnClick; end; + {------------------------------------------------------------} + + grpDebugPath := TGroupBox.Create(Self); + with grpDebugPath do + begin + Parent := PathPage; + Left := 10; + Top := y; + Width := Self.ClientWidth-28; + Height := 45; + Caption := dlgCODebugPath; + inc(y,Height+5); + end; + + edtDebugPath := TEdit.Create(Self); + with edtDebugPath do + begin + Parent := grpDebugPath; + Left := 8; + Top := 0; + Width := Parent.ClientWidth-Left-37; + Text := ''; + end; + + DebugPathEditBtn:=TPathEditorButton.Create(Self); + with DebugPathEditBtn do begin + Name:='DebugPathEditBtn'; + Parent:=grpDebugPath; + Left:=edtDebugPath.Left+edtDebugPath.Width+3; + Top:=edtDebugPath.Top; + Width:=25; + Height:=edtDebugPath.Height; + Caption:='...'; + OnClick:=@PathEditBtnClick; + OnExecuted:=@PathEditBtnExecuted; + end; + + {------------------------------------------------------------} LCLWidgetTypeRadioGroup:=TRadioGroup.Create(Self); @@ -4443,7 +4504,16 @@ begin if AButton=LibrariesPathEditBtn then begin OldPath:=edtLibraries.Text; Templates:=''; - end; + end else + if AButton=DebugPathEditBtn then begin + OldPath:=edtDebugPath.Text; + Templates:=SetDirSeparators( + '$(LazarusDir)/lcl/include' + +';$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)' + +';$(LazarusDir)/include/' + ); + end else + exit; AButton.CurrentPathEditor.Path:=OldPath; AButton.CurrentPathEditor.Templates:=SetDirSeparators(Templates); end; @@ -4468,6 +4538,9 @@ begin end else if AButton=LibrariesPathEditBtn then begin edtLibraries.Text:=NewPath; + end else + if AButton=DebugPathEditBtn then begin + edtDebugPath.Text:=NewPath; end; end; end; diff --git a/ide/debugmanager.pas b/ide/debugmanager.pas index 44c8b9343c..8500bf81d3 100644 --- a/ide/debugmanager.pas +++ b/ide/debugmanager.pas @@ -319,7 +319,7 @@ begin end; SrcFile := MainIDE.FindSourceFile(ALocation.SrcFile,Project1.ProjectDirectory, - [fsfSearchForProject,fsfUseIncludePaths]); + [fsfSearchForProject,fsfUseIncludePaths,fsfUseDebugPath]); if SrcFile = '' then SrcFile := ALocation.SrcFile; if not FilenameIsAbsolute(SrcFile) @@ -937,6 +937,9 @@ end. { ============================================================================= $Log$ + Revision 1.26 2003/05/26 10:34:46 mattias + implemented search, fixed double loading breakpoints + Revision 1.25 2003/05/25 15:31:11 mattias implemented searching for indirect include files diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index 802c8b4a42..2632f6ade1 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -353,6 +353,9 @@ resourcestring lisNoProgramFileSFound = 'No program file %s%s%s found.'; lisErrorInitializingProgramSErrorS = 'Error initializing program%s%s%s%s%s' +'Error: %s'; + lisNotNow = 'Not now'; + lisYouCanNotBuildLazarusWhileDebuggingOrCompiling = 'You can not build ' + +'lazarus while debugging or compiling.'; lisUnableToSaveFile = 'Unable to save file %s%s%s'; lisReadError = 'Read Error'; lisUnableToReadFile2 = 'Unable to read file %s%s%s!'; @@ -826,6 +829,7 @@ resourcestring dlgCOIncFiles = 'Include Files:'; dlgCOSources = 'Other Sources: (.pp/.pas files)'; dlgCOLibraries = 'Libraries:'; + dlgCODebugPath = 'Debugger path addition:'; dlgToFPCPath = 'Path To Compiler:'; lisCOSkipCallingCompiler = 'Skip calling Compiler'; lisCOExecuteAfter = 'Execute after'; diff --git a/ide/mainbar.pas b/ide/mainbar.pas index c73a1b1a65..ba69fcd207 100644 --- a/ide/mainbar.pas +++ b/ide/mainbar.pas @@ -148,7 +148,8 @@ type // find source flags TFindSourceFlag = ( fsfSearchForProject, - fsfUseIncludePaths + fsfUseIncludePaths, + fsfUseDebugPath ); TFindSourceFlags = set of TFindSourceFlag; diff --git a/packager/pkgmanager.pas b/packager/pkgmanager.pas index e7812404e8..4fbf765aa3 100644 --- a/packager/pkgmanager.pas +++ b/packager/pkgmanager.pas @@ -2140,7 +2140,7 @@ begin try for i:=0 to PkgList.Count-1 do begin APackage:=TLazPackage(PkgList[i]); - IncPath:=APackage.CompilerOptions.IncludeFiles; + IncPath:=APackage.CompilerOptions.GetIncludePath(false); Result:=SearchFileInPath(Filename,APackage.Directory,IncPath,';',[]); if Result<>'' then exit; end;