mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 07:47:31 +02:00
MG: old Makefile for 1.0.5 compilers
git-svn-id: trunk@1563 -
This commit is contained in:
parent
f8ec3dfdf6
commit
94d422e5fa
@ -1,8 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/03/28]
|
# Don't edit, this file is generated by FPCMake Version 1.1 [2001/12/31]
|
||||||
#
|
#
|
||||||
default: all
|
default: all
|
||||||
MAKEFILETARGETS=linux
|
|
||||||
override PATH:=$(subst \,/,$(PATH))
|
override PATH:=$(subst \,/,$(PATH))
|
||||||
ifeq ($(findstring ;,$(PATH)),)
|
ifeq ($(findstring ;,$(PATH)),)
|
||||||
inUnix=1
|
inUnix=1
|
||||||
@ -14,7 +13,10 @@ 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),)
|
||||||
$(error You need the GNU utils package to use this Makefile)
|
nopwd:
|
||||||
|
@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=
|
||||||
@ -68,22 +70,6 @@ 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)
|
||||||
@ -107,45 +93,23 @@ 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 OS_SOURCE
|
ifndef CPU_SOURCE
|
||||||
OS_SOURCE:=$(shell $(FPC) -iSO)
|
CPU_SOURCE:=$(shell $(FPC) -iSP)
|
||||||
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))
|
||||||
@ -155,14 +119,6 @@ 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)
|
||||||
@ -194,11 +150,10 @@ endif
|
|||||||
else
|
else
|
||||||
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
|
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
|
||||||
endif
|
endif
|
||||||
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
|
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
|
||||||
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
|
||||||
@ -236,11 +191,6 @@ 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
|
||||||
@ -252,9 +202,6 @@ 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
|
||||||
@ -301,43 +248,41 @@ endif
|
|||||||
endif
|
endif
|
||||||
ifndef INSTALL_SOURCEDIR
|
ifndef INSTALL_SOURCEDIR
|
||||||
ifdef UNIXINSTALLDIR
|
ifdef UNIXINSTALLDIR
|
||||||
|
ifdef INSTALL_FPCPACKAGE
|
||||||
ifdef BSDhier
|
ifdef BSDhier
|
||||||
SRCPREFIXDIR=share/src
|
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/share/src/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
||||||
else
|
else
|
||||||
SRCPREFIXDIR=src
|
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/src/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
||||||
endif
|
|
||||||
ifdef INSTALL_FPCPACKAGE
|
|
||||||
ifdef INSTALL_FPCSUBDIR
|
|
||||||
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
|
|
||||||
else
|
|
||||||
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
ifdef BSDhier
|
||||||
|
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_SOURCEDIR:=$(INSTALL_BASEDIR)/source
|
INSTALL_SOURCEDIRL:=$(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
|
||||||
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
ifdef BSDhier
|
||||||
|
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/share/doc/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
||||||
else
|
else
|
||||||
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
|
||||||
|
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
|
||||||
@ -458,13 +403,11 @@ PPUEXT=.ppo
|
|||||||
ASMEXT=.so2
|
ASMEXT=.so2
|
||||||
OEXT=.oo2
|
OEXT=.oo2
|
||||||
AOUTEXT=.out
|
AOUTEXT=.out
|
||||||
SMARTEXT=.sl2
|
SMARTEXT=.so
|
||||||
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=
|
||||||
@ -736,7 +679,6 @@ 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
|
||||||
@ -745,19 +687,76 @@ 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:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/$(OS_TARGET)/Makefile.fpc,$(PACKAGESDIR))))))
|
PACKAGEDIR_RTL:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/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)))))
|
||||||
@ -772,18 +771,19 @@ override COMPILER_UNITDIR+=$(UNITDIR_RTL)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef REQUIRE_PACKAGES_PASZLIB
|
ifdef REQUIRE_PACKAGES_PASZLIB
|
||||||
PACKAGEDIR_PASZLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR))))))
|
PACKAGEDIR_PASZLIB:=$(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,18 +798,19 @@ override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef REQUIRE_PACKAGES_INET
|
ifdef REQUIRE_PACKAGES_INET
|
||||||
PACKAGEDIR_INET:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /inet/Makefile.fpc,$(PACKAGESDIR))))))
|
PACKAGEDIR_INET:=$(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)))))
|
||||||
@ -824,18 +825,19 @@ override COMPILER_UNITDIR+=$(UNITDIR_INET)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef REQUIRE_PACKAGES_FCL
|
ifdef REQUIRE_PACKAGES_FCL
|
||||||
PACKAGEDIR_FCL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR))))))
|
PACKAGEDIR_FCL:=$(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)))))
|
||||||
@ -850,18 +852,19 @@ override COMPILER_UNITDIR+=$(UNITDIR_FCL)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef REQUIRE_PACKAGES_MYSQL
|
ifdef REQUIRE_PACKAGES_MYSQL
|
||||||
PACKAGEDIR_MYSQL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /mysql/Makefile.fpc,$(PACKAGESDIR))))))
|
PACKAGEDIR_MYSQL:=$(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)))))
|
||||||
@ -876,18 +879,19 @@ override COMPILER_UNITDIR+=$(UNITDIR_MYSQL)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef REQUIRE_PACKAGES_IBASE
|
ifdef REQUIRE_PACKAGES_IBASE
|
||||||
PACKAGEDIR_IBASE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ibase/Makefile.fpc,$(PACKAGESDIR))))))
|
PACKAGEDIR_IBASE:=$(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)))))
|
||||||
@ -901,6 +905,7 @@ 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
|
||||||
@ -1020,26 +1025,24 @@ 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 IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
|
override INSTALLPPUFILES+=$(UNITPPUFILES)
|
||||||
override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
|
override CLEANPPUFILES+=$(UNITPPUFILES)
|
||||||
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_all fpc_smart fpc_debug fpc_release
|
.PHONY: fpc_packages fpc_all fpc_smart fpc_debug
|
||||||
$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
|
$(FPCMADE): $(ALLTARGET)
|
||||||
@$(ECHOREDIR) Compiled > $(FPCMADE)
|
@$(ECHOREDIR) Compiled > $(FPCMADE)
|
||||||
fpc_all: $(FPCMADE)
|
fpc_packages: $(COMPILEPACKAGES)
|
||||||
|
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
|
||||||
fpc_release:
|
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
|
||||||
$(MAKE) all RELEASE=1
|
|
||||||
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp .rc .res
|
|
||||||
%$(PPUEXT): %.pp
|
%$(PPUEXT): %.pp
|
||||||
$(COMPILER) $<
|
$(COMPILER) $<
|
||||||
$(EXECPPAS)
|
$(EXECPPAS)
|
||||||
@ -1052,8 +1055,6 @@ fpc_release:
|
|||||||
%$(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)
|
||||||
@ -1061,9 +1062,6 @@ 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))
|
||||||
@ -1112,7 +1110,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)
|
||||||
@ -1244,13 +1242,12 @@ 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) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
|
-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
|
||||||
ifdef AOUTEXT
|
ifdef AOUTEXT
|
||||||
-$(DEL) *$(AOUTEXT)
|
-$(DEL) *$(AOUTEXT)
|
||||||
endif
|
endif
|
||||||
.PHONY: fpc_baseinfo
|
.PHONY: fpc_info
|
||||||
override INFORULES+=fpc_baseinfo
|
fpc_info:
|
||||||
fpc_baseinfo:
|
|
||||||
@$(ECHO)
|
@$(ECHO)
|
||||||
@$(ECHO) == Package info ==
|
@$(ECHO) == Package info ==
|
||||||
@$(ECHO) Package Name..... $(PACKAGE_NAME)
|
@$(ECHO) Package Name..... $(PACKAGE_NAME)
|
||||||
@ -1264,13 +1261,11 @@ fpc_baseinfo:
|
|||||||
@$(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 Source.. $(FULL_SOURCE)
|
@$(ECHO) Full Target.. $(FULL_SOURCE)
|
||||||
@$(ECHO) Full Target.. $(FULL_TARGET)
|
@$(ECHO) Full Source.. $(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)
|
||||||
@ -1300,13 +1295,12 @@ fpc_baseinfo:
|
|||||||
@$(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 Implicit Units. $(TARGET_IMPLICITUNITS)
|
@$(ECHO) Target Programs..... $(TARGET_PROGRAMS)
|
||||||
@$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
|
@$(ECHO) Target Dirs......... $(TARGET_DIRS)
|
||||||
@$(ECHO) Target Dirs........... $(TARGET_DIRS)
|
@$(ECHO) Target Examples..... $(TARGET_EXAMPLES)
|
||||||
@$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
|
@$(ECHO) Target ExampleDirs.. $(TARGET_EXAMPLEDIRS)
|
||||||
@$(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)
|
||||||
@ -1333,25 +1327,8 @@ fpc_baseinfo:
|
|||||||
@$(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
|
||||||
@ -1366,8 +1343,7 @@ clean: fpc_clean
|
|||||||
distclean: fpc_distclean
|
distclean: fpc_distclean
|
||||||
cleanall: fpc_cleanall
|
cleanall: fpc_cleanall
|
||||||
info: fpc_info
|
info: fpc_info
|
||||||
makefiles: fpc_makefiles
|
.PHONY: debug smart examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info
|
||||||
.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
|
||||||
|
@ -469,7 +469,7 @@ writeln('[TCodeCompletionCodeTool.CompleteProperty] CleanAccessFunc ',CleanAcces
|
|||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
writeln('[TCodeCompletionCodeTool.CompleteProperty] Error reading param list');
|
writeln('[TCodeCompletionCodeTool.CompleteProperty] Error reading param list');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
RaiseException('error in parameter list');
|
RaiseException(ctsErrorInParamList);
|
||||||
end;
|
end;
|
||||||
ParamList:=GetExtraction;
|
ParamList:=GetExtraction;
|
||||||
if (Parts[ppIndexWord].StartPos<1) then begin
|
if (Parts[ppIndexWord].StartPos<1) then begin
|
||||||
@ -582,7 +582,7 @@ writeln('[TCodeCompletionCodeTool.CompleteProperty] write specifier needed');
|
|||||||
phpWithoutBrackets,phpWithVarModifiers,
|
phpWithoutBrackets,phpWithVarModifiers,
|
||||||
phpWithComments])
|
phpWithComments])
|
||||||
then
|
then
|
||||||
RaiseException('error in param list');
|
RaiseException(ctsErrorInParamList);
|
||||||
ParamList:=GetExtraction;
|
ParamList:=GetExtraction;
|
||||||
if (Parts[ppIndexWord].StartPos<1) then begin
|
if (Parts[ppIndexWord].StartPos<1) then begin
|
||||||
// param list, no index
|
// param list, no index
|
||||||
@ -1149,7 +1149,7 @@ writeln('TCodeCompletionCodeTool.CreateMissingProcBodies Starting class in imple
|
|||||||
// -> insert at the end of the implementation section
|
// -> insert at the end of the implementation section
|
||||||
ImplementationNode:=FindImplementationNode;
|
ImplementationNode:=FindImplementationNode;
|
||||||
if ImplementationNode=nil then
|
if ImplementationNode=nil then
|
||||||
RaiseException('implementation node not found');
|
RaiseException(ctsImplementationNodeNotFound);
|
||||||
Indent:=GetLineIndent(Src,ImplementationNode.StartPos);
|
Indent:=GetLineIndent(Src,ImplementationNode.StartPos);
|
||||||
if (ImplementationNode.LastChild=nil)
|
if (ImplementationNode.LastChild=nil)
|
||||||
or (ImplementationNode.LastChild.Desc<>ctnBeginBlock) then
|
or (ImplementationNode.LastChild.Desc<>ctnBeginBlock) then
|
||||||
@ -1163,11 +1163,11 @@ writeln('TCodeCompletionCodeTool.CreateMissingProcBodies Starting class in imple
|
|||||||
// -> insert at the end of the type section
|
// -> insert at the end of the type section
|
||||||
ANode:=ClassNode.Parent; // type definition
|
ANode:=ClassNode.Parent; // type definition
|
||||||
if ANode=nil then
|
if ANode=nil then
|
||||||
RaiseException('class node without parent node');
|
RaiseException(ctsClassNodeWithoutParentNode);
|
||||||
if ANode.Parent.Desc=ctnTypeSection then
|
if ANode.Parent.Desc=ctnTypeSection then
|
||||||
ANode:=ANode.Parent; // type section
|
ANode:=ANode.Parent; // type section
|
||||||
if ANode=nil then
|
if ANode=nil then
|
||||||
RaiseException('type section of class section not found');
|
RaiseException(ctsTypeSectionOfClassNotFound);
|
||||||
Indent:=GetLineIndent(Src,ANode.StartPos);
|
Indent:=GetLineIndent(Src,ANode.StartPos);
|
||||||
InsertPos:=ANode.EndPos;
|
InsertPos:=ANode.EndPos;
|
||||||
end;
|
end;
|
||||||
@ -1397,7 +1397,7 @@ writeln('TCodeCompletionCodeTool.CompleteCode Complete Properties ... ');
|
|||||||
if ANode.Desc=ctnProperty then begin
|
if ANode.Desc=ctnProperty then begin
|
||||||
// check if property is complete
|
// check if property is complete
|
||||||
if not CompleteProperty(ANode) then
|
if not CompleteProperty(ANode) then
|
||||||
RaiseException('unable to complete property');
|
RaiseException(ctsUnableToCompleteProperty);
|
||||||
end;
|
end;
|
||||||
ANode:=ANode.NextBrother;
|
ANode:=ANode.NextBrother;
|
||||||
end;
|
end;
|
||||||
@ -1409,21 +1409,21 @@ writeln('TCodeCompletionCodeTool.CompleteCode Insert new variables and methods .
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// insert all new variables and procs definitions
|
// insert all new variables and procs definitions
|
||||||
if not InsertAllNewClassParts then
|
if not InsertAllNewClassParts then
|
||||||
RaiseException('error during inserting new class parts');
|
RaiseException(ctsErrorDuringInsertingNewClassParts);
|
||||||
|
|
||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
writeln('TCodeCompletionCodeTool.CompleteCode Insert new method bodies ... ');
|
writeln('TCodeCompletionCodeTool.CompleteCode Insert new method bodies ... ');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// insert all missing proc bodies
|
// insert all missing proc bodies
|
||||||
if not CreateMissingProcBodies then
|
if not CreateMissingProcBodies then
|
||||||
RaiseException('error during creation of new proc bodies');
|
RaiseException(ctsErrorDuringCreationOfNewProcBodies);
|
||||||
|
|
||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
writeln('TCodeCompletionCodeTool.CompleteCode Apply ... ');
|
writeln('TCodeCompletionCodeTool.CompleteCode Apply ... ');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// apply the changes and jump to first new proc body
|
// apply the changes and jump to first new proc body
|
||||||
if not SourceChangeCache.Apply then
|
if not SourceChangeCache.Apply then
|
||||||
RaiseException('unable to apply changes');
|
RaiseException(ctsUnableToApplyChanges);
|
||||||
|
|
||||||
if JumpToProcName<>'' then begin
|
if JumpToProcName<>'' then begin
|
||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
@ -1435,11 +1435,11 @@ writeln('TCodeCompletionCodeTool.CompleteCode Jump to new proc body ... ');
|
|||||||
// reparse code
|
// reparse code
|
||||||
BuildTree(false);
|
BuildTree(false);
|
||||||
if not EndOfSourceFound then
|
if not EndOfSourceFound then
|
||||||
RaiseException('End of source not found');
|
RaiseException(ctsEndOfSourceNotFound);
|
||||||
// find the CursorPos in cleaned source
|
// find the CursorPos in cleaned source
|
||||||
Dummy:=CaretToCleanPos(CursorPos, CleanCursorPos);
|
Dummy:=CaretToCleanPos(CursorPos, CleanCursorPos);
|
||||||
if (Dummy<>0) and (Dummy<>-1) then
|
if (Dummy<>0) and (Dummy<>-1) then
|
||||||
RaiseException('cursor pos outside of code');
|
RaiseException(ctsCursorPosOutsideOfCode);
|
||||||
// find CodeTreeNode at cursor
|
// find CodeTreeNode at cursor
|
||||||
CursorNode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
CursorNode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
||||||
|
|
||||||
@ -1447,16 +1447,16 @@ writeln('TCodeCompletionCodeTool.CompleteCode Jump to new proc body ... ');
|
|||||||
while (ClassNode<>nil) and (ClassNode.Desc<>ctnClass) do
|
while (ClassNode<>nil) and (ClassNode.Desc<>ctnClass) do
|
||||||
ClassNode:=ClassNode.Parent;
|
ClassNode:=ClassNode.Parent;
|
||||||
if ClassNode=nil then
|
if ClassNode=nil then
|
||||||
RaiseException('oops, I loosed your class');
|
RaiseException('oops, I loose your class');
|
||||||
ANode:=ClassNode.Parent;
|
ANode:=ClassNode.Parent;
|
||||||
if ANode=nil then
|
if ANode=nil then
|
||||||
RaiseException('class without parent node');
|
RaiseException(ctsClassNodeWithoutParentNode);
|
||||||
if (ANode.Parent<>nil) and (ANode.Parent.Desc=ctnTypeSection) then
|
if (ANode.Parent<>nil) and (ANode.Parent.Desc=ctnTypeSection) then
|
||||||
ANode:=ANode.Parent;
|
ANode:=ANode.Parent;
|
||||||
ProcNode:=FindProcNode(ANode,JumpToProcName,
|
ProcNode:=FindProcNode(ANode,JumpToProcName,
|
||||||
[phpInUpperCase,phpIgnoreForwards]);
|
[phpInUpperCase,phpIgnoreForwards]);
|
||||||
if ProcNode=nil then
|
if ProcNode=nil then
|
||||||
RaiseException('new proc body not found');
|
RaiseException(ctsNewProcBodyNotFound);
|
||||||
Result:=FindJumpPointInProcNode(ProcNode,NewPos,NewTopLine);
|
Result:=FindJumpPointInProcNode(ProcNode,NewPos,NewTopLine);
|
||||||
exit;
|
exit;
|
||||||
end else begin
|
end else begin
|
||||||
|
@ -39,9 +39,9 @@ uses
|
|||||||
{$IFDEF MEM_CHECK}
|
{$IFDEF MEM_CHECK}
|
||||||
MemCheck,
|
MemCheck,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, SysUtils, EventCodeTool, CodeTree, CodeAtom, SourceChanger,
|
Classes, SysUtils, CodeToolsStrConsts, EventCodeTool, CodeTree, CodeAtom,
|
||||||
DefineTemplates, CodeCache, ExprEval, LinkScanner, KeywordFuncLists, TypInfo,
|
SourceChanger, DefineTemplates, CodeCache, ExprEval, LinkScanner,
|
||||||
AVL_Tree, CustomCodeTool, FindDeclarationTool;
|
KeywordFuncLists, TypInfo, AVL_Tree, CustomCodeTool, FindDeclarationTool;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCodeToolManager = class;
|
TCodeToolManager = class;
|
||||||
@ -502,8 +502,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if MainCode.Scanner=nil then begin
|
if MainCode.Scanner=nil then begin
|
||||||
FErrorMsg:='No scanner found for "'+MainCode.Filename+'".'
|
FErrorMsg:=Format(ctsNoScannerFound,[MainCode.Filename]);
|
||||||
+' If this is an include file, please open the main source first.';
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
FCurCodeTool:=TCodeTool(GetCodeToolForSource(MainCode,true));
|
FCurCodeTool:=TCodeTool(GetCodeToolForSource(MainCode,true));
|
||||||
@ -514,14 +513,13 @@ writeln('[TCodeToolManager.InitCurCodeTool] ',Code.Filename,' ',Code.SourceLengt
|
|||||||
Result:=(FCurCodeTool.Scanner<>nil);
|
Result:=(FCurCodeTool.Scanner<>nil);
|
||||||
if not Result then begin
|
if not Result then begin
|
||||||
fErrorCode:=MainCode;
|
fErrorCode:=MainCode;
|
||||||
fErrorMsg:='No scanner available';
|
fErrorMsg:=ctsNoScannerAvailable;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCodeToolManager.HandleException(AnException: Exception): boolean;
|
function TCodeToolManager.HandleException(AnException: Exception): boolean;
|
||||||
var ErrorSrcTool: TCustomCodeTool;
|
var ErrorSrcTool: TCustomCodeTool;
|
||||||
begin
|
begin
|
||||||
writeln(' BBB ');
|
|
||||||
fErrorMsg:=AnException.Message;
|
fErrorMsg:=AnException.Message;
|
||||||
if not ((AnException is ELinkScannerError) or (AnException is ECodeToolError))
|
if not ((AnException is ELinkScannerError) or (AnException is ECodeToolError))
|
||||||
then begin
|
then begin
|
||||||
@ -1419,14 +1417,14 @@ begin
|
|||||||
MainCode:=GetMainCode(Code); // create a scanner
|
MainCode:=GetMainCode(Code); // create a scanner
|
||||||
if (MainCode<>Code) then begin
|
if (MainCode<>Code) then begin
|
||||||
if ExceptionOnError then
|
if ExceptionOnError then
|
||||||
raise Exception.Create('the source "'+Code.Filename+'"'
|
raise Exception.Create('[TCodeToolManager.GetCodeToolForSource]'
|
||||||
|
+' the source "'+Code.Filename+'"'
|
||||||
+' is an include file of "'+MainCode.Filename+'"');
|
+' is an include file of "'+MainCode.Filename+'"');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if Code.Scanner=nil then begin
|
if Code.Scanner=nil then begin
|
||||||
if ExceptionOnError then
|
if ExceptionOnError then
|
||||||
raise Exception.Create('No scanner found for "'+Code.Filename+'".'
|
raise Exception.CreateFmt(ctsNoScannerFound,[Code.Filename]);
|
||||||
+' If this is an include file, please open the main source first.');
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Result:=TCodeTool.Create;
|
Result:=TCodeTool.Create;
|
||||||
|
@ -34,14 +34,15 @@ uses
|
|||||||
Classes, SysUtils;
|
Classes, SysUtils;
|
||||||
|
|
||||||
ResourceString
|
ResourceString
|
||||||
|
// codetree
|
||||||
ctsUnknownSubDescriptor = '(unknown subdescriptor %s)';
|
ctsUnknownSubDescriptor = '(unknown subdescriptor %s)';
|
||||||
ctsForward = 'Forward';
|
ctsForward = 'Forward';
|
||||||
ctsUnparsed = 'Unparsed';
|
ctsUnparsed = 'Unparsed';
|
||||||
|
|
||||||
|
// customcodetool
|
||||||
ctsIdentExpectedButAtomFound = 'identifier expected, but %s found';
|
ctsIdentExpectedButAtomFound = 'identifier expected, but %s found';
|
||||||
ctsIdentExpectedButKeyWordFound = 'identifier expected, but keyword %s found';
|
ctsIdentExpectedButKeyWordFound = 'identifier expected, but keyword %s found';
|
||||||
ctsCharExpectedButAtomFound = '%s expected, but %s found';
|
ctsCharExpectedButAtomFound = '%s expected, but %s found';
|
||||||
|
|
||||||
ctsIdentExpectedButEOFFound = 'unexpected end of file (identifier expected)';
|
ctsIdentExpectedButEOFFound = 'unexpected end of file (identifier expected)';
|
||||||
ctsBracketOpenExpectedButAtomFound = 'bracket open expected, but %s found';
|
ctsBracketOpenExpectedButAtomFound = 'bracket open expected, but %s found';
|
||||||
ctsBracketCloseExpectedButAtomFound = 'bracket close expected, but %s found';
|
ctsBracketCloseExpectedButAtomFound = 'bracket close expected, but %s found';
|
||||||
@ -49,6 +50,7 @@ ResourceString
|
|||||||
ctsNoNodeFoundAtCursor = 'no node found at cursor';
|
ctsNoNodeFoundAtCursor = 'no node found at cursor';
|
||||||
ctsUnknownMainFilename = '(unknown mainfilename)';
|
ctsUnknownMainFilename = '(unknown mainfilename)';
|
||||||
|
|
||||||
|
// codecompletion
|
||||||
ctsPropertySpecifierAlreadyDefined = 'property specifier already defined: %s';
|
ctsPropertySpecifierAlreadyDefined = 'property specifier already defined: %s';
|
||||||
ctsErrorInParamList = 'error in paramlist';
|
ctsErrorInParamList = 'error in paramlist';
|
||||||
ctsPropertTypeExpectedButAtomFound = 'property type expected, but %s found';
|
ctsPropertTypeExpectedButAtomFound = 'property type expected, but %s found';
|
||||||
@ -57,7 +59,52 @@ ResourceString
|
|||||||
ctsDefaultSpecifierRedefined = 'default specifier redefined';
|
ctsDefaultSpecifierRedefined = 'default specifier redefined';
|
||||||
ctsDefaultParameterExpectedButAtomFound = 'default parameter expected, but %s found';
|
ctsDefaultParameterExpectedButAtomFound = 'default parameter expected, but %s found';
|
||||||
ctsNodefaultSpecifierDefinedTwice = 'nodefault specifier defined twice';
|
ctsNodefaultSpecifierDefinedTwice = 'nodefault specifier defined twice';
|
||||||
|
ctsImplementationNodeNotFound = 'implementation node not found';
|
||||||
|
ctsClassNodeWithoutParentNode = 'class node without parent node';
|
||||||
|
ctsTypeSectionOfClassNotFound = 'type section of class not found';
|
||||||
|
ctsUnableToCompleteProperty = 'unable to complete property';
|
||||||
|
ctsErrorDuringInsertingNewClassParts = 'error during inserting new class parts';
|
||||||
|
ctsErrorDuringCreationOfNewProcBodies = 'error during creation of new proc bodies';
|
||||||
|
ctsUnableToApplyChanges = 'unable to apply changes';
|
||||||
|
ctsEndOfSourceNotFound = 'End of source not found';
|
||||||
|
ctsCursorPosOutsideOfCode = 'cursor pos outside of code';
|
||||||
|
ctsNewProcBodyNotFound = 'new proc body not found';
|
||||||
|
|
||||||
|
// codetoolsmanager
|
||||||
|
ctsNoScannerFound = 'No scanner found for "%s".'
|
||||||
|
+' If this is an include file, please open the main source first.';
|
||||||
|
ctsNoScannerAvailable = 'No scanner available';
|
||||||
|
|
||||||
|
// definetemplates
|
||||||
|
ctsUnknownFunction = 'Unknown function %s';
|
||||||
|
ctsSyntaxErrorInExpr = 'Syntax Error in expression "%s"';
|
||||||
|
ctsDefaultppc386Macro = 'Default ppc386 macro';
|
||||||
|
ctsDefaultppc386TargetOperatingSystem = 'Default ppc386 target Operating System';
|
||||||
|
ctsDefaultppc386SourceOperatingSystem = 'Default ppc386 source Operating System';
|
||||||
|
ctsDefaultppc386TargetProcessor = 'Default ppc386 target processor';
|
||||||
|
ctsFreePascalCompilerInitialMacros = 'Free Pascal Compiler initial makros';
|
||||||
|
ctsFreePascalSourcesPlusDesc = 'Free Pascal Sources, %s';
|
||||||
|
ctsSourceFilenamesForStandardFPCUnits =
|
||||||
|
'Source filenames for the standard fpc units';
|
||||||
|
ctsFreePascalSourceDir = 'Free Pascal Source Directory';
|
||||||
|
ctsSrcPathInitialization = 'SrcPath Initialization';
|
||||||
|
ctsCompiler = 'Compiler';
|
||||||
|
ctsRuntimeLibrary = 'Runtime library';
|
||||||
|
ctsProcessorSpecific = 'processor specific';
|
||||||
|
ctsFreePascalComponentLibrary = 'Free Pascal Component Library';
|
||||||
|
ctsIncludeDirectoriesPlusDirs = 'include directories: %s';
|
||||||
|
ctsPackageDirectories = 'Package directories';
|
||||||
|
ctsDefsForLazarusSources = 'Definitions for the Lazarus Sources';
|
||||||
|
ctsAddsDirToSourcePath = 'adds %s to SrcPath';
|
||||||
|
ctsLazMainDirIncludePath = 'sets IncPath to %s';
|
||||||
|
ctsNamedDirectory = '%s Directory';
|
||||||
|
ctsAbstractWidgetPath = 'abstract widget path';
|
||||||
|
ctsWidgetDirectory = 'Widget Directory';
|
||||||
|
ctsComponentsDirectory = 'Components Directory';
|
||||||
|
ctsToolsDirectory = 'Tools Directory';
|
||||||
|
ctsDesignerDirectory = 'Designer Directory';
|
||||||
|
ctsLazarusMainDirectory = 'lazarus main directory';
|
||||||
|
ctsDebuggerDirectory = 'Debugger Directory';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -50,7 +50,8 @@ unit DefineTemplates;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, ExprEval{$ifdef FPC}, XMLCfg{$endif}, AVL_Tree, Process,
|
Classes, SysUtils, CodeToolsStrConsts, ExprEval
|
||||||
|
{$ifdef FPC}, XMLCfg{$endif}, AVL_Tree, Process,
|
||||||
KeywordFuncLists, FileProcs;
|
KeywordFuncLists, FileProcs;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -64,7 +65,7 @@ const
|
|||||||
{$define CaseInsensitiveFilenames}
|
{$define CaseInsensitiveFilenames}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
// Standard Template Names
|
// Standard Template Names (do not translate them)
|
||||||
StdDefTemplFPC = 'Free Pascal Compiler';
|
StdDefTemplFPC = 'Free Pascal Compiler';
|
||||||
StdDefTemplFPCSrc = 'Free Pascal Sources';
|
StdDefTemplFPCSrc = 'Free Pascal Sources';
|
||||||
StdDefTemplLazarusSources = 'Lazarus Sources';
|
StdDefTemplLazarusSources = 'Lazarus Sources';
|
||||||
@ -368,7 +369,7 @@ function FilenameIsMatching(const Mask, Filename: string;
|
|||||||
}
|
}
|
||||||
var DirStartMask, DirEndMask, DirStartFile, DirEndFile, AsteriskPos: integer;
|
var DirStartMask, DirEndMask, DirStartFile, DirEndFile, AsteriskPos: integer;
|
||||||
begin
|
begin
|
||||||
//writeln('[FilenameIsMatching] Mask="',Mask,'" Filename="',Filename,'" MatchExactly=',MatchExactly);
|
//writeln('[FilenameIsMatching] Mask="',Mask,'" Filename="',Filename,'" MatchExactly=',MatchExactly);
|
||||||
Result:=false;
|
Result:=false;
|
||||||
if (Filename='') then exit;
|
if (Filename='') then exit;
|
||||||
if (Mask='') then begin
|
if (Mask='') then begin
|
||||||
@ -404,8 +405,8 @@ begin
|
|||||||
else
|
else
|
||||||
inc(DirEndFile);
|
inc(DirEndFile);
|
||||||
end;
|
end;
|
||||||
// writeln(' Compare "',copy(Mask,DirStartMask,DirEndMask-DirStartMask),'"',
|
// writeln(' Compare "',copy(Mask,DirStartMask,DirEndMask-DirStartMask),'"',
|
||||||
// ' "',copy(Filename,DirStartFile,DirEndFile-DirStartFile),'"');
|
// ' "',copy(Filename,DirStartFile,DirEndFile-DirStartFile),'"');
|
||||||
// compare directories
|
// compare directories
|
||||||
AsteriskPos:=0;
|
AsteriskPos:=0;
|
||||||
while (DirStartMask<DirEndMask) and (DirStartFile<DirEndFile) do begin
|
while (DirStartMask<DirEndMask) and (DirStartFile<DirEndFile) do begin
|
||||||
@ -456,7 +457,7 @@ begin
|
|||||||
inc(DirStartFile);
|
inc(DirStartFile);
|
||||||
Result:=(Result and (DirStartFile>length(Filename)));
|
Result:=(Result and (DirStartFile>length(Filename)));
|
||||||
end;
|
end;
|
||||||
//writeln(' [FilenameIsMatching] Result=',Result,' ',DirStartMask,',',length(Mask),' ',DirStartFile,',',length(Filename));
|
//writeln(' [FilenameIsMatching] Result=',Result,' ',DirStartMask,',',length(Mask),' ',DirStartFile,',',length(Filename));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -567,7 +568,6 @@ begin
|
|||||||
while ANode<>nil do begin
|
while ANode<>nil do begin
|
||||||
NextNode:=ANode.Next;
|
NextNode:=ANode.Next;
|
||||||
if ANode.FMarked then begin
|
if ANode.FMarked then begin
|
||||||
writeln(' REMOVING ',ANode.Name);
|
|
||||||
ANode.Unbind;
|
ANode.Unbind;
|
||||||
ANode.Free;
|
ANode.Free;
|
||||||
end else begin
|
end else begin
|
||||||
@ -605,8 +605,9 @@ begin
|
|||||||
if FParent<>nil then begin
|
if FParent<>nil then begin
|
||||||
ANode:=Self;
|
ANode:=Self;
|
||||||
while ANode<>nil do begin
|
while ANode<>nil do begin
|
||||||
if ANode=APrior then raise Exception.Create('internal error: '
|
if ANode=APrior then
|
||||||
+'TDefineTemplate.InsertBehind: APrior=ANode');
|
raise Exception.Create('internal error: '
|
||||||
|
+'TDefineTemplate.InsertBehind: APrior=ANode');
|
||||||
dec(FParent.FChildCount);
|
dec(FParent.FChildCount);
|
||||||
ANode.FParent:=nil;
|
ANode.FParent:=nil;
|
||||||
ANode:=ANode.Next;
|
ANode:=ANode.Next;
|
||||||
@ -638,8 +639,9 @@ begin
|
|||||||
if FParent<>nil then begin
|
if FParent<>nil then begin
|
||||||
ANode:=Self;
|
ANode:=Self;
|
||||||
while ANode<>nil do begin
|
while ANode<>nil do begin
|
||||||
if ANode=ANext then raise Exception.Create('internal error: '
|
if ANode=ANext then
|
||||||
+'TDefineTemplate.InsertInFront: ANext=ANode');
|
raise Exception.Create('internal error: '
|
||||||
|
+'TDefineTemplate.InsertInFront: ANext=ANode');
|
||||||
dec(FParent.FChildCount);
|
dec(FParent.FChildCount);
|
||||||
ANode.FParent:=nil;
|
ANode.FParent:=nil;
|
||||||
ANode:=ANode.Next;
|
ANode:=ANode.Next;
|
||||||
@ -737,7 +739,6 @@ end;
|
|||||||
function TDefineTemplate.CreateCopy(OnlyMarked: boolean): TDefineTemplate;
|
function TDefineTemplate.CreateCopy(OnlyMarked: boolean): TDefineTemplate;
|
||||||
var LastNewNode, NewNode, ANode: TDefineTemplate;
|
var LastNewNode, NewNode, ANode: TDefineTemplate;
|
||||||
begin
|
begin
|
||||||
//writeln('TDefineTemplate.CreateCopy A ',ConsistencyCheck);
|
|
||||||
Result:=nil;
|
Result:=nil;
|
||||||
LastNewNode:=nil;
|
LastNewNode:=nil;
|
||||||
ANode:=Self;
|
ANode:=Self;
|
||||||
@ -760,7 +761,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
ANode:=ANode.Next;
|
ANode:=ANode.Next;
|
||||||
end;
|
end;
|
||||||
//writeln('TDefineTemplate.CreateCopy B ',ConsistencyCheck);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDefineTemplate.FindRoot: TDefineTemplate;
|
function TDefineTemplate.FindRoot: TDefineTemplate;
|
||||||
@ -1342,7 +1342,7 @@ function TDefineTree.GetDefinesForDirectory(
|
|||||||
var ExpPath: string;
|
var ExpPath: string;
|
||||||
DirDef: TDirectoryDefines;
|
DirDef: TDirectoryDefines;
|
||||||
begin
|
begin
|
||||||
//writeln('[TDefineTree.GetDefinesForDirectory] "',Path,'"');
|
//writeln('[TDefineTree.GetDefinesForDirectory] "',Path,'"');
|
||||||
ExpPath:=Path;
|
ExpPath:=Path;
|
||||||
if (ExpPath<>'') and (ExpPath[length(ExpPath)]<>PathDelim) then
|
if (ExpPath<>'') and (ExpPath[length(ExpPath)]<>PathDelim) then
|
||||||
ExpPath:=ExpPath+PathDelim;
|
ExpPath:=ExpPath+PathDelim;
|
||||||
@ -1352,7 +1352,7 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
DirDef:=TDirectoryDefines.Create;
|
DirDef:=TDirectoryDefines.Create;
|
||||||
DirDef.Path:=ExpPath;
|
DirDef.Path:=ExpPath;
|
||||||
//writeln('[TDefineTree.GetDefinesForDirectory] B ',ExpPath,' ');
|
//writeln('[TDefineTree.GetDefinesForDirectory] B ',ExpPath,' ');
|
||||||
if Calculate(DirDef) then begin
|
if Calculate(DirDef) then begin
|
||||||
FCache.Add(DirDef);
|
FCache.Add(DirDef);
|
||||||
Result:=DirDef.Values;
|
Result:=DirDef.Values;
|
||||||
@ -1368,12 +1368,12 @@ begin
|
|||||||
if FVirtualDirCache<>nil then
|
if FVirtualDirCache<>nil then
|
||||||
Result:=FVirtualDirCache.Values
|
Result:=FVirtualDirCache.Values
|
||||||
else begin
|
else begin
|
||||||
//writeln('################ TDefineTree.GetDefinesForVirtualDirectory');
|
//writeln('################ TDefineTree.GetDefinesForVirtualDirectory');
|
||||||
FVirtualDirCache:=TDirectoryDefines.Create;
|
FVirtualDirCache:=TDirectoryDefines.Create;
|
||||||
FVirtualDirCache.Path:=VirtualDirectory;
|
FVirtualDirCache.Path:=VirtualDirectory;
|
||||||
if Calculate(FVirtualDirCache) then begin
|
if Calculate(FVirtualDirCache) then begin
|
||||||
Result:=FVirtualDirCache.Values;
|
Result:=FVirtualDirCache.Values;
|
||||||
//writeln(TDefineTree.GetDefinesForVirtualDirectory Result.AsString);
|
//writeln(TDefineTree.GetDefinesForVirtualDirectory Result.AsString);
|
||||||
end else begin
|
end else begin
|
||||||
FVirtualDirCache.Free;
|
FVirtualDirCache.Free;
|
||||||
FVirtualDirCache:=nil;
|
FVirtualDirCache:=nil;
|
||||||
@ -1423,14 +1423,14 @@ var
|
|||||||
Ext:=ExtractFileExt(Result);
|
Ext:=ExtractFileExt(Result);
|
||||||
Result:=copy(Result,1,length(Result)-length(Ext));
|
Result:=copy(Result,1,length(Result)-length(Ext));
|
||||||
end else
|
end else
|
||||||
Result:='<Unknown function '+FuncName+'>';
|
Result:='<'+Format(ctsUnknownFunction,[FuncName])+'>';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// function ReadValue(const PreValue, CurDefinePath: string): string;
|
// function ReadValue(const PreValue, CurDefinePath: string): string;
|
||||||
var MacroStart,MacroEnd: integer;
|
var MacroStart,MacroEnd: integer;
|
||||||
MacroFuncName, MacroStr, MacroParam: string;
|
MacroFuncName, MacroStr, MacroParam: string;
|
||||||
begin
|
begin
|
||||||
// writeln(' [ReadValue] A "',PreValue,'"');
|
// writeln(' [ReadValue] A "',PreValue,'"');
|
||||||
Result:=PreValue;
|
Result:=PreValue;
|
||||||
MacroStart:=1;
|
MacroStart:=1;
|
||||||
while MacroStart<=length(Result) do begin
|
while MacroStart<=length(Result) do begin
|
||||||
@ -1462,8 +1462,8 @@ var
|
|||||||
end else begin
|
end else begin
|
||||||
// Macro variable
|
// Macro variable
|
||||||
MacroStr:=copy(Result,MacroStart+2,MacroEnd-MacroStart-3);
|
MacroStr:=copy(Result,MacroStart+2,MacroEnd-MacroStart-3);
|
||||||
//writeln('**** MacroStr=',MacroStr);
|
//writeln('**** MacroStr=',MacroStr);
|
||||||
//writeln('DirDef.Values=',DirDef.Values.AsString);
|
//writeln('DirDef.Values=',DirDef.Values.AsString);
|
||||||
if MacroStr=DefinePathMacroName then begin
|
if MacroStr=DefinePathMacroName then begin
|
||||||
MacroStr:=CurDefinePath;
|
MacroStr:=CurDefinePath;
|
||||||
end else begin
|
end else begin
|
||||||
@ -1476,7 +1476,7 @@ var
|
|||||||
end else
|
end else
|
||||||
MacroStr:='';
|
MacroStr:='';
|
||||||
end;
|
end;
|
||||||
//writeln('**** Result MacroStr=',MacroStr);
|
//writeln('**** Result MacroStr=',MacroStr);
|
||||||
end;
|
end;
|
||||||
Result:=copy(Result,1,MacroStart-1)+MacroStr
|
Result:=copy(Result,1,MacroStart-1)+MacroStr
|
||||||
+copy(Result,MacroEnd,length(Result)-MacroEnd+1);
|
+copy(Result,MacroEnd,length(Result)-MacroEnd+1);
|
||||||
@ -1484,7 +1484,7 @@ var
|
|||||||
end;
|
end;
|
||||||
MacroStart:=MacroEnd;
|
MacroStart:=MacroEnd;
|
||||||
end;
|
end;
|
||||||
//writeln(' [ReadValue] END "',Result,'"');
|
//writeln(' [ReadValue] END "',Result,'"');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure CalculateTemplate(DefTempl: TDefineTemplate; const CurPath: string);
|
procedure CalculateTemplate(DefTempl: TDefineTemplate; const CurPath: string);
|
||||||
@ -1505,7 +1505,7 @@ var
|
|||||||
var SubPath: string;
|
var SubPath: string;
|
||||||
begin
|
begin
|
||||||
while DefTempl<>nil do begin
|
while DefTempl<>nil do begin
|
||||||
//writeln(' [CalculateTemplate] CurPath="',CurPath,'" DefTempl.Name="',DefTempl.Name,'"');
|
//writeln(' [CalculateTemplate] CurPath="',CurPath,'" DefTempl.Name="',DefTempl.Name,'"');
|
||||||
case DefTempl.Action of
|
case DefTempl.Action of
|
||||||
da_Block:
|
da_Block:
|
||||||
// calculate children
|
// calculate children
|
||||||
@ -1546,8 +1546,8 @@ var
|
|||||||
if EvalResult='1' then
|
if EvalResult='1' then
|
||||||
CalculateIfChilds
|
CalculateIfChilds
|
||||||
else if EvalResult='0' then begin
|
else if EvalResult='0' then begin
|
||||||
FErrorDescription:='Syntax Error in expression '
|
FErrorDescription:=Format(ctsSyntaxErrorInExpr,
|
||||||
+'"'+ReadValue(DefTempl.Value,CurPath)+'"';
|
[ReadValue(DefTempl.Value,CurPath)]);
|
||||||
FErrorTemplate:=DefTempl;
|
FErrorTemplate:=DefTempl;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -1589,7 +1589,7 @@ var
|
|||||||
|
|
||||||
// function TDefineTree.Calculate(DirDef: TDirectoryDefines): boolean;
|
// function TDefineTree.Calculate(DirDef: TDirectoryDefines): boolean;
|
||||||
begin
|
begin
|
||||||
//writeln('[TDefineTree.Calculate] "',DirDef.Path,'"');
|
//writeln('[TDefineTree.Calculate] "',DirDef.Path,'"');
|
||||||
Result:=true;
|
Result:=true;
|
||||||
FErrorTemplate:=nil;
|
FErrorTemplate:=nil;
|
||||||
if DirDef.Path<>VirtualDirectory then
|
if DirDef.Path<>VirtualDirectory then
|
||||||
@ -1848,7 +1848,7 @@ function TDefinePool.CreateFPCTemplate(
|
|||||||
if copy(UpLine,1,15)='MACRO DEFINED: ' then begin
|
if copy(UpLine,1,15)='MACRO DEFINED: ' then begin
|
||||||
MacroName:=copy(UpLine,16,length(Line)-15);
|
MacroName:=copy(UpLine,16,length(Line)-15);
|
||||||
NewDefTempl:=TDefineTemplate.Create('Define '+MacroName,
|
NewDefTempl:=TDefineTemplate.Create('Define '+MacroName,
|
||||||
'Default ppc386 macro',MacroName,'',da_DefineRecurse);
|
ctsDefaultppc386Macro,MacroName,'',da_DefineRecurse);
|
||||||
end else if copy(UpLine,1,6)='MACRO ' then begin
|
end else if copy(UpLine,1,6)='MACRO ' then begin
|
||||||
System.Delete(Line,1,6);
|
System.Delete(Line,1,6);
|
||||||
System.Delete(UpLine,1,6);
|
System.Delete(UpLine,1,6);
|
||||||
@ -1861,7 +1861,7 @@ function TDefinePool.CreateFPCTemplate(
|
|||||||
if copy(UpLine,1,7)='SET TO ' then begin
|
if copy(UpLine,1,7)='SET TO ' then begin
|
||||||
MacroValue:=copy(Line,8,length(Line)-7);
|
MacroValue:=copy(Line,8,length(Line)-7);
|
||||||
NewDefTempl:=TDefineTemplate.Create('Define '+MacroName,
|
NewDefTempl:=TDefineTemplate.Create('Define '+MacroName,
|
||||||
'Default ppc386 macro',MacroName,MacroValue,da_DefineRecurse);
|
ctsDefaultppc386Macro,MacroName,MacroValue,da_DefineRecurse);
|
||||||
end;
|
end;
|
||||||
end else if copy(UpLine,1,17)='USING UNIT PATH: ' then begin
|
end else if copy(UpLine,1,17)='USING UNIT PATH: ' then begin
|
||||||
UnitSearchPath:=UnitSearchPath+copy(Line,18,length(Line)-17)+#13;
|
UnitSearchPath:=UnitSearchPath+copy(Line,18,length(Line)-17)+#13;
|
||||||
@ -1947,7 +1947,7 @@ begin
|
|||||||
if Buf[i] in [#10,#13] then begin
|
if Buf[i] in [#10,#13] then begin
|
||||||
TargetOS:=copy(Buf,1,i-1);
|
TargetOS:=copy(Buf,1,i-1);
|
||||||
NewDefTempl:=TDefineTemplate.Create('Define TargetOS',
|
NewDefTempl:=TDefineTemplate.Create('Define TargetOS',
|
||||||
'Default ppc386 target Operating System',
|
ctsDefaultppc386TargetOperatingSystem,
|
||||||
ExternalMacroStart+'TargetOS',TargetOS,da_DefineRecurse);
|
ExternalMacroStart+'TargetOS',TargetOS,da_DefineRecurse);
|
||||||
if DefTempl<>nil then
|
if DefTempl<>nil then
|
||||||
NewDefTempl.InsertBehind(DefTempl);
|
NewDefTempl.InsertBehind(DefTempl);
|
||||||
@ -1957,7 +1957,7 @@ begin
|
|||||||
else
|
else
|
||||||
SrcOS:=TargetOS;
|
SrcOS:=TargetOS;
|
||||||
NewDefTempl:=TDefineTemplate.Create('Define SrcOS',
|
NewDefTempl:=TDefineTemplate.Create('Define SrcOS',
|
||||||
'Default ppc386 source Operating System',
|
ctsDefaultppc386SourceOperatingSystem,
|
||||||
ExternalMacroStart+'SrcOS',SrcOS,da_DefineRecurse);
|
ExternalMacroStart+'SrcOS',SrcOS,da_DefineRecurse);
|
||||||
if DefTempl<>nil then
|
if DefTempl<>nil then
|
||||||
NewDefTempl.InsertBehind(DefTempl);
|
NewDefTempl.InsertBehind(DefTempl);
|
||||||
@ -1987,8 +1987,9 @@ begin
|
|||||||
if Buf[i] in [#10,#13] then begin
|
if Buf[i] in [#10,#13] then begin
|
||||||
TargetProcessor:=copy(Buf,1,i-1);
|
TargetProcessor:=copy(Buf,1,i-1);
|
||||||
NewDefTempl:=TDefineTemplate.Create('Define TargetProcessor',
|
NewDefTempl:=TDefineTemplate.Create('Define TargetProcessor',
|
||||||
'Default ppc386 target Operating System',
|
ctsDefaultppc386TargetProcessor,
|
||||||
ExternalMacroStart+'TargetProcessor',TargetProcessor,da_DefineRecurse);
|
ExternalMacroStart+'TargetProcessor',TargetProcessor,
|
||||||
|
da_DefineRecurse);
|
||||||
if DefTempl<>nil then
|
if DefTempl<>nil then
|
||||||
NewDefTempl.InsertBehind(DefTempl);
|
NewDefTempl.InsertBehind(DefTempl);
|
||||||
DefTempl:=NewDefTempl;
|
DefTempl:=NewDefTempl;
|
||||||
@ -2005,7 +2006,7 @@ begin
|
|||||||
if (DefTempl<>nil) then begin
|
if (DefTempl<>nil) then begin
|
||||||
while (DefTempl.Prior<>nil) do DefTempl:=DefTempl.Prior;
|
while (DefTempl.Prior<>nil) do DefTempl:=DefTempl.Prior;
|
||||||
Result:=TDefineTemplate.Create('Free Pascal Compiler',
|
Result:=TDefineTemplate.Create('Free Pascal Compiler',
|
||||||
'Free Pascal Compiler initial makros','','',da_Block);
|
ctsFreePascalCompilerInitialMacros,'','',da_Block);
|
||||||
Result.AddChild(DefTempl);
|
Result.AddChild(DefTempl);
|
||||||
Result.Flags:=[dtfAutoGenerated];
|
Result.Flags:=[dtfAutoGenerated];
|
||||||
end;
|
end;
|
||||||
@ -2135,7 +2136,7 @@ var
|
|||||||
SrcOSMakroUsed: boolean;
|
SrcOSMakroUsed: boolean;
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
// writeln('%%%Browse ',ADirPath);
|
// writeln('%%%Browse ',ADirPath);
|
||||||
if ADirPath='' then exit;
|
if ADirPath='' then exit;
|
||||||
if not (ADirPath[length(ADirPath)]=PathDelim) then
|
if not (ADirPath[length(ADirPath)]=PathDelim) then
|
||||||
ADirPath:=ADirPath+PathDelim;
|
ADirPath:=ADirPath+PathDelim;
|
||||||
@ -2219,7 +2220,7 @@ var
|
|||||||
// search
|
// search
|
||||||
if AnUnitName='' then exit;
|
if AnUnitName='' then exit;
|
||||||
UnitLink:=FindUnitLink(AnUnitName);
|
UnitLink:=FindUnitLink(AnUnitName);
|
||||||
//writeln('AddFPCSourceLinkForUnit ',AnUnitName,' ',UnitLink<>nil);
|
//writeln('AddFPCSourceLinkForUnit ',AnUnitName,' ',UnitLink<>nil);
|
||||||
if UnitLink=nil then exit;
|
if UnitLink=nil then exit;
|
||||||
s:=AnUnitName+' '+UnitLink.Filename+EndOfLine;
|
s:=AnUnitName+' '+UnitLink.Filename+EndOfLine;
|
||||||
UnitLinkList:=UnitLinkList+s;
|
UnitLinkList:=UnitLinkList+s;
|
||||||
@ -2244,13 +2245,13 @@ var
|
|||||||
inc(PathEnd);
|
inc(PathEnd);
|
||||||
if PathEnd>PathStart then begin
|
if PathEnd>PathStart then begin
|
||||||
ADirPath:=copy(UnitSearchPath,PathStart,PathEnd-PathStart);
|
ADirPath:=copy(UnitSearchPath,PathStart,PathEnd-PathStart);
|
||||||
//writeln('&&& FindStandardPPUSources ',ADirPath);
|
//writeln('&&& FindStandardPPUSources ',ADirPath);
|
||||||
// search all ppu files in this directory
|
// search all ppu files in this directory
|
||||||
if FindFirst(ADirPath+'*.ppu',faAnyFile,FileInfo)=0 then begin
|
if FindFirst(ADirPath+'*.ppu',faAnyFile,FileInfo)=0 then begin
|
||||||
repeat
|
repeat
|
||||||
UnitName:=ExtractFileName(FileInfo.Name);
|
UnitName:=ExtractFileName(FileInfo.Name);
|
||||||
UnitName:=copy(UnitName,1,length(UnitName)-4);
|
UnitName:=copy(UnitName,1,length(UnitName)-4);
|
||||||
//writeln('&&& FindStandardPPUSources B ',UnitName);
|
//writeln('&&& FindStandardPPUSources B ',UnitName);
|
||||||
AddFPCSourceLinkForUnit(UnitName);
|
AddFPCSourceLinkForUnit(UnitName);
|
||||||
until FindNext(FileInfo)<>0;
|
until FindNext(FileInfo)<>0;
|
||||||
end;
|
end;
|
||||||
@ -2279,34 +2280,33 @@ begin
|
|||||||
UnitTree:=nil;
|
UnitTree:=nil;
|
||||||
|
|
||||||
Result:=TDefineTemplate.Create(StdDefTemplFPCSrc,
|
Result:=TDefineTemplate.Create(StdDefTemplFPCSrc,
|
||||||
'Free Pascal Sources, RTL, FCL, Packages, Compiler','','',da_Block);
|
Format(ctsFreePascalSourcesPlusDesc,['RTL, FCL, Packages, Compiler']),
|
||||||
|
'','',da_Block);
|
||||||
Result.Flags:=[dtfAutoGenerated];
|
Result.Flags:=[dtfAutoGenerated];
|
||||||
|
|
||||||
// try to find for every reachable ppu file the unit file in the FPC sources
|
// try to find for every reachable ppu file the unit file in the FPC sources
|
||||||
FindStandardPPUSources;
|
FindStandardPPUSources;
|
||||||
DefTempl:=TDefineTemplate.Create('FPC Unit Links',
|
DefTempl:=TDefineTemplate.Create('FPC Unit Links',
|
||||||
'Source filenames for the standard fpc units',
|
ctsSourceFilenamesForStandardFPCUnits,
|
||||||
UnitLinks,UnitLinkList,da_DefineRecurse);
|
UnitLinks,UnitLinkList,da_DefineRecurse);
|
||||||
Result.AddChild(DefTempl);
|
Result.AddChild(DefTempl);
|
||||||
|
|
||||||
// The free pascal sources build a world of their own,
|
// The free pascal sources build a world of their own,
|
||||||
// reset source search path
|
// reset source search path
|
||||||
MainDir:=TDefineTemplate.Create('Free Pascal Source Directory',
|
MainDir:=TDefineTemplate.Create('Free Pascal Source Directory',
|
||||||
'Free Pascal Source Directory',
|
ctsFreePascalSourceDir,'',FPCSrcDir,da_Directory);
|
||||||
'',FPCSrcDir,da_Directory);
|
|
||||||
Result.AddChild(MainDir);
|
Result.AddChild(MainDir);
|
||||||
DefTempl:=TDefineTemplate.Create('Reset SrcPath',
|
DefTempl:=TDefineTemplate.Create('Reset SrcPath',
|
||||||
'SrcPath Init',
|
ctsSrcPathInitialization,ExternalMacroStart+'SrcPath','',da_DefineRecurse);
|
||||||
ExternalMacroStart+'SrcPath','',da_DefineRecurse);
|
|
||||||
MainDir.AddChild(DefTempl);
|
MainDir.AddChild(DefTempl);
|
||||||
|
|
||||||
// compiler
|
// compiler
|
||||||
CompilerDir:=TDefineTemplate.Create('Compiler','Compiler','','compiler',
|
CompilerDir:=TDefineTemplate.Create('Compiler',ctsCompiler,'','compiler',
|
||||||
da_Directory);
|
da_Directory);
|
||||||
MainDir.AddChild(CompilerDir);
|
MainDir.AddChild(CompilerDir);
|
||||||
|
|
||||||
// rtl
|
// rtl
|
||||||
RTLDir:=TDefineTemplate.Create('RTL','Runtime library','','rtl',da_Directory);
|
RTLDir:=TDefineTemplate.Create('RTL',ctsRuntimeLibrary,'','rtl',da_Directory);
|
||||||
MainDir.AddChild(RTLDir);
|
MainDir.AddChild(RTLDir);
|
||||||
s:=IncPathMacro
|
s:=IncPathMacro
|
||||||
+';'+Dir+'rtl'+DS+'objpas'+DS
|
+';'+Dir+'rtl'+DS+'objpas'+DS
|
||||||
@ -2316,22 +2316,23 @@ begin
|
|||||||
if (TargetOS<>'') and (TargetOS<>SrcOS) then
|
if (TargetOS<>'') and (TargetOS<>SrcOS) then
|
||||||
s:=s+';'+Dir+'rtl'+DS+TargetOS+DS;
|
s:=s+';'+Dir+'rtl'+DS+TargetOS+DS;
|
||||||
RTLDir.AddChild(TDefineTemplate.Create('Include Path',
|
RTLDir.AddChild(TDefineTemplate.Create('Include Path',
|
||||||
'include directory objpas, inc, processor specific',
|
Format(ctsIncludeDirectoriesPlusDirs,
|
||||||
|
['objpas, inc,'+TargetProcessor+','+SrcOS]),
|
||||||
ExternalMacroStart+'IncPath',s,da_DefineRecurse));
|
ExternalMacroStart+'IncPath',s,da_DefineRecurse));
|
||||||
|
|
||||||
// fcl
|
// fcl
|
||||||
FCLDir:=TDefineTemplate.Create('FCL','Free Pascal Component Library','','fcl',
|
FCLDir:=TDefineTemplate.Create('FCL',ctsFreePascalComponentLibrary,'','fcl',
|
||||||
da_Directory);
|
da_Directory);
|
||||||
MainDir.AddChild(FCLDir);
|
MainDir.AddChild(FCLDir);
|
||||||
FCLDir.AddChild(TDefineTemplate.Create('Include Path',
|
FCLDir.AddChild(TDefineTemplate.Create('Include Path',
|
||||||
'include directory inc',
|
Format(ctsIncludeDirectoriesPlusDirs,['inc']),
|
||||||
ExternalMacroStart+'IncPath',
|
ExternalMacroStart+'IncPath',
|
||||||
IncPathMacro
|
IncPathMacro
|
||||||
+';'+Dir+'fcl/inc/'
|
+';'+Dir+'fcl/inc/'
|
||||||
,da_DefineRecurse));
|
,da_DefineRecurse));
|
||||||
|
|
||||||
// packages
|
// packages
|
||||||
PackagesDir:=TDefineTemplate.Create('Packages','Package directories','',
|
PackagesDir:=TDefineTemplate.Create('Packages',ctsPackageDirectories,'',
|
||||||
'packages',da_Directory);
|
'packages',da_Directory);
|
||||||
MainDir.AddChild(PackagesDir);
|
MainDir.AddChild(PackagesDir);
|
||||||
|
|
||||||
@ -2354,58 +2355,65 @@ begin
|
|||||||
SrcPath:='$('+ExternalMacroStart+'SrcPath)';
|
SrcPath:='$('+ExternalMacroStart+'SrcPath)';
|
||||||
|
|
||||||
// <LazarusSrcDir>
|
// <LazarusSrcDir>
|
||||||
MainDir:=TDefineTemplate.Create('Lazarus Source Directory',
|
MainDir:=TDefineTemplate.Create(
|
||||||
'Definitions for the Lazarus Sources','',LazarusSrcDir,da_Directory);
|
'Lazarus Source Directory',
|
||||||
MainDir.AddChild(TDefineTemplate.Create('LCL path addition',
|
ctsDefsForLazarusSources,'',LazarusSrcDir,da_Directory);
|
||||||
'adds lcl to SrcPath',ExternalMacroStart+'SrcPath',
|
MainDir.AddChild(TDefineTemplate.Create(
|
||||||
|
'LCL path addition',
|
||||||
|
Format(ctsAddsDirToSourcePath,['lcl']),ExternalMacroStart+'SrcPath',
|
||||||
'lcl;lcl'+ds+'interfaces'+ds+WidgetType+';'+SrcPath
|
'lcl;lcl'+ds+'interfaces'+ds+WidgetType+';'+SrcPath
|
||||||
,da_Define));
|
,da_Define));
|
||||||
MainDir.AddChild(TDefineTemplate.Create('Component path addition',
|
MainDir.AddChild(TDefineTemplate.Create(
|
||||||
'adds designer, debugger, synedit and codetools to SrcPath',
|
'Component path addition',
|
||||||
|
Format(ctsAddsDirToSourcePath,['designer, debugger, synedit,codetools']),
|
||||||
ExternalMacroStart+'SrcPath',
|
ExternalMacroStart+'SrcPath',
|
||||||
'components'+ds+'synedit;components'+ds+'codetools;designer;debugger;'
|
'components'+ds+'synedit;components'+ds+'codetools;designer;debugger;'
|
||||||
+SrcPath
|
+SrcPath
|
||||||
,da_Define));
|
,da_Define));
|
||||||
MainDir.AddChild(TDefineTemplate.Create('includepath addition',
|
MainDir.AddChild(TDefineTemplate.Create('includepath addition',
|
||||||
'adds include to IncPath',ExternalMacroStart+'IncPath',
|
Format(ctsLazMainDirIncludePath,['include, include/TargetOS']),
|
||||||
|
ExternalMacroStart+'IncPath',
|
||||||
'include;include'+ds+TargetOS,
|
'include;include'+ds+TargetOS,
|
||||||
da_Define));
|
da_Define));
|
||||||
|
|
||||||
// examples
|
// examples
|
||||||
DirTempl:=TDefineTemplate.Create('Examples','Examples Directory',
|
DirTempl:=TDefineTemplate.Create('Examples',
|
||||||
|
Format(ctsNamedDirectory,['Examples']),
|
||||||
'','examples',da_Directory);
|
'','examples',da_Directory);
|
||||||
DirTempl.AddChild(TDefineTemplate.Create('LCL path addition',
|
DirTempl.AddChild(TDefineTemplate.Create('LCL path addition',
|
||||||
'adds lcl to SrcPath',
|
Format(ctsAddsDirToSourcePath,['lcl']),
|
||||||
ExternalMacroStart+'SrcPath',
|
ExternalMacroStart+'SrcPath',
|
||||||
'..'+ds+'lcl;..'+ds+'lcl'+ds+'interfaces'+ds+WidgetType+';'+SrcPath
|
'..'+ds+'lcl;..'+ds+'lcl'+ds+'interfaces'+ds+WidgetType+';'+SrcPath
|
||||||
,da_Define));
|
,da_Define));
|
||||||
MainDir.AddChild(DirTempl);
|
MainDir.AddChild(DirTempl);
|
||||||
|
|
||||||
// lcl
|
// lcl
|
||||||
DirTempl:=TDefineTemplate.Create('LCL','LCL Directory',
|
DirTempl:=TDefineTemplate.Create('LCL',Format(ctsNamedDirectory,['LCL']),
|
||||||
'','lcl',da_Directory);
|
'','lcl',da_Directory);
|
||||||
DirTempl.AddChild(TDefineTemplate.Create('WidgetPath',
|
DirTempl.AddChild(TDefineTemplate.Create('WidgetPath',
|
||||||
'adds abstract widget path to SrcPath'
|
Format(ctsAddsDirToSourcePath,[ctsAbstractWidgetPath]),
|
||||||
,ExternalMacroStart+'SrcPath',
|
ExternalMacroStart+'SrcPath',
|
||||||
'interfaces'+ds+'abstract'+ds+';'+SrcPath
|
'interfaces'+ds+'abstract'+ds+';'+SrcPath,
|
||||||
,da_Define));
|
da_Define));
|
||||||
DirTempl.AddChild(TDefineTemplate.Create('IncludePath',
|
DirTempl.AddChild(TDefineTemplate.Create('IncludePath',
|
||||||
'adds include to IncPaty',ExternalMacroStart+'IncPath',
|
Format(ctsIncludeDirectoriesPlusDirs,['include']),
|
||||||
+'include',da_Define));
|
ExternalMacroStart+'IncPath',
|
||||||
|
'include',da_Define));
|
||||||
MainDir.AddChild(DirTempl);
|
MainDir.AddChild(DirTempl);
|
||||||
|
|
||||||
// lcl/interfaces
|
// lcl/interfaces
|
||||||
SubDirTempl:=TDefineTemplate.Create('Widget Directory','Widget Directory',
|
SubDirTempl:=TDefineTemplate.Create('Widget Directory',
|
||||||
'','interfaces',da_Directory);
|
ctsWidgetDirectory,'','interfaces',da_Directory);
|
||||||
SubDirTempl.AddChild(TDefineTemplate.Create('LCL Path',
|
SubDirTempl.AddChild(TDefineTemplate.Create('LCL Path',
|
||||||
'adds lcl to SrcPath',ExternalMacroStart+'SrcPath',
|
Format(ctsAddsDirToSourcePath,['lcl']),ExternalMacroStart+'SrcPath',
|
||||||
LazarusSrcDir+ds+'lcl;'+SrcPath,da_DefineRecurse));
|
LazarusSrcDir+ds+'lcl;'+SrcPath,da_DefineRecurse));
|
||||||
DirTempl.AddChild(SubDirTempl);
|
DirTempl.AddChild(SubDirTempl);
|
||||||
|
|
||||||
// components
|
// components
|
||||||
DirTempl:=TDefineTemplate.Create('Components','Components Directory',
|
DirTempl:=TDefineTemplate.Create('Components',ctsComponentsDirectory,
|
||||||
'','components',da_Directory);
|
'','components',da_Directory);
|
||||||
DirTempl.AddChild(TDefineTemplate.Create('LCL Path','adds lcl to SrcPath',
|
DirTempl.AddChild(TDefineTemplate.Create('LCL Path',
|
||||||
|
Format(ctsAddsDirToSourcePath,['lcl']),
|
||||||
ExternalMacroStart+'SrcPath',
|
ExternalMacroStart+'SrcPath',
|
||||||
LazarusSrcDir+ds+'lcl'
|
LazarusSrcDir+ds+'lcl'
|
||||||
+';'+LazarusSrcDir+ds+'lcl'+ds+'interfaces'+ds+WidgetType
|
+';'+LazarusSrcDir+ds+'lcl'+ds+'interfaces'+ds+WidgetType
|
||||||
@ -2414,10 +2422,11 @@ begin
|
|||||||
MainDir.AddChild(DirTempl);
|
MainDir.AddChild(DirTempl);
|
||||||
|
|
||||||
// tools
|
// tools
|
||||||
DirTempl:=TDefineTemplate.Create('Tools','Tools Directory',
|
DirTempl:=TDefineTemplate.Create('Tools',
|
||||||
|
ctsToolsDirectory,
|
||||||
'','tools',da_Directory);
|
'','tools',da_Directory);
|
||||||
DirTempl.AddChild(TDefineTemplate.Create('LCL path addition',
|
DirTempl.AddChild(TDefineTemplate.Create('LCL path addition',
|
||||||
'adds lcl to SrcPath',
|
Format(ctsAddsDirToSourcePath,['lcl']),
|
||||||
ExternalMacroStart+'SrcPath',
|
ExternalMacroStart+'SrcPath',
|
||||||
'..'+ds+'lcl;..'+ds+'lcl'+ds+'interfaces'+ds+WidgetType+';'+SrcPath
|
'..'+ds+'lcl;..'+ds+'lcl'+ds+'interfaces'+ds+WidgetType+';'+SrcPath
|
||||||
,da_Define));
|
,da_Define));
|
||||||
@ -2426,28 +2435,29 @@ begin
|
|||||||
// include
|
// include
|
||||||
|
|
||||||
// designer
|
// designer
|
||||||
DirTempl:=TDefineTemplate.Create('Designer','Designer Directory',
|
DirTempl:=TDefineTemplate.Create('Designer',ctsDesignerDirectory,
|
||||||
'','designer',da_Directory);
|
'','designer',da_Directory);
|
||||||
DirTempl.AddChild(TDefineTemplate.Create('LCL path addition',
|
DirTempl.AddChild(TDefineTemplate.Create('LCL path addition',
|
||||||
'adds lcl to SrcPath',
|
Format(ctsAddsDirToSourcePath,['lcl']),
|
||||||
ExternalMacroStart+'SrcPath',
|
ExternalMacroStart+'SrcPath',
|
||||||
'..'+ds+'lcl'
|
'..'+ds+'lcl'
|
||||||
+';..'+ds+'lcl'+ds+'interfaces'+ds+WidgetType
|
+';..'+ds+'lcl'+ds+'interfaces'+ds+WidgetType
|
||||||
+';'+SrcPath
|
+';'+SrcPath
|
||||||
,da_Define));
|
,da_Define));
|
||||||
DirTempl.AddChild(TDefineTemplate.Create('main path addition',
|
DirTempl.AddChild(TDefineTemplate.Create('main path addition',
|
||||||
'adds lazarus source directory to SrcPath',
|
Format(ctsAddsDirToSourcePath,[ctsLazarusMainDirectory]),
|
||||||
ExternalMacroStart+'SrcPath',
|
ExternalMacroStart+'SrcPath',
|
||||||
'..;'+SrcPath
|
'..;'+SrcPath
|
||||||
,da_Define));
|
,da_Define));
|
||||||
DirTempl.AddChild(TDefineTemplate.Create('components path addition',
|
DirTempl.AddChild(TDefineTemplate.Create('components path addition',
|
||||||
'adds synedit directory to SrcPath',
|
Format(ctsAddsDirToSourcePath,['synedit']),
|
||||||
ExternalMacroStart+'SrcPath',
|
ExternalMacroStart+'SrcPath',
|
||||||
'..'+ds+'components'+ds+'synedit;'+'..'+ds+'components'+ds+'codetools;'
|
'..'+ds+'components'+ds+'synedit;'+'..'+ds+'components'+ds+'codetools;'
|
||||||
+SrcPath
|
+SrcPath
|
||||||
,da_Define));
|
,da_Define));
|
||||||
DirTempl.AddChild(TDefineTemplate.Create('includepath addition',
|
DirTempl.AddChild(TDefineTemplate.Create('includepath addition',
|
||||||
'adds include to IncPath',ExternalMacroStart+'IncPath',
|
Format(ctsIncludeDirectoriesPlusDirs,['include']),
|
||||||
|
ExternalMacroStart+'IncPath',
|
||||||
'..'+ds+'include;..'+ds+'include'+ds+TargetOS,
|
'..'+ds+'include;..'+ds+'include'+ds+TargetOS,
|
||||||
da_Define));
|
da_Define));
|
||||||
MainDir.AddChild(DirTempl);
|
MainDir.AddChild(DirTempl);
|
||||||
@ -2455,10 +2465,10 @@ begin
|
|||||||
// images
|
// images
|
||||||
|
|
||||||
// debugger
|
// debugger
|
||||||
DirTempl:=TDefineTemplate.Create('Debugger','Debugger Directory',
|
DirTempl:=TDefineTemplate.Create('Debugger',ctsDebuggerDirectory,
|
||||||
'','debugger',da_Directory);
|
'','debugger',da_Directory);
|
||||||
DirTempl.AddChild(TDefineTemplate.Create('LCL path addition',
|
DirTempl.AddChild(TDefineTemplate.Create('LCL path addition',
|
||||||
'adds lcl to SrcPath',
|
Format(ctsAddsDirToSourcePath,['lcl']),
|
||||||
ExternalMacroStart+'SrcPath',
|
ExternalMacroStart+'SrcPath',
|
||||||
'..'+ds+'lcl'
|
'..'+ds+'lcl'
|
||||||
+';..'+ds+'lcl'+ds+'interfaces'+ds+WidgetType
|
+';..'+ds+'lcl'+ds+'interfaces'+ds+WidgetType
|
||||||
|
Loading…
Reference in New Issue
Block a user