mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 17:40:40 +02:00
MG: added inputhistory
git-svn-id: trunk@1560 -
This commit is contained in:
parent
c5ec8fa27e
commit
ad22b62edc
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -148,6 +148,7 @@ ide/include/ide.inc svneol=native#text/pascal
|
|||||||
ide/include/linux/lazconf.inc svneol=native#text/pascal
|
ide/include/linux/lazconf.inc svneol=native#text/pascal
|
||||||
ide/include/netbsd/lazconf.inc svneol=native#text/pascal
|
ide/include/netbsd/lazconf.inc svneol=native#text/pascal
|
||||||
ide/include/win32/lazconf.inc svneol=native#text/pascal
|
ide/include/win32/lazconf.inc svneol=native#text/pascal
|
||||||
|
ide/inputhistory.pas svneol=native#text/pascal
|
||||||
ide/insertwatch.lrs svneol=native#text/pascal
|
ide/insertwatch.lrs svneol=native#text/pascal
|
||||||
ide/keymapping.pp svneol=native#text/pascal
|
ide/keymapping.pp svneol=native#text/pascal
|
||||||
ide/lazarus.pp svneol=native#text/pascal
|
ide/lazarus.pp svneol=native#text/pascal
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#
|
#
|
||||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2001/12/31]
|
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/03/28]
|
||||||
#
|
#
|
||||||
default: all
|
default: all
|
||||||
|
MAKEFILETARGETS=linux
|
||||||
override PATH:=$(subst \,/,$(PATH))
|
override PATH:=$(subst \,/,$(PATH))
|
||||||
ifeq ($(findstring ;,$(PATH)),)
|
ifeq ($(findstring ;,$(PATH)),)
|
||||||
inUnix=1
|
inUnix=1
|
||||||
@ -13,10 +14,7 @@ PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
|
|||||||
ifeq ($(PWD),)
|
ifeq ($(PWD),)
|
||||||
PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
|
PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
|
||||||
ifeq ($(PWD),)
|
ifeq ($(PWD),)
|
||||||
nopwd:
|
$(error You need the GNU utils package to use this Makefile)
|
||||||
@echo You need the GNU utils package to use this Makefile!
|
|
||||||
@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
|
|
||||||
@exit
|
|
||||||
else
|
else
|
||||||
PWD:=$(firstword $(PWD))
|
PWD:=$(firstword $(PWD))
|
||||||
SRCEXEEXT=
|
SRCEXEEXT=
|
||||||
@ -70,6 +68,22 @@ endif
|
|||||||
else
|
else
|
||||||
BASEDIR=.
|
BASEDIR=.
|
||||||
endif
|
endif
|
||||||
|
ifdef inOS2
|
||||||
|
ifndef ECHO
|
||||||
|
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
|
ifeq ($(ECHO),)
|
||||||
|
ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
|
||||||
|
ifeq ($(ECHO),)
|
||||||
|
ECHO=echo
|
||||||
|
else
|
||||||
|
ECHO:=$(firstword $(ECHO))
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
ECHO:=$(firstword $(ECHO))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
export ECHO
|
||||||
|
endif
|
||||||
ifndef FPC
|
ifndef FPC
|
||||||
ifdef PP
|
ifdef PP
|
||||||
FPC=$(PP)
|
FPC=$(PP)
|
||||||
@ -93,23 +107,45 @@ ifndef FPC_VERSION
|
|||||||
FPC_VERSION:=$(shell $(FPC) -iV)
|
FPC_VERSION:=$(shell $(FPC) -iV)
|
||||||
endif
|
endif
|
||||||
export FPC FPC_VERSION
|
export FPC FPC_VERSION
|
||||||
|
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
|
ifndef CPU_TARGET
|
||||||
CPU_TARGET:=$(shell $(FPC) -iTP)
|
CPU_TARGET:=$(shell $(FPC) -iTP)
|
||||||
endif
|
endif
|
||||||
ifndef CPU_SOURCE
|
ifndef OS_SOURCE
|
||||||
CPU_SOURCE:=$(shell $(FPC) -iSP)
|
OS_SOURCE:=$(shell $(FPC) -iSO)
|
||||||
endif
|
endif
|
||||||
ifndef OS_TARGET
|
ifndef OS_TARGET
|
||||||
OS_TARGET:=$(shell $(FPC) -iTO)
|
OS_TARGET:=$(shell $(FPC) -iTO)
|
||||||
endif
|
endif
|
||||||
ifndef OS_SOURCE
|
|
||||||
OS_SOURCE:=$(shell $(FPC) -iSO)
|
|
||||||
endif
|
endif
|
||||||
FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
|
FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
|
||||||
FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
|
FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
|
||||||
ifneq ($(FULL_TARGET),$(FULL_SOURCE))
|
ifneq ($(FULL_TARGET),$(FULL_SOURCE))
|
||||||
CROSSCOMPILE=1
|
CROSSCOMPILE=1
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
|
||||||
|
ifeq ($(findstring $(OS_TARGET),$(MAKEFILETARGETS)),)
|
||||||
|
$(error The Makefile doesn't support target $(OS_TARGET), please run fpcmake first)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE CROSSCOMPILE
|
export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE CROSSCOMPILE
|
||||||
ifdef FPCDIR
|
ifdef FPCDIR
|
||||||
override FPCDIR:=$(subst \,/,$(FPCDIR))
|
override FPCDIR:=$(subst \,/,$(FPCDIR))
|
||||||
@ -119,6 +155,14 @@ endif
|
|||||||
else
|
else
|
||||||
override FPCDIR=wrong
|
override FPCDIR=wrong
|
||||||
endif
|
endif
|
||||||
|
ifdef DEFAULT_FPCDIR
|
||||||
|
ifeq ($(FPCDIR),wrong)
|
||||||
|
override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
|
||||||
|
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
|
||||||
|
override FPCDIR=wrong
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
ifeq ($(FPCDIR),wrong)
|
ifeq ($(FPCDIR),wrong)
|
||||||
ifdef inUnix
|
ifdef inUnix
|
||||||
override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
|
override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
|
||||||
@ -150,10 +194,11 @@ endif
|
|||||||
else
|
else
|
||||||
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
|
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
|
||||||
endif
|
endif
|
||||||
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
|
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
|
||||||
override PACKAGE_NAME=codetools
|
override PACKAGE_NAME=codetools
|
||||||
override PACKAGE_VERSION=0.8a
|
override PACKAGE_VERSION=0.8a
|
||||||
override TARGET_UNITS+=allcodetoolunits
|
override TARGET_UNITS+=allcodetoolunits
|
||||||
|
override TARGET_IMPLICITUNITS+=codetoolsstrconsts avl_tree basiccodetools codecache sourcelog customcodetool pascalparsertool finddeclarationtool stdcodetools methodjumptool eventcodetool codecompletiontool codeatom codetree definetemplates expreval keywordfunclists linkscanner sourcechanger fileprocs
|
||||||
override COMPILER_OPTIONS+=-gl
|
override COMPILER_OPTIONS+=-gl
|
||||||
override COMPILER_UNITDIR+=.
|
override COMPILER_UNITDIR+=.
|
||||||
override COMPILER_UNITTARGETDIR+=../units
|
override COMPILER_UNITTARGETDIR+=../units
|
||||||
@ -191,6 +236,11 @@ UNIXINSTALLDIR=1
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifndef INSTALL_PREFIX
|
ifndef INSTALL_PREFIX
|
||||||
|
ifdef PREFIX
|
||||||
|
INSTALL_PREFIX=$(PREFIX)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifndef INSTALL_PREFIX
|
||||||
ifdef UNIXINSTALLDIR
|
ifdef UNIXINSTALLDIR
|
||||||
INSTALL_PREFIX=/usr/local
|
INSTALL_PREFIX=/usr/local
|
||||||
else
|
else
|
||||||
@ -202,6 +252,9 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
export INSTALL_PREFIX
|
export INSTALL_PREFIX
|
||||||
|
ifdef INSTALL_FPCSUBDIR
|
||||||
|
export INSTALL_FPCSUBDIR
|
||||||
|
endif
|
||||||
ifndef DIST_DESTDIR
|
ifndef DIST_DESTDIR
|
||||||
DIST_DESTDIR:=$(BASEDIR)
|
DIST_DESTDIR:=$(BASEDIR)
|
||||||
endif
|
endif
|
||||||
@ -248,41 +301,43 @@ endif
|
|||||||
endif
|
endif
|
||||||
ifndef INSTALL_SOURCEDIR
|
ifndef INSTALL_SOURCEDIR
|
||||||
ifdef UNIXINSTALLDIR
|
ifdef UNIXINSTALLDIR
|
||||||
|
ifdef BSDhier
|
||||||
|
SRCPREFIXDIR=share/src
|
||||||
|
else
|
||||||
|
SRCPREFIXDIR=src
|
||||||
|
endif
|
||||||
ifdef INSTALL_FPCPACKAGE
|
ifdef INSTALL_FPCPACKAGE
|
||||||
ifdef BSDhier
|
ifdef INSTALL_FPCSUBDIR
|
||||||
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/share/src/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
|
||||||
else
|
else
|
||||||
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/src/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifdef BSDhier
|
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
||||||
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/share/src/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
|
||||||
else
|
|
||||||
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/src/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifdef INSTALL_FPCPACKAGE
|
ifdef INSTALL_FPCPACKAGE
|
||||||
|
ifdef INSTALL_FPCSUBDIR
|
||||||
|
INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
|
||||||
|
else
|
||||||
INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
|
INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
INSTALL_SOURCEDIRL:=$(INSTALL_BASEDIR)/source
|
INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifndef INSTALL_DOCDIR
|
ifndef INSTALL_DOCDIR
|
||||||
ifdef UNIXINSTALLDIR
|
ifdef UNIXINSTALLDIR
|
||||||
|
ifdef BSDhier
|
||||||
|
DOCPREFIXDIR=share/doc
|
||||||
|
else
|
||||||
|
DOCPREFIXDIR=doc
|
||||||
|
endif
|
||||||
ifdef INSTALL_FPCPACKAGE
|
ifdef INSTALL_FPCPACKAGE
|
||||||
ifdef BSDhier
|
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
||||||
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/share/doc/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
|
||||||
else
|
else
|
||||||
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
||||||
endif
|
|
||||||
else
|
|
||||||
ifdef BSDhier
|
|
||||||
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/share/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
|
||||||
else
|
|
||||||
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifdef INSTALL_FPCPACKAGE
|
ifdef INSTALL_FPCPACKAGE
|
||||||
@ -403,11 +458,13 @@ PPUEXT=.ppo
|
|||||||
ASMEXT=.so2
|
ASMEXT=.so2
|
||||||
OEXT=.oo2
|
OEXT=.oo2
|
||||||
AOUTEXT=.out
|
AOUTEXT=.out
|
||||||
SMARTEXT=.so
|
SMARTEXT=.sl2
|
||||||
|
STATICLIBPREFIX=
|
||||||
STATICLIBEXT=.ao2
|
STATICLIBEXT=.ao2
|
||||||
SHAREDLIBEXT=.dll
|
SHAREDLIBEXT=.dll
|
||||||
FPCMADE=fpcmade.os2
|
FPCMADE=fpcmade.os2
|
||||||
ZIPSUFFIX=emx
|
ZIPSUFFIX=emx
|
||||||
|
ECHO=echo
|
||||||
endif
|
endif
|
||||||
ifeq ($(OS_TARGET),amiga)
|
ifeq ($(OS_TARGET),amiga)
|
||||||
EXEEXT=
|
EXEEXT=
|
||||||
@ -679,6 +736,7 @@ else
|
|||||||
TAROPT=vz
|
TAROPT=vz
|
||||||
TAREXT=.tar.gz
|
TAREXT=.tar.gz
|
||||||
endif
|
endif
|
||||||
|
override REQUIRE_PACKAGES=rtl fcl
|
||||||
ifeq ($(OS_TARGET),linux)
|
ifeq ($(OS_TARGET),linux)
|
||||||
REQUIRE_PACKAGES_RTL=1
|
REQUIRE_PACKAGES_RTL=1
|
||||||
REQUIRE_PACKAGES_PASZLIB=1
|
REQUIRE_PACKAGES_PASZLIB=1
|
||||||
@ -687,76 +745,19 @@ REQUIRE_PACKAGES_FCL=1
|
|||||||
REQUIRE_PACKAGES_MYSQL=1
|
REQUIRE_PACKAGES_MYSQL=1
|
||||||
REQUIRE_PACKAGES_IBASE=1
|
REQUIRE_PACKAGES_IBASE=1
|
||||||
endif
|
endif
|
||||||
ifeq ($(OS_TARGET),go32v2)
|
|
||||||
REQUIRE_PACKAGES_RTL=1
|
|
||||||
REQUIRE_PACKAGES_PASZLIB=1
|
|
||||||
REQUIRE_PACKAGES_FCL=1
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_TARGET),win32)
|
|
||||||
REQUIRE_PACKAGES_RTL=1
|
|
||||||
REQUIRE_PACKAGES_PASZLIB=1
|
|
||||||
REQUIRE_PACKAGES_FCL=1
|
|
||||||
REQUIRE_PACKAGES_MYSQL=1
|
|
||||||
REQUIRE_PACKAGES_IBASE=1
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_TARGET),os2)
|
|
||||||
REQUIRE_PACKAGES_RTL=1
|
|
||||||
REQUIRE_PACKAGES_PASZLIB=1
|
|
||||||
REQUIRE_PACKAGES_FCL=1
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_TARGET),freebsd)
|
|
||||||
REQUIRE_PACKAGES_RTL=1
|
|
||||||
REQUIRE_PACKAGES_PASZLIB=1
|
|
||||||
REQUIRE_PACKAGES_INET=1
|
|
||||||
REQUIRE_PACKAGES_FCL=1
|
|
||||||
REQUIRE_PACKAGES_MYSQL=1
|
|
||||||
REQUIRE_PACKAGES_IBASE=1
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_TARGET),beos)
|
|
||||||
REQUIRE_PACKAGES_RTL=1
|
|
||||||
REQUIRE_PACKAGES_PASZLIB=1
|
|
||||||
REQUIRE_PACKAGES_FCL=1
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_TARGET),netbsd)
|
|
||||||
REQUIRE_PACKAGES_RTL=1
|
|
||||||
REQUIRE_PACKAGES_PASZLIB=1
|
|
||||||
REQUIRE_PACKAGES_INET=1
|
|
||||||
REQUIRE_PACKAGES_FCL=1
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_TARGET),amiga)
|
|
||||||
REQUIRE_PACKAGES_RTL=1
|
|
||||||
REQUIRE_PACKAGES_PASZLIB=1
|
|
||||||
REQUIRE_PACKAGES_FCL=1
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_TARGET),atari)
|
|
||||||
REQUIRE_PACKAGES_RTL=1
|
|
||||||
REQUIRE_PACKAGES_PASZLIB=1
|
|
||||||
REQUIRE_PACKAGES_FCL=1
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_TARGET),sunos)
|
|
||||||
REQUIRE_PACKAGES_RTL=1
|
|
||||||
REQUIRE_PACKAGES_PASZLIB=1
|
|
||||||
REQUIRE_PACKAGES_FCL=1
|
|
||||||
endif
|
|
||||||
ifeq ($(OS_TARGET),qnx)
|
|
||||||
REQUIRE_PACKAGES_RTL=1
|
|
||||||
REQUIRE_PACKAGES_PASZLIB=1
|
|
||||||
REQUIRE_PACKAGES_FCL=1
|
|
||||||
endif
|
|
||||||
ifdef REQUIRE_PACKAGES_RTL
|
ifdef REQUIRE_PACKAGES_RTL
|
||||||
PACKAGEDIR_RTL:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR)))))
|
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/$(OS_TARGET)/Makefile.fpc,$(PACKAGESDIR))))))
|
||||||
ifneq ($(PACKAGEDIR_RTL),)
|
ifneq ($(PACKAGEDIR_RTL),)
|
||||||
PACKAGEDIR_RTL:=$(firstword $(PACKAGEDIR_RTL))
|
|
||||||
ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
|
|
||||||
override COMPILEPACKAGES+=package_rtl
|
|
||||||
package_rtl:
|
|
||||||
$(MAKE) -C $(PACKAGEDIR_RTL) all
|
|
||||||
endif
|
|
||||||
ifneq ($(wildcard $(PACKAGEDIR_RTL)/$(OS_TARGET)),)
|
ifneq ($(wildcard $(PACKAGEDIR_RTL)/$(OS_TARGET)),)
|
||||||
UNITDIR_RTL=$(PACKAGEDIR_RTL)/$(OS_TARGET)
|
UNITDIR_RTL=$(PACKAGEDIR_RTL)/$(OS_TARGET)
|
||||||
else
|
else
|
||||||
UNITDIR_RTL=$(PACKAGEDIR_RTL)
|
UNITDIR_RTL=$(PACKAGEDIR_RTL)
|
||||||
endif
|
endif
|
||||||
|
ifdef CHECKDEPEND
|
||||||
|
$(PACKAGEDIR_RTL)/$(FPCMADE):
|
||||||
|
$(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
|
||||||
|
override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
PACKAGEDIR_RTL=
|
PACKAGEDIR_RTL=
|
||||||
UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
|
UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
|
||||||
@ -771,19 +772,18 @@ override COMPILER_UNITDIR+=$(UNITDIR_RTL)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef REQUIRE_PACKAGES_PASZLIB
|
ifdef REQUIRE_PACKAGES_PASZLIB
|
||||||
PACKAGEDIR_PASZLIB:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR)))))
|
PACKAGEDIR_PASZLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR))))))
|
||||||
ifneq ($(PACKAGEDIR_PASZLIB),)
|
ifneq ($(PACKAGEDIR_PASZLIB),)
|
||||||
PACKAGEDIR_PASZLIB:=$(firstword $(PACKAGEDIR_PASZLIB))
|
|
||||||
ifeq ($(wildcard $(PACKAGEDIR_PASZLIB)/$(FPCMADE)),)
|
|
||||||
override COMPILEPACKAGES+=package_paszlib
|
|
||||||
package_paszlib:
|
|
||||||
$(MAKE) -C $(PACKAGEDIR_PASZLIB) all
|
|
||||||
endif
|
|
||||||
ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/$(OS_TARGET)),)
|
ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/$(OS_TARGET)),)
|
||||||
UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)/$(OS_TARGET)
|
UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)/$(OS_TARGET)
|
||||||
else
|
else
|
||||||
UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)
|
UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)
|
||||||
endif
|
endif
|
||||||
|
ifdef CHECKDEPEND
|
||||||
|
$(PACKAGEDIR_PASZLIB)/$(FPCMADE):
|
||||||
|
$(MAKE) -C $(PACKAGEDIR_PASZLIB) $(FPCMADE)
|
||||||
|
override ALLDEPENDENCIES+=$(PACKAGEDIR_PASZLIB)/$(FPCMADE)
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
PACKAGEDIR_PASZLIB=
|
PACKAGEDIR_PASZLIB=
|
||||||
UNITDIR_PASZLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Package.fpc,$(UNITSDIR)))))
|
UNITDIR_PASZLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Package.fpc,$(UNITSDIR)))))
|
||||||
@ -798,19 +798,18 @@ override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef REQUIRE_PACKAGES_INET
|
ifdef REQUIRE_PACKAGES_INET
|
||||||
PACKAGEDIR_INET:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /inet/Makefile.fpc,$(PACKAGESDIR)))))
|
PACKAGEDIR_INET:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /inet/Makefile.fpc,$(PACKAGESDIR))))))
|
||||||
ifneq ($(PACKAGEDIR_INET),)
|
ifneq ($(PACKAGEDIR_INET),)
|
||||||
PACKAGEDIR_INET:=$(firstword $(PACKAGEDIR_INET))
|
|
||||||
ifeq ($(wildcard $(PACKAGEDIR_INET)/$(FPCMADE)),)
|
|
||||||
override COMPILEPACKAGES+=package_inet
|
|
||||||
package_inet:
|
|
||||||
$(MAKE) -C $(PACKAGEDIR_INET) all
|
|
||||||
endif
|
|
||||||
ifneq ($(wildcard $(PACKAGEDIR_INET)/$(OS_TARGET)),)
|
ifneq ($(wildcard $(PACKAGEDIR_INET)/$(OS_TARGET)),)
|
||||||
UNITDIR_INET=$(PACKAGEDIR_INET)/$(OS_TARGET)
|
UNITDIR_INET=$(PACKAGEDIR_INET)/$(OS_TARGET)
|
||||||
else
|
else
|
||||||
UNITDIR_INET=$(PACKAGEDIR_INET)
|
UNITDIR_INET=$(PACKAGEDIR_INET)
|
||||||
endif
|
endif
|
||||||
|
ifdef CHECKDEPEND
|
||||||
|
$(PACKAGEDIR_INET)/$(FPCMADE):
|
||||||
|
$(MAKE) -C $(PACKAGEDIR_INET) $(FPCMADE)
|
||||||
|
override ALLDEPENDENCIES+=$(PACKAGEDIR_INET)/$(FPCMADE)
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
PACKAGEDIR_INET=
|
PACKAGEDIR_INET=
|
||||||
UNITDIR_INET:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /inet/Package.fpc,$(UNITSDIR)))))
|
UNITDIR_INET:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /inet/Package.fpc,$(UNITSDIR)))))
|
||||||
@ -825,19 +824,18 @@ override COMPILER_UNITDIR+=$(UNITDIR_INET)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef REQUIRE_PACKAGES_FCL
|
ifdef REQUIRE_PACKAGES_FCL
|
||||||
PACKAGEDIR_FCL:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR)))))
|
PACKAGEDIR_FCL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR))))))
|
||||||
ifneq ($(PACKAGEDIR_FCL),)
|
ifneq ($(PACKAGEDIR_FCL),)
|
||||||
PACKAGEDIR_FCL:=$(firstword $(PACKAGEDIR_FCL))
|
|
||||||
ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),)
|
|
||||||
override COMPILEPACKAGES+=package_fcl
|
|
||||||
package_fcl:
|
|
||||||
$(MAKE) -C $(PACKAGEDIR_FCL) all
|
|
||||||
endif
|
|
||||||
ifneq ($(wildcard $(PACKAGEDIR_FCL)/$(OS_TARGET)),)
|
ifneq ($(wildcard $(PACKAGEDIR_FCL)/$(OS_TARGET)),)
|
||||||
UNITDIR_FCL=$(PACKAGEDIR_FCL)/$(OS_TARGET)
|
UNITDIR_FCL=$(PACKAGEDIR_FCL)/$(OS_TARGET)
|
||||||
else
|
else
|
||||||
UNITDIR_FCL=$(PACKAGEDIR_FCL)
|
UNITDIR_FCL=$(PACKAGEDIR_FCL)
|
||||||
endif
|
endif
|
||||||
|
ifdef CHECKDEPEND
|
||||||
|
$(PACKAGEDIR_FCL)/$(FPCMADE):
|
||||||
|
$(MAKE) -C $(PACKAGEDIR_FCL) $(FPCMADE)
|
||||||
|
override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL)/$(FPCMADE)
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
PACKAGEDIR_FCL=
|
PACKAGEDIR_FCL=
|
||||||
UNITDIR_FCL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl/Package.fpc,$(UNITSDIR)))))
|
UNITDIR_FCL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl/Package.fpc,$(UNITSDIR)))))
|
||||||
@ -852,19 +850,18 @@ override COMPILER_UNITDIR+=$(UNITDIR_FCL)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef REQUIRE_PACKAGES_MYSQL
|
ifdef REQUIRE_PACKAGES_MYSQL
|
||||||
PACKAGEDIR_MYSQL:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /mysql/Makefile.fpc,$(PACKAGESDIR)))))
|
PACKAGEDIR_MYSQL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /mysql/Makefile.fpc,$(PACKAGESDIR))))))
|
||||||
ifneq ($(PACKAGEDIR_MYSQL),)
|
ifneq ($(PACKAGEDIR_MYSQL),)
|
||||||
PACKAGEDIR_MYSQL:=$(firstword $(PACKAGEDIR_MYSQL))
|
|
||||||
ifeq ($(wildcard $(PACKAGEDIR_MYSQL)/$(FPCMADE)),)
|
|
||||||
override COMPILEPACKAGES+=package_mysql
|
|
||||||
package_mysql:
|
|
||||||
$(MAKE) -C $(PACKAGEDIR_MYSQL) all
|
|
||||||
endif
|
|
||||||
ifneq ($(wildcard $(PACKAGEDIR_MYSQL)/$(OS_TARGET)),)
|
ifneq ($(wildcard $(PACKAGEDIR_MYSQL)/$(OS_TARGET)),)
|
||||||
UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)/$(OS_TARGET)
|
UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)/$(OS_TARGET)
|
||||||
else
|
else
|
||||||
UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)
|
UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)
|
||||||
endif
|
endif
|
||||||
|
ifdef CHECKDEPEND
|
||||||
|
$(PACKAGEDIR_MYSQL)/$(FPCMADE):
|
||||||
|
$(MAKE) -C $(PACKAGEDIR_MYSQL) $(FPCMADE)
|
||||||
|
override ALLDEPENDENCIES+=$(PACKAGEDIR_MYSQL)/$(FPCMADE)
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
PACKAGEDIR_MYSQL=
|
PACKAGEDIR_MYSQL=
|
||||||
UNITDIR_MYSQL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /mysql/Package.fpc,$(UNITSDIR)))))
|
UNITDIR_MYSQL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /mysql/Package.fpc,$(UNITSDIR)))))
|
||||||
@ -879,19 +876,18 @@ override COMPILER_UNITDIR+=$(UNITDIR_MYSQL)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef REQUIRE_PACKAGES_IBASE
|
ifdef REQUIRE_PACKAGES_IBASE
|
||||||
PACKAGEDIR_IBASE:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ibase/Makefile.fpc,$(PACKAGESDIR)))))
|
PACKAGEDIR_IBASE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ibase/Makefile.fpc,$(PACKAGESDIR))))))
|
||||||
ifneq ($(PACKAGEDIR_IBASE),)
|
ifneq ($(PACKAGEDIR_IBASE),)
|
||||||
PACKAGEDIR_IBASE:=$(firstword $(PACKAGEDIR_IBASE))
|
|
||||||
ifeq ($(wildcard $(PACKAGEDIR_IBASE)/$(FPCMADE)),)
|
|
||||||
override COMPILEPACKAGES+=package_ibase
|
|
||||||
package_ibase:
|
|
||||||
$(MAKE) -C $(PACKAGEDIR_IBASE) all
|
|
||||||
endif
|
|
||||||
ifneq ($(wildcard $(PACKAGEDIR_IBASE)/$(OS_TARGET)),)
|
ifneq ($(wildcard $(PACKAGEDIR_IBASE)/$(OS_TARGET)),)
|
||||||
UNITDIR_IBASE=$(PACKAGEDIR_IBASE)/$(OS_TARGET)
|
UNITDIR_IBASE=$(PACKAGEDIR_IBASE)/$(OS_TARGET)
|
||||||
else
|
else
|
||||||
UNITDIR_IBASE=$(PACKAGEDIR_IBASE)
|
UNITDIR_IBASE=$(PACKAGEDIR_IBASE)
|
||||||
endif
|
endif
|
||||||
|
ifdef CHECKDEPEND
|
||||||
|
$(PACKAGEDIR_IBASE)/$(FPCMADE):
|
||||||
|
$(MAKE) -C $(PACKAGEDIR_IBASE) $(FPCMADE)
|
||||||
|
override ALLDEPENDENCIES+=$(PACKAGEDIR_IBASE)/$(FPCMADE)
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
PACKAGEDIR_IBASE=
|
PACKAGEDIR_IBASE=
|
||||||
UNITDIR_IBASE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /ibase/Package.fpc,$(UNITSDIR)))))
|
UNITDIR_IBASE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /ibase/Package.fpc,$(UNITSDIR)))))
|
||||||
@ -905,7 +901,6 @@ ifdef UNITDIR_IBASE
|
|||||||
override COMPILER_UNITDIR+=$(UNITDIR_IBASE)
|
override COMPILER_UNITDIR+=$(UNITDIR_IBASE)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
.PHONY: package_rtl package_paszlib package_inet package_fcl package_mysql package_ibase
|
|
||||||
ifndef NOCPUDEF
|
ifndef NOCPUDEF
|
||||||
override FPCOPTDEF=$(CPU_TARGET)
|
override FPCOPTDEF=$(CPU_TARGET)
|
||||||
endif
|
endif
|
||||||
@ -1025,24 +1020,26 @@ endif
|
|||||||
ifdef TARGET_UNITS
|
ifdef TARGET_UNITS
|
||||||
override ALLTARGET+=fpc_units
|
override ALLTARGET+=fpc_units
|
||||||
override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
|
override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
|
||||||
override INSTALLPPUFILES+=$(UNITPPUFILES)
|
override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
|
||||||
override CLEANPPUFILES+=$(UNITPPUFILES)
|
override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
|
||||||
|
override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
|
||||||
endif
|
endif
|
||||||
fpc_units: $(UNITPPUFILES)
|
fpc_units: $(UNITPPUFILES)
|
||||||
ifdef TARGET_RSTS
|
ifdef TARGET_RSTS
|
||||||
override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
|
override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
|
||||||
override CLEANRSTFILES+=$(RSTFILES)
|
override CLEANRSTFILES+=$(RSTFILES)
|
||||||
endif
|
endif
|
||||||
.PHONY: fpc_packages fpc_all fpc_smart fpc_debug
|
.PHONY: fpc_all fpc_smart fpc_debug fpc_release
|
||||||
$(FPCMADE): $(ALLTARGET)
|
$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
|
||||||
@$(ECHOREDIR) Compiled > $(FPCMADE)
|
@$(ECHOREDIR) Compiled > $(FPCMADE)
|
||||||
fpc_packages: $(COMPILEPACKAGES)
|
fpc_all: $(FPCMADE)
|
||||||
fpc_all: fpc_packages $(FPCMADE)
|
|
||||||
fpc_smart:
|
fpc_smart:
|
||||||
$(MAKE) all LINKSMART=1 CREATESMART=1
|
$(MAKE) all LINKSMART=1 CREATESMART=1
|
||||||
fpc_debug:
|
fpc_debug:
|
||||||
$(MAKE) all DEBUG=1
|
$(MAKE) all DEBUG=1
|
||||||
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
|
fpc_release:
|
||||||
|
$(MAKE) all RELEASE=1
|
||||||
|
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp .rc .res
|
||||||
%$(PPUEXT): %.pp
|
%$(PPUEXT): %.pp
|
||||||
$(COMPILER) $<
|
$(COMPILER) $<
|
||||||
$(EXECPPAS)
|
$(EXECPPAS)
|
||||||
@ -1055,6 +1052,8 @@ fpc_debug:
|
|||||||
%$(EXEEXT): %.pas
|
%$(EXEEXT): %.pas
|
||||||
$(COMPILER) $<
|
$(COMPILER) $<
|
||||||
$(EXECPPAS)
|
$(EXECPPAS)
|
||||||
|
%.res: %.rc
|
||||||
|
windres -i $< -o $@
|
||||||
vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
|
vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
|
||||||
vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
|
vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
|
||||||
vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
|
vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
|
||||||
@ -1062,6 +1061,9 @@ vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
|
|||||||
ifdef INSTALL_UNITS
|
ifdef INSTALL_UNITS
|
||||||
override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
|
override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
|
||||||
endif
|
endif
|
||||||
|
ifdef INSTALL_BUILDUNIT
|
||||||
|
override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
|
||||||
|
endif
|
||||||
ifdef INSTALLPPUFILES
|
ifdef INSTALLPPUFILES
|
||||||
override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
|
override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
|
||||||
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
|
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
|
||||||
@ -1110,7 +1112,7 @@ ifdef INSTALL_FILES
|
|||||||
endif
|
endif
|
||||||
fpc_sourceinstall: distclean
|
fpc_sourceinstall: distclean
|
||||||
$(MKDIR) $(INSTALL_SOURCEDIR)
|
$(MKDIR) $(INSTALL_SOURCEDIR)
|
||||||
$(COPYTREE) $(BASEDIR) $(INSTALL_SOURCEDIR)
|
$(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
|
||||||
fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
|
fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
|
||||||
ifdef HASEXAMPLES
|
ifdef HASEXAMPLES
|
||||||
$(MKDIR) $(INSTALL_EXAMPLEDIR)
|
$(MKDIR) $(INSTALL_EXAMPLEDIR)
|
||||||
@ -1242,12 +1244,13 @@ ifdef CLEANEXEFILES
|
|||||||
endif
|
endif
|
||||||
-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
|
-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
|
||||||
-$(DELTREE) *$(SMARTEXT)
|
-$(DELTREE) *$(SMARTEXT)
|
||||||
-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
|
-$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
|
||||||
ifdef AOUTEXT
|
ifdef AOUTEXT
|
||||||
-$(DEL) *$(AOUTEXT)
|
-$(DEL) *$(AOUTEXT)
|
||||||
endif
|
endif
|
||||||
.PHONY: fpc_info
|
.PHONY: fpc_baseinfo
|
||||||
fpc_info:
|
override INFORULES+=fpc_baseinfo
|
||||||
|
fpc_baseinfo:
|
||||||
@$(ECHO)
|
@$(ECHO)
|
||||||
@$(ECHO) == Package info ==
|
@$(ECHO) == Package info ==
|
||||||
@$(ECHO) Package Name..... $(PACKAGE_NAME)
|
@$(ECHO) Package Name..... $(PACKAGE_NAME)
|
||||||
@ -1261,11 +1264,13 @@ fpc_info:
|
|||||||
@$(ECHO) Target CPU... $(CPU_TARGET)
|
@$(ECHO) Target CPU... $(CPU_TARGET)
|
||||||
@$(ECHO) Source OS.... $(OS_SOURCE)
|
@$(ECHO) Source OS.... $(OS_SOURCE)
|
||||||
@$(ECHO) Target OS.... $(OS_TARGET)
|
@$(ECHO) Target OS.... $(OS_TARGET)
|
||||||
@$(ECHO) Full Target.. $(FULL_SOURCE)
|
@$(ECHO) Full Source.. $(FULL_SOURCE)
|
||||||
@$(ECHO) Full Source.. $(FULL_TARGET)
|
@$(ECHO) Full Target.. $(FULL_TARGET)
|
||||||
@$(ECHO)
|
@$(ECHO)
|
||||||
@$(ECHO) == Directory info ==
|
@$(ECHO) == Directory info ==
|
||||||
@$(ECHO)
|
@$(ECHO)
|
||||||
|
@$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
|
||||||
|
@$(ECHO)
|
||||||
@$(ECHO) Basedir......... $(BASEDIR)
|
@$(ECHO) Basedir......... $(BASEDIR)
|
||||||
@$(ECHO) FPCDir.......... $(FPCDIR)
|
@$(ECHO) FPCDir.......... $(FPCDIR)
|
||||||
@$(ECHO) CrossBinDir..... $(CROSSBINDIR)
|
@$(ECHO) CrossBinDir..... $(CROSSBINDIR)
|
||||||
@ -1295,12 +1300,13 @@ fpc_info:
|
|||||||
@$(ECHO)
|
@$(ECHO)
|
||||||
@$(ECHO) == Object info ==
|
@$(ECHO) == Object info ==
|
||||||
@$(ECHO)
|
@$(ECHO)
|
||||||
@$(ECHO) Target Loaders...... $(TARGET_LOADERS)
|
@$(ECHO) Target Loaders........ $(TARGET_LOADERS)
|
||||||
@$(ECHO) Target Units........ $(TARGET_UNITS)
|
@$(ECHO) Target Units.......... $(TARGET_UNITS)
|
||||||
@$(ECHO) Target Programs..... $(TARGET_PROGRAMS)
|
@$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
|
||||||
@$(ECHO) Target Dirs......... $(TARGET_DIRS)
|
@$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
|
||||||
@$(ECHO) Target Examples..... $(TARGET_EXAMPLES)
|
@$(ECHO) Target Dirs........... $(TARGET_DIRS)
|
||||||
@$(ECHO) Target ExampleDirs.. $(TARGET_EXAMPLEDIRS)
|
@$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
|
||||||
|
@$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
|
||||||
@$(ECHO)
|
@$(ECHO)
|
||||||
@$(ECHO) Clean Units......... $(CLEAN_UNITS)
|
@$(ECHO) Clean Units......... $(CLEAN_UNITS)
|
||||||
@$(ECHO) Clean Files......... $(CLEAN_FILES)
|
@$(ECHO) Clean Files......... $(CLEAN_FILES)
|
||||||
@ -1327,8 +1333,25 @@ fpc_info:
|
|||||||
@$(ECHO) Dist destination dir. $(DIST_DESTDIR)
|
@$(ECHO) Dist destination dir. $(DIST_DESTDIR)
|
||||||
@$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
|
@$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
|
||||||
@$(ECHO)
|
@$(ECHO)
|
||||||
|
.PHONY: fpc_info
|
||||||
|
fpc_info: $(INFORULES)
|
||||||
|
.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
|
||||||
|
fpc_makefile_dirs
|
||||||
|
fpc_makefile:
|
||||||
|
$(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
|
||||||
|
fpc_makefile_sub1:
|
||||||
|
ifdef TARGET_DIRS
|
||||||
|
$(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
|
||||||
|
endif
|
||||||
|
ifdef TARGET_EXAMPLEDIRS
|
||||||
|
$(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
|
||||||
|
endif
|
||||||
|
fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
|
||||||
|
fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
|
||||||
|
fpc_makefiles: fpc_makefile fpc_makefile_dirs
|
||||||
debug: fpc_debug
|
debug: fpc_debug
|
||||||
smart: fpc_smart
|
smart: fpc_smart
|
||||||
|
release: fpc_release
|
||||||
examples:
|
examples:
|
||||||
shared:
|
shared:
|
||||||
install: fpc_install
|
install: fpc_install
|
||||||
@ -1343,7 +1366,8 @@ clean: fpc_clean
|
|||||||
distclean: fpc_distclean
|
distclean: fpc_distclean
|
||||||
cleanall: fpc_cleanall
|
cleanall: fpc_cleanall
|
||||||
info: fpc_info
|
info: fpc_info
|
||||||
.PHONY: debug smart examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info
|
makefiles: fpc_makefiles
|
||||||
|
.PHONY: debug smart release examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
|
||||||
ifneq ($(wildcard fpcmake.loc),)
|
ifneq ($(wildcard fpcmake.loc),)
|
||||||
include fpcmake.loc
|
include fpcmake.loc
|
||||||
endif
|
endif
|
||||||
|
@ -14,7 +14,7 @@ options=-gl
|
|||||||
|
|
||||||
[target]
|
[target]
|
||||||
units=allcodetoolunits
|
units=allcodetoolunits
|
||||||
implicitunits=avl_tree basiccodetools codecache sourcelog \
|
implicitunits=codetoolsstrconsts avl_tree basiccodetools codecache sourcelog \
|
||||||
customcodetool pascalparsertool finddeclarationtool stdcodetools \
|
customcodetool pascalparsertool finddeclarationtool stdcodetools \
|
||||||
methodjumptool eventcodetool codecompletiontool codeatom codetree \
|
methodjumptool eventcodetool codecompletiontool codeatom codetree \
|
||||||
definetemplates expreval keywordfunclists linkscanner sourcechanger \
|
definetemplates expreval keywordfunclists linkscanner sourcechanger \
|
||||||
|
@ -19,7 +19,7 @@ uses
|
|||||||
StdCodeTools, MethodJumpTool, EventCodeTool, CodeCompletionTool, LinkScanner,
|
StdCodeTools, MethodJumpTool, EventCodeTool, CodeCompletionTool, LinkScanner,
|
||||||
FindDeclarationCache, BasicCodeTools, CodeTree, CodeAtom, SourceChanger,
|
FindDeclarationCache, BasicCodeTools, CodeTree, CodeAtom, SourceChanger,
|
||||||
CodeToolMemManager, CodeCache, KeywordFuncLists, SourceLog, ExprEval,
|
CodeToolMemManager, CodeCache, KeywordFuncLists, SourceLog, ExprEval,
|
||||||
DefineTemplates, FileProcs, AVL_Tree;
|
DefineTemplates, FileProcs, AVL_Tree, CodeToolsStrConsts;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -29,6 +29,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.9 2002/03/28 20:31:01 lazarus
|
||||||
|
MG: added inputhistory
|
||||||
|
|
||||||
Revision 1.8 2002/01/31 16:52:24 lazarus
|
Revision 1.8 2002/01/31 16:52:24 lazarus
|
||||||
MG: added base class for mem managers and started node cache
|
MG: added base class for mem managers and started node cache
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ unit BasicCodeTools;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, SourceLog, KeywordFuncLists;
|
Classes, SysUtils, CodeToolsStrConsts, SourceLog, KeywordFuncLists;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// functions / procedures
|
// functions / procedures
|
||||||
|
@ -49,9 +49,9 @@ uses
|
|||||||
{$IFDEF MEM_CHECK}
|
{$IFDEF MEM_CHECK}
|
||||||
MemCheck,
|
MemCheck,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, SysUtils, CodeTree, CodeAtom, PascalParserTool, MethodJumpTool,
|
Classes, SysUtils, CodeToolsStrConsts, CodeTree, CodeAtom, PascalParserTool,
|
||||||
SourceLog, KeywordFuncLists, BasicCodeTools, LinkScanner, CodeCache, AVL_Tree,
|
MethodJumpTool, SourceLog, KeywordFuncLists, BasicCodeTools, LinkScanner,
|
||||||
TypInfo, SourceChanger;
|
CodeCache, AVL_Tree, TypInfo, SourceChanger;
|
||||||
|
|
||||||
type
|
type
|
||||||
TNewClassPart = (ncpPrivateProcs, ncpPrivateVars,
|
TNewClassPart = (ncpPrivateProcs, ncpPrivateVars,
|
||||||
@ -305,12 +305,12 @@ var Parts: array[TPropPart] of TAtomPosition;
|
|||||||
function ReadSimpleSpec(SpecWord, SpecParam: TPropPart): boolean;
|
function ReadSimpleSpec(SpecWord, SpecParam: TPropPart): boolean;
|
||||||
begin
|
begin
|
||||||
if Parts[SpecWord].StartPos>=1 then
|
if Parts[SpecWord].StartPos>=1 then
|
||||||
RaiseException('property specifier already defined: '+GetAtom);
|
RaiseExceptionFmt(ctsPropertySpecifierAlreadyDefined,[GetAtom]);
|
||||||
Parts[SpecWord]:=CurPos;
|
Parts[SpecWord]:=CurPos;
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
Result:=AtomIsWord;
|
Result:=AtomIsWord;
|
||||||
if not Result then
|
if not Result then
|
||||||
RaiseException('expected identifier but '+GetAtom+' found');
|
RaiseExceptionFmt(ctsIdentExpectedButAtomFound,[GetAtom]);
|
||||||
if WordIsPropertySpecifier.DoItUpperCase(UpperSrc,CurPos.StartPos,
|
if WordIsPropertySpecifier.DoItUpperCase(UpperSrc,CurPos.StartPos,
|
||||||
CurPos.EndPos-CurPos.StartPos) then exit;
|
CurPos.EndPos-CurPos.StartPos) then exit;
|
||||||
Parts[SpecParam]:=CurPos;
|
Parts[SpecParam]:=CurPos;
|
||||||
@ -342,7 +342,7 @@ writeln('[TCodeCompletionCodeTool.CompleteProperty] Checking Property ',GetAtom)
|
|||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
writeln('[TCodeCompletionCodeTool.CompleteProperty] error parsing param list');
|
writeln('[TCodeCompletionCodeTool.CompleteProperty] error parsing param list');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
RaiseException('error in paramlist');
|
RaiseException(ctsErrorInParamList);
|
||||||
end;
|
end;
|
||||||
CleanParamList:=GetExtraction;
|
CleanParamList:=GetExtraction;
|
||||||
Parts[ppParamList].EndPos:=CurPos.EndPos;
|
Parts[ppParamList].EndPos:=CurPos.EndPos;
|
||||||
@ -361,19 +361,19 @@ writeln('[TCodeCompletionCodeTool.CompleteProperty] no type : found -> ignore pr
|
|||||||
or UpAtomIs('END') or AtomIsChar(';') or (not AtomIsIdentifier(false))
|
or UpAtomIs('END') or AtomIsChar(';') or (not AtomIsIdentifier(false))
|
||||||
or AtomIsKeyWord then begin
|
or AtomIsKeyWord then begin
|
||||||
// no type name found -> ignore this property
|
// no type name found -> ignore this property
|
||||||
RaiseException('property type expected, but '+GetAtom+' found');
|
RaiseExceptionFmt(ctsPropertTypeExpectedButAtomFound,[GetAtom]);
|
||||||
end;
|
end;
|
||||||
Parts[ppType]:=CurPos;
|
Parts[ppType]:=CurPos;
|
||||||
// parse specifiers
|
// parse specifiers
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
if UpAtomIs('INDEX') then begin
|
if UpAtomIs('INDEX') then begin
|
||||||
if Parts[ppIndexWord].StartPos>=1 then
|
if Parts[ppIndexWord].StartPos>=1 then
|
||||||
RaiseException('index specifier redefined');
|
RaiseException(ctsIndexSpecifierRedefined);
|
||||||
Parts[ppIndexWord]:=CurPos;
|
Parts[ppIndexWord]:=CurPos;
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
if WordIsPropertySpecifier.DoItUpperCase(UpperSrc,CurPos.StartPos,
|
if WordIsPropertySpecifier.DoItUpperCase(UpperSrc,CurPos.StartPos,
|
||||||
CurPos.EndPos-CurPos.StartPos) then
|
CurPos.EndPos-CurPos.StartPos) then
|
||||||
RaiseException('index parameter expected, but '+GetAtom+' found');
|
RaiseExceptionFmt(ctsIndexParameterExpectedButAtomFound,[GetAtom]);
|
||||||
Parts[ppIndex].StartPos:=CurPos.StartPos;
|
Parts[ppIndex].StartPos:=CurPos.StartPos;
|
||||||
if not ReadConstant(true,false,[]) then exit;
|
if not ReadConstant(true,false,[]) then exit;
|
||||||
Parts[ppIndex].EndPos:=LastAtoms.GetValueAt(0).EndPos;
|
Parts[ppIndex].EndPos:=LastAtoms.GetValueAt(0).EndPos;
|
||||||
@ -388,12 +388,12 @@ writeln('[TCodeCompletionCodeTool.CompleteProperty] no type : found -> ignore pr
|
|||||||
exit;
|
exit;
|
||||||
end else if UpAtomIs('DEFAULT') then begin
|
end else if UpAtomIs('DEFAULT') then begin
|
||||||
if Parts[ppDefaultWord].StartPos>=1 then
|
if Parts[ppDefaultWord].StartPos>=1 then
|
||||||
RaiseException('default specifier redefined');
|
RaiseException(ctsDefaultSpecifierRedefined);
|
||||||
Parts[ppDefaultWord]:=CurPos;
|
Parts[ppDefaultWord]:=CurPos;
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
if WordIsPropertySpecifier.DoItUpperCase(UpperSrc,CurPos.StartPos,
|
if WordIsPropertySpecifier.DoItUpperCase(UpperSrc,CurPos.StartPos,
|
||||||
CurPos.EndPos-CurPos.StartPos) then
|
CurPos.EndPos-CurPos.StartPos) then
|
||||||
RaiseException('default parameter expected, but '+GetAtom+' found');
|
RaiseExceptionFmt(ctsDefaultParameterExpectedButAtomFound,[GetAtom]);
|
||||||
Parts[ppDefault].StartPos:=CurPos.StartPos;
|
Parts[ppDefault].StartPos:=CurPos.StartPos;
|
||||||
if not ReadConstant(true,false,[]) then exit;
|
if not ReadConstant(true,false,[]) then exit;
|
||||||
Parts[ppDefault].EndPos:=LastAtoms.GetValueAt(0).EndPos;
|
Parts[ppDefault].EndPos:=LastAtoms.GetValueAt(0).EndPos;
|
||||||
@ -401,11 +401,11 @@ writeln('[TCodeCompletionCodeTool.CompleteProperty] no type : found -> ignore pr
|
|||||||
if not ReadSimpleSpec(ppImplementsWord,ppImplements) then exit;
|
if not ReadSimpleSpec(ppImplementsWord,ppImplements) then exit;
|
||||||
end else if UpAtomIs('NODEFAULT') then begin
|
end else if UpAtomIs('NODEFAULT') then begin
|
||||||
if Parts[ppNoDefaultWord].StartPos>=1 then
|
if Parts[ppNoDefaultWord].StartPos>=1 then
|
||||||
RaiseException('nodefault specifier defined twice');
|
RaiseException(ctsNodefaultSpecifierDefinedTwice);
|
||||||
Parts[ppNoDefaultWord]:=CurPos;
|
Parts[ppNoDefaultWord]:=CurPos;
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
end else
|
end else
|
||||||
RaiseException('; expected, but '+GetAtom+' found');
|
RaiseExceptionFmt(ctsCharExpectedButAtomFound,[';',GetAtom]);
|
||||||
end;
|
end;
|
||||||
if (CurPos.StartPos>PropNode.EndPos) then
|
if (CurPos.StartPos>PropNode.EndPos) then
|
||||||
RaiseException('Reparsing error (Complete Property)');
|
RaiseException('Reparsing error (Complete Property)');
|
||||||
|
@ -40,7 +40,8 @@ uses
|
|||||||
{$IFDEF MEM_CHECK}
|
{$IFDEF MEM_CHECK}
|
||||||
MemCheck,
|
MemCheck,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, SysUtils, BasicCodeTools, AVL_Tree, CodeToolMemManager;
|
Classes, SysUtils, CodeToolsStrConsts, BasicCodeTools, AVL_Tree,
|
||||||
|
CodeToolMemManager;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -39,8 +39,9 @@ uses
|
|||||||
{$IFDEF MEM_CHECK}
|
{$IFDEF MEM_CHECK}
|
||||||
MemCheck,
|
MemCheck,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, SysUtils, CodeTree, CodeAtom, SourceLog, KeywordFuncLists,
|
Classes, SysUtils, CodeToolsStrConsts, CodeTree, CodeAtom, SourceLog,
|
||||||
BasicCodeTools, LinkScanner, CodeCache, AVL_Tree, TypInfo, SourceChanger;
|
KeywordFuncLists, BasicCodeTools, LinkScanner, CodeCache, AVL_Tree, TypInfo,
|
||||||
|
SourceChanger;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCustomCodeTool = class(TObject)
|
TCustomCodeTool = class(TObject)
|
||||||
@ -56,6 +57,8 @@ type
|
|||||||
procedure BuildDefaultKeyWordFunctions; virtual;
|
procedure BuildDefaultKeyWordFunctions; virtual;
|
||||||
procedure SetScanner(NewScanner: TLinkScanner); virtual;
|
procedure SetScanner(NewScanner: TLinkScanner); virtual;
|
||||||
procedure RaiseException(const AMessage: string); virtual;
|
procedure RaiseException(const AMessage: string); virtual;
|
||||||
|
procedure RaiseExceptionFmt(const AMessage: string;
|
||||||
|
const args : array of const); virtual;
|
||||||
procedure DoDeleteNodes; virtual;
|
procedure DoDeleteNodes; virtual;
|
||||||
public
|
public
|
||||||
Tree: TCodeTree;
|
Tree: TCodeTree;
|
||||||
@ -230,6 +233,12 @@ begin
|
|||||||
raise ECodeToolError.Create(Self,AMessage);
|
raise ECodeToolError.Create(Self,AMessage);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomCodeTool.RaiseExceptionFmt(const AMessage: string;
|
||||||
|
const args: array of const);
|
||||||
|
begin
|
||||||
|
RaiseException(Format(AMessage,args));
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomCodeTool.SetScanner(NewScanner: TLinkScanner);
|
procedure TCustomCodeTool.SetScanner(NewScanner: TLinkScanner);
|
||||||
begin
|
begin
|
||||||
if NewScanner=FScanner then exit;
|
if NewScanner=FScanner then exit;
|
||||||
@ -248,23 +257,23 @@ end;
|
|||||||
function TCustomCodeTool.NodeSubDescToStr(Desc, SubDesc: integer): string;
|
function TCustomCodeTool.NodeSubDescToStr(Desc, SubDesc: integer): string;
|
||||||
begin
|
begin
|
||||||
if SubDesc<>0 then
|
if SubDesc<>0 then
|
||||||
Result:='(unknown subdescriptor '+IntToStr(SubDesc)+')'
|
Result:=Format(ctsUnknownSubDescriptor,[IntToStr(SubDesc)])
|
||||||
else
|
else
|
||||||
Result:='';
|
Result:='';
|
||||||
case Desc of
|
case Desc of
|
||||||
ctnProcedure:
|
ctnProcedure:
|
||||||
begin
|
begin
|
||||||
if (SubDesc and ctnsForwardDeclaration)>0 then Result:='Forward';
|
if (SubDesc and ctnsForwardDeclaration)>0 then Result:=ctsForward;
|
||||||
end;
|
end;
|
||||||
ctnProcedureHead, ctnBeginBlock:
|
ctnProcedureHead, ctnBeginBlock:
|
||||||
begin
|
begin
|
||||||
if (SubDesc and ctnsNeedJITParsing)>0 then Result:='Unparsed';
|
if (SubDesc and ctnsNeedJITParsing)>0 then Result:=ctsUnparsed;
|
||||||
end;
|
end;
|
||||||
ctnClass:
|
ctnClass:
|
||||||
begin
|
begin
|
||||||
Result:='';
|
Result:='';
|
||||||
if (SubDesc and ctnsForwardDeclaration)>0 then Result:='Forward';
|
if (SubDesc and ctnsForwardDeclaration)>0 then Result:=ctsForward;
|
||||||
if (SubDesc and ctnsNeedJITParsing)>0 then Result:=Result+'Unparsed';
|
if (SubDesc and ctnsNeedJITParsing)>0 then Result:=Result+ctsUnparsed;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -405,21 +414,19 @@ begin
|
|||||||
Result:=true
|
Result:=true
|
||||||
else begin
|
else begin
|
||||||
if ExceptionOnNotFound then
|
if ExceptionOnNotFound then
|
||||||
RaiseException(
|
RaiseExceptionFmt(ctsIdentExpectedButKeyWordFound,[GetAtom])
|
||||||
'identifier expected, but keyword '+GetAtom+' found')
|
|
||||||
else
|
else
|
||||||
Result:=false;
|
Result:=false;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
if ExceptionOnNotFound then
|
if ExceptionOnNotFound then
|
||||||
RaiseException(
|
RaiseExceptionFmt(ctsIdentExpectedButAtomFound,[GetAtom])
|
||||||
'identifier expected, but '+GetAtom+' found')
|
|
||||||
else
|
else
|
||||||
Result:=false;
|
Result:=false;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
if ExceptionOnNotFound then
|
if ExceptionOnNotFound then
|
||||||
RaiseException('unexpected end of file (identifier expected)')
|
RaiseException(ctsIdentExpectedButEOFFound)
|
||||||
else
|
else
|
||||||
Result:=false;
|
Result:=false;
|
||||||
end;
|
end;
|
||||||
@ -1080,8 +1087,7 @@ begin
|
|||||||
AntiCloseBracket:=')';
|
AntiCloseBracket:=')';
|
||||||
end else begin
|
end else begin
|
||||||
if ExceptionOnNotFound then
|
if ExceptionOnNotFound then
|
||||||
RaiseException(
|
RaiseExceptionFmt(ctsBracketOpenExpectedButAtomFound,[GetAtom]);
|
||||||
'bracket open expected, but '+GetAtom+' found');
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Start:=CurPos;
|
Start:=CurPos;
|
||||||
@ -1092,8 +1098,7 @@ begin
|
|||||||
or UpAtomIs('END') then begin
|
or UpAtomIs('END') then begin
|
||||||
CurPos:=Start;
|
CurPos:=Start;
|
||||||
if ExceptionOnNotFound then
|
if ExceptionOnNotFound then
|
||||||
RaiseException(
|
RaiseExceptionFmt(ctsBracketNotFound,[CloseBracket]);
|
||||||
'bracket '+CloseBracket+' not found');
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if (AtomIsChar('(')) or (AtomIsChar('[')) then begin
|
if (AtomIsChar('(')) or (AtomIsChar('[')) then begin
|
||||||
@ -1118,8 +1123,7 @@ begin
|
|||||||
AntiCloseBracket:='(';
|
AntiCloseBracket:='(';
|
||||||
end else begin
|
end else begin
|
||||||
if ExceptionOnNotFound then
|
if ExceptionOnNotFound then
|
||||||
RaiseException(
|
RaiseExceptionFmt(ctsBracketCloseExpectedButAtomFound,[GetAtom]);
|
||||||
'bracket close expected, but '+GetAtom+' found');
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Start:=CurPos;
|
Start:=CurPos;
|
||||||
@ -1130,8 +1134,7 @@ begin
|
|||||||
or UpAtomIs('END') or UpAtomIs('BEGIN') then begin
|
or UpAtomIs('END') or UpAtomIs('BEGIN') then begin
|
||||||
CurPos:=Start;
|
CurPos:=Start;
|
||||||
if ExceptionOnNotFound then
|
if ExceptionOnNotFound then
|
||||||
RaiseException(
|
RaiseExceptionFmt(ctsBracketNotFound,[CloseBracket]);
|
||||||
'bracket '+CloseBracket+' not found');
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if (AtomIsChar(')')) or (AtomIsChar(']')) then begin
|
if (AtomIsChar(')')) or (AtomIsChar(']')) then begin
|
||||||
@ -1315,7 +1318,7 @@ begin
|
|||||||
Result:=nil;
|
Result:=nil;
|
||||||
if (Result=nil) and ExceptionOnNotFound then begin
|
if (Result=nil) and ExceptionOnNotFound then begin
|
||||||
MoveCursorToCleanPos(P);
|
MoveCursorToCleanPos(P);
|
||||||
RaiseException('no node found at cursor');
|
RaiseException(ctsNoNodeFoundAtCursor);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1501,7 +1504,7 @@ begin
|
|||||||
if (Scanner<>nil) and (Scanner.MainCode<>nil) then
|
if (Scanner<>nil) and (Scanner.MainCode<>nil) then
|
||||||
Result:=TCodeBuffer(Scanner.MainCode).Filename
|
Result:=TCodeBuffer(Scanner.MainCode).Filename
|
||||||
else
|
else
|
||||||
Result:='(unknown mainfilename)';
|
Result:=ctsUnknownMainFilename;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ ECodeToolError }
|
{ ECodeToolError }
|
||||||
|
172
ide/inputhistory.pas
Normal file
172
ide/inputhistory.pas
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
{
|
||||||
|
/***************************************************************************
|
||||||
|
inputhistory.pas
|
||||||
|
----------------
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
***************************************************************************/
|
||||||
|
}
|
||||||
|
unit InputHistory;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, IDEProcs, XMLCfg, LazConf;
|
||||||
|
|
||||||
|
type
|
||||||
|
TInputHistories = class
|
||||||
|
private
|
||||||
|
FFilename: string;
|
||||||
|
|
||||||
|
// Find- and replace-history
|
||||||
|
FFindHistory: TStringList;
|
||||||
|
FReplaceHistory: TStringList;
|
||||||
|
FMaxFindHistory: Integer;
|
||||||
|
procedure SetFilename(const AValue: string);
|
||||||
|
public
|
||||||
|
constructor Create;
|
||||||
|
destructor Destroy; override;
|
||||||
|
procedure Clear;
|
||||||
|
procedure Load;
|
||||||
|
procedure Save;
|
||||||
|
procedure LoadFromXMLConfig(XMLConfig: TXMLConfig; const Path: string);
|
||||||
|
procedure SaveToXMLConfig(XMLConfig: TXMLConfig; const Path: string);
|
||||||
|
procedure SetLazarusDefaultFilename;
|
||||||
|
|
||||||
|
// Find- and replace-history
|
||||||
|
procedure AddToFindHistory(const AFindStr: string);
|
||||||
|
procedure AddToReplaceHistory(const AReplaceStr: String);
|
||||||
|
|
||||||
|
public
|
||||||
|
// Find- and replace-history
|
||||||
|
property FindHistory: TStringList read FFindHistory write FFindHistory;
|
||||||
|
property ReplaceHistory: TStringList read FReplaceHistory write FReplaceHistory;
|
||||||
|
property MaxFindHistory: Integer read FMaxFindHistory write FMaxFindHistory;
|
||||||
|
property Filename: string read FFilename write SetFilename;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var InputHistories: TInputHistories;
|
||||||
|
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
|
||||||
|
const
|
||||||
|
DefaultHistoryFile = 'inputhistory.xml';
|
||||||
|
InputHistoryVersion = 1;
|
||||||
|
|
||||||
|
{ TInputHistories }
|
||||||
|
|
||||||
|
procedure TInputHistories.SetFilename(const AValue: string);
|
||||||
|
begin
|
||||||
|
FFilename:=AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TInputHistories.Create;
|
||||||
|
begin
|
||||||
|
inherited Create;
|
||||||
|
// Find- and replace-history
|
||||||
|
FFindHistory:=TStringList.Create;
|
||||||
|
FReplaceHistory:=TStringList.Create;
|
||||||
|
FMaxFindHistory:=20;
|
||||||
|
|
||||||
|
FFilename:='';
|
||||||
|
Clear;
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TInputHistories.Destroy;
|
||||||
|
begin
|
||||||
|
FFindHistory.Free;
|
||||||
|
FReplaceHistory.Free;
|
||||||
|
inherited Destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TInputHistories.Clear;
|
||||||
|
begin
|
||||||
|
FFindHistory.Clear;
|
||||||
|
FReplaceHistory.Clear;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TInputHistories.LoadFromXMLConfig(XMLConfig: TXMLConfig;
|
||||||
|
const Path: string);
|
||||||
|
begin
|
||||||
|
// Find- and replace-history
|
||||||
|
fMaxFindHistory:=XMLConfig.GetValue(Path+'Find/History/Max',FMaxFindHistory);
|
||||||
|
LoadRecentList(XMLConfig,FFindHistory,Path+'Find/History/Find/');
|
||||||
|
LoadRecentList(XMLConfig,FReplaceHistory,Path+'Find/History/Replace/');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TInputHistories.SaveToXMLConfig(XMLConfig: TXMLConfig;
|
||||||
|
const Path: string);
|
||||||
|
begin
|
||||||
|
// Find- and replace-history
|
||||||
|
XMLConfig.SetValue(Path+'Find/History/Max',FMaxFindHistory);
|
||||||
|
SaveRecentList(XMLConfig,FFindHistory,Path+'Find/History/Find/');
|
||||||
|
SaveRecentList(XMLConfig,FReplaceHistory,Path+'Find/History/Replace/');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TInputHistories.SetLazarusDefaultFilename;
|
||||||
|
var
|
||||||
|
ConfFileName: string;
|
||||||
|
begin
|
||||||
|
ConfFileName:=SetDirSeparators(
|
||||||
|
GetPrimaryConfigPath+'/'+DefaultHistoryFile);
|
||||||
|
CopySecondaryConfigFile(DefaultHistoryFile);
|
||||||
|
FFilename:=ConfFilename;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TInputHistories.Load;
|
||||||
|
var
|
||||||
|
XMLConfig: TXMLConfig;
|
||||||
|
//FileVersion: integer;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
XMLConfig:=TXMLConfig.Create(FFileName);
|
||||||
|
//FileVersion:=XMLConfig.GetValue('InputHistory/Version/Value',0);
|
||||||
|
LoadFromXMLConfig(XMLConfig,'InputHistory/');
|
||||||
|
XMLConfig.Free;
|
||||||
|
except
|
||||||
|
// ToDo
|
||||||
|
writeln('[TCodeToolsOptions.Load] error reading "',FFilename,'"');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TInputHistories.Save;
|
||||||
|
var
|
||||||
|
XMLConfig: TXMLConfig;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
XMLConfig:=TXMLConfig.Create(FFileName);
|
||||||
|
XMLConfig.SetValue('InputHistory/Version/Value',
|
||||||
|
InputHistoryVersion);
|
||||||
|
SaveToXMLConfig(XMLConfig,'InputHistory/');
|
||||||
|
XMLConfig.Flush;
|
||||||
|
XMLConfig.Free;
|
||||||
|
except
|
||||||
|
// ToDo
|
||||||
|
writeln('[TEnvironmentOptions.Save] error writing "',FFilename,'"');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TInputHistories.AddToFindHistory(const AFindStr: string);
|
||||||
|
begin
|
||||||
|
AddToRecentList(AFindStr,FFindHistory,FMaxFindHistory);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TInputHistories.AddToReplaceHistory(const AReplaceStr: String);
|
||||||
|
begin
|
||||||
|
AddToRecentList(AReplaceStr,FReplaceHistory,FMaxFindHistory);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user