mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 00:59:25 +02:00
MG: fixed Makefile
git-svn-id: trunk@633 -
This commit is contained in:
parent
7972a2ff38
commit
08e2d7d79a
@ -1,8 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/01/27]
|
# Don't edit, this file is generated by FPCMake Version 1.1 [2001/12/31]
|
||||||
#
|
#
|
||||||
default: all
|
default: all
|
||||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx
|
|
||||||
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=
|
||||||
@ -91,44 +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
|
||||||
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))
|
||||||
@ -138,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)
|
||||||
@ -180,9 +153,10 @@ endif
|
|||||||
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
|
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+=codetoolmanager memcheck
|
override TARGET_UNITS+=allcodetoolunits
|
||||||
override TARGET_IMPLICITUNITS+=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_UNITTARGETDIR+=../units
|
||||||
ifdef REQUIRE_UNITSDIR
|
ifdef REQUIRE_UNITSDIR
|
||||||
override UNITSDIR+=$(REQUIRE_UNITSDIR)
|
override UNITSDIR+=$(REQUIRE_UNITSDIR)
|
||||||
endif
|
endif
|
||||||
@ -217,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
|
||||||
@ -710,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
|
||||||
@ -776,8 +744,14 @@ REQUIRE_PACKAGES_PASZLIB=1
|
|||||||
REQUIRE_PACKAGES_FCL=1
|
REQUIRE_PACKAGES_FCL=1
|
||||||
endif
|
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
|
||||||
@ -797,8 +771,14 @@ 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
|
||||||
@ -818,8 +798,14 @@ 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
|
||||||
@ -839,8 +825,14 @@ 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
|
||||||
@ -860,8 +852,14 @@ 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
|
||||||
@ -881,8 +879,14 @@ 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
|
||||||
@ -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): $(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),$(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))
|
||||||
@ -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)
|
||||||
@ -1269,8 +1266,6 @@ fpc_baseinfo:
|
|||||||
@$(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,26 +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
|
|
||||||
all: fpc_all
|
|
||||||
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
|
||||||
@ -1367,8 +1343,11 @@ 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: all 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
|
||||||
|
.PHONY: cleartarget all
|
||||||
|
cleartarget:
|
||||||
|
-$(DEL) $(COMPILER_UNITTARGETDIR)/allcodetoolunits$(PPUEXT)
|
||||||
|
all: cleartarget allcodetoolunits$(PPUEXT)
|
||||||
|
@ -7,8 +7,13 @@
|
|||||||
name=codetools
|
name=codetools
|
||||||
version=0.8a
|
version=0.8a
|
||||||
|
|
||||||
|
[compiler]
|
||||||
|
unitdir=.
|
||||||
|
unittargetdir=../units
|
||||||
|
options=-gl
|
||||||
|
|
||||||
[target]
|
[target]
|
||||||
units=codetoolmanager memcheck
|
units=allcodetoolunits
|
||||||
implicitunits=avl_tree basiccodetools codecache sourcelog \
|
implicitunits=avl_tree basiccodetools codecache sourcelog \
|
||||||
customcodetool pascalparsertool finddeclarationtool stdcodetools \
|
customcodetool pascalparsertool finddeclarationtool stdcodetools \
|
||||||
methodjumptool eventcodetool codecompletiontool codeatom codetree \
|
methodjumptool eventcodetool codecompletiontool codeatom codetree \
|
||||||
@ -19,7 +24,11 @@ implicitunits=avl_tree basiccodetools codecache sourcelog \
|
|||||||
packages=fcl
|
packages=fcl
|
||||||
|
|
||||||
[default]
|
[default]
|
||||||
lcldir=../../lcl
|
|
||||||
|
|
||||||
[compiler]
|
[rules]
|
||||||
options=-gl
|
.PHONY: cleartarget all
|
||||||
|
|
||||||
|
cleartarget:
|
||||||
|
-$(DEL) $(COMPILER_UNITTARGETDIR)/allcodetoolunits$(PPUEXT)
|
||||||
|
|
||||||
|
all: cleartarget allcodetoolunits$(PPUEXT)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
}
|
}
|
||||||
unit allcodetoolunits;
|
unit AllCodeToolUnits;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
@ -28,6 +28,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.7 2002/01/28 12:14:56 lazarus
|
||||||
|
MG: fixed Makefile
|
||||||
|
|
||||||
Revision 1.6 2002/01/23 22:12:54 lazarus
|
Revision 1.6 2002/01/23 22:12:54 lazarus
|
||||||
MG: external tool output parsing for fpc and make messages
|
MG: external tool output parsing for fpc and make messages
|
||||||
|
|
||||||
|
@ -28,23 +28,41 @@
|
|||||||
ToDo:
|
ToDo:
|
||||||
- many things, search for 'ToDo'
|
- many things, search for 'ToDo'
|
||||||
|
|
||||||
- Difficulties:
|
- Mass Search: searching a compatible proc will result in searching every
|
||||||
1. SOLVED. Searching recursively
|
parameter type of every reachable proc
|
||||||
- ParentNodes
|
(implementation section + interface section
|
||||||
- Ancestor Classes/Objects/Interfaces
|
|
||||||
- with statements
|
|
||||||
- operators: '.', '()', 'A()', '^', 'inherited'
|
|
||||||
2. SOLVED. Searching enums must be searched in sub nodes
|
|
||||||
-> all classes node trees must be built
|
|
||||||
3. SOLVED. Searching in used units (interface USES and implementation USES)
|
|
||||||
4. SOLVED. Searching forward for pointer types e.g. ^Tralala
|
|
||||||
5. Mass Search: searching a compatible proc will result
|
|
||||||
in searching every parameter type of every reachable proc
|
|
||||||
(implementation section + interface section
|
|
||||||
+ used interface sections + class and ancestor methods)
|
+ used interface sections + class and ancestor methods)
|
||||||
How can this be achieved in good time?
|
How can this be achieved in good time?
|
||||||
-> Caching
|
-> Caching
|
||||||
- Caching:
|
- Caching:
|
||||||
|
1. interface cache:
|
||||||
|
Every FindIdentifierInInterface call should be cached
|
||||||
|
- stores: Identifier -> Node+CleanPos
|
||||||
|
- cache must be deleted, everytime the codetree is rebuild
|
||||||
|
this is enough update, because it does only store internals
|
||||||
|
-> This will improve access time to all precompiled packages
|
||||||
|
|
||||||
|
2. dynamic cache:
|
||||||
|
searching a compatible proc not by name, but by parameter type list
|
||||||
|
results in the following:
|
||||||
|
given a library with 500 procs with 2 integer parameters, will
|
||||||
|
result in 1.000.000 checks for 'integer', before the interface
|
||||||
|
cache of objpas points to longint. Then longint will be searched
|
||||||
|
in objpas (>100 checks), before the system.pp interface cache is
|
||||||
|
asked. Total: 100.000.000 checks.
|
||||||
|
Hence, the result of a search should be saved:
|
||||||
|
every 'cache' node get a list of
|
||||||
|
Identifier+CleanBackwardPos+CleanForwardPos -> TFindContext
|
||||||
|
This information means: if an identifier is searched at a
|
||||||
|
child node (not sub child node!) within the bounds, the cached
|
||||||
|
FindContext is valid.
|
||||||
|
'cache' nodes are:
|
||||||
|
- section nodes e.g. interface, program, ...
|
||||||
|
- class nodes
|
||||||
|
this cache must be deleted, every time the code tree changes, or
|
||||||
|
one of the used units changes.
|
||||||
|
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
For each section node (Interface, Implementation, ...)
|
For each section node (Interface, Implementation, ...)
|
||||||
For each BeginBlock
|
For each BeginBlock
|
||||||
@ -2786,7 +2804,7 @@ writeln('[TFindDeclarationTool.CalculateBinaryOperator] A',
|
|||||||
then begin
|
then begin
|
||||||
// + - *
|
// + - *
|
||||||
if (Src[BinaryOperator.StartPos]='+')
|
if (Src[BinaryOperator.StartPos]='+')
|
||||||
and (LeftOperand.Desc in [xtAnsiString,xtShortString,xtString,xtWideString])
|
and (LeftOperand.Desc in [xtAnsiString,xtShortString,xtString])
|
||||||
then begin
|
then begin
|
||||||
Result.Desc:=xtConstString;
|
Result.Desc:=xtConstString;
|
||||||
end else begin
|
end else begin
|
||||||
|
Loading…
Reference in New Issue
Block a user