mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 14:18:17 +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
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx
|
||||
override PATH:=$(subst \,/,$(PATH))
|
||||
ifeq ($(findstring ;,$(PATH)),)
|
||||
inUnix=1
|
||||
@ -14,7 +13,10 @@ PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
|
||||
ifeq ($(PWD),)
|
||||
PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
|
||||
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
|
||||
PWD:=$(firstword $(PWD))
|
||||
SRCEXEEXT=
|
||||
@ -91,44 +93,23 @@ ifndef FPC_VERSION
|
||||
FPC_VERSION:=$(shell $(FPC) -iV)
|
||||
endif
|
||||
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
|
||||
CPU_TARGET:=$(shell $(FPC) -iTP)
|
||||
endif
|
||||
ifndef OS_SOURCE
|
||||
OS_SOURCE:=$(shell $(FPC) -iSO)
|
||||
ifndef CPU_SOURCE
|
||||
CPU_SOURCE:=$(shell $(FPC) -iSP)
|
||||
endif
|
||||
ifndef OS_TARGET
|
||||
OS_TARGET:=$(shell $(FPC) -iTO)
|
||||
endif
|
||||
ifndef OS_SOURCE
|
||||
OS_SOURCE:=$(shell $(FPC) -iSO)
|
||||
endif
|
||||
FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
|
||||
FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
|
||||
ifneq ($(FULL_TARGET),$(FULL_SOURCE))
|
||||
CROSSCOMPILE=1
|
||||
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
|
||||
ifdef FPCDIR
|
||||
override FPCDIR:=$(subst \,/,$(FPCDIR))
|
||||
@ -138,14 +119,6 @@ endif
|
||||
else
|
||||
override FPCDIR=wrong
|
||||
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)
|
||||
ifdef inUnix
|
||||
override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
|
||||
@ -180,9 +153,10 @@ endif
|
||||
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
|
||||
override PACKAGE_NAME=codetools
|
||||
override PACKAGE_VERSION=0.8a
|
||||
override TARGET_UNITS+=codetoolmanager memcheck
|
||||
override TARGET_IMPLICITUNITS+=avl_tree basiccodetools codecache sourcelog customcodetool pascalparsertool finddeclarationtool stdcodetools methodjumptool eventcodetool codecompletiontool codeatom codetree definetemplates expreval keywordfunclists linkscanner sourcechanger fileprocs
|
||||
override TARGET_UNITS+=allcodetoolunits
|
||||
override COMPILER_OPTIONS+=-gl
|
||||
override COMPILER_UNITDIR+=.
|
||||
override COMPILER_UNITTARGETDIR+=../units
|
||||
ifdef REQUIRE_UNITSDIR
|
||||
override UNITSDIR+=$(REQUIRE_UNITSDIR)
|
||||
endif
|
||||
@ -217,11 +191,6 @@ UNIXINSTALLDIR=1
|
||||
endif
|
||||
endif
|
||||
ifndef INSTALL_PREFIX
|
||||
ifdef PREFIX
|
||||
INSTALL_PREFIX=$(PREFIX)
|
||||
endif
|
||||
endif
|
||||
ifndef INSTALL_PREFIX
|
||||
ifdef UNIXINSTALLDIR
|
||||
INSTALL_PREFIX=/usr/local
|
||||
else
|
||||
@ -710,7 +679,6 @@ else
|
||||
TAROPT=vz
|
||||
TAREXT=.tar.gz
|
||||
endif
|
||||
override REQUIRE_PACKAGES=rtl fcl
|
||||
ifeq ($(OS_TARGET),linux)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_PASZLIB=1
|
||||
@ -776,8 +744,14 @@ REQUIRE_PACKAGES_PASZLIB=1
|
||||
REQUIRE_PACKAGES_FCL=1
|
||||
endif
|
||||
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),)
|
||||
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)),)
|
||||
UNITDIR_RTL=$(PACKAGEDIR_RTL)/$(OS_TARGET)
|
||||
else
|
||||
@ -797,8 +771,14 @@ override COMPILER_UNITDIR+=$(UNITDIR_RTL)
|
||||
endif
|
||||
endif
|
||||
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),)
|
||||
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)),)
|
||||
UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)/$(OS_TARGET)
|
||||
else
|
||||
@ -818,8 +798,14 @@ override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB)
|
||||
endif
|
||||
endif
|
||||
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),)
|
||||
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)),)
|
||||
UNITDIR_INET=$(PACKAGEDIR_INET)/$(OS_TARGET)
|
||||
else
|
||||
@ -839,8 +825,14 @@ override COMPILER_UNITDIR+=$(UNITDIR_INET)
|
||||
endif
|
||||
endif
|
||||
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),)
|
||||
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)),)
|
||||
UNITDIR_FCL=$(PACKAGEDIR_FCL)/$(OS_TARGET)
|
||||
else
|
||||
@ -860,8 +852,14 @@ override COMPILER_UNITDIR+=$(UNITDIR_FCL)
|
||||
endif
|
||||
endif
|
||||
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),)
|
||||
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)),)
|
||||
UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)/$(OS_TARGET)
|
||||
else
|
||||
@ -881,8 +879,14 @@ override COMPILER_UNITDIR+=$(UNITDIR_MYSQL)
|
||||
endif
|
||||
endif
|
||||
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),)
|
||||
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)),)
|
||||
UNITDIR_IBASE=$(PACKAGEDIR_IBASE)/$(OS_TARGET)
|
||||
else
|
||||
@ -901,6 +905,7 @@ ifdef UNITDIR_IBASE
|
||||
override COMPILER_UNITDIR+=$(UNITDIR_IBASE)
|
||||
endif
|
||||
endif
|
||||
.PHONY: package_rtl package_paszlib package_inet package_fcl package_mysql package_ibase
|
||||
ifndef NOCPUDEF
|
||||
override FPCOPTDEF=$(CPU_TARGET)
|
||||
endif
|
||||
@ -1020,26 +1025,24 @@ endif
|
||||
ifdef TARGET_UNITS
|
||||
override ALLTARGET+=fpc_units
|
||||
override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
|
||||
override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
|
||||
override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
|
||||
override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
|
||||
override INSTALLPPUFILES+=$(UNITPPUFILES)
|
||||
override CLEANPPUFILES+=$(UNITPPUFILES)
|
||||
endif
|
||||
fpc_units: $(UNITPPUFILES)
|
||||
ifdef TARGET_RSTS
|
||||
override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
|
||||
override CLEANRSTFILES+=$(RSTFILES)
|
||||
endif
|
||||
.PHONY: fpc_all fpc_smart fpc_debug fpc_release
|
||||
.PHONY: fpc_packages fpc_all fpc_smart fpc_debug
|
||||
$(FPCMADE): $(ALLTARGET)
|
||||
@$(ECHOREDIR) Compiled > $(FPCMADE)
|
||||
fpc_all: $(FPCMADE)
|
||||
fpc_packages: $(COMPILEPACKAGES)
|
||||
fpc_all: fpc_packages $(FPCMADE)
|
||||
fpc_smart:
|
||||
$(MAKE) all LINKSMART=1 CREATESMART=1
|
||||
fpc_debug:
|
||||
$(MAKE) all DEBUG=1
|
||||
fpc_release:
|
||||
$(MAKE) all RELEASE=1
|
||||
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp .rc .res
|
||||
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
|
||||
%$(PPUEXT): %.pp
|
||||
$(COMPILER) $<
|
||||
$(EXECPPAS)
|
||||
@ -1052,8 +1055,6 @@ fpc_release:
|
||||
%$(EXEEXT): %.pas
|
||||
$(COMPILER) $<
|
||||
$(EXECPPAS)
|
||||
%.res: %.rc
|
||||
windres -i $< -o $@
|
||||
vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
|
||||
vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
|
||||
vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
|
||||
@ -1061,9 +1062,6 @@ vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
|
||||
ifdef INSTALL_UNITS
|
||||
override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
|
||||
endif
|
||||
ifdef INSTALL_BUILDUNIT
|
||||
override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT),$(INSTALLPPUFILES))
|
||||
endif
|
||||
ifdef INSTALLPPUFILES
|
||||
override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
|
||||
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
|
||||
@ -1244,13 +1242,12 @@ ifdef CLEANEXEFILES
|
||||
endif
|
||||
-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
|
||||
-$(DELTREE) *$(SMARTEXT)
|
||||
-$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
|
||||
-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
|
||||
ifdef AOUTEXT
|
||||
-$(DEL) *$(AOUTEXT)
|
||||
endif
|
||||
.PHONY: fpc_baseinfo
|
||||
override INFORULES+=fpc_baseinfo
|
||||
fpc_baseinfo:
|
||||
.PHONY: fpc_info
|
||||
fpc_info:
|
||||
@$(ECHO)
|
||||
@$(ECHO) == Package info ==
|
||||
@$(ECHO) Package Name..... $(PACKAGE_NAME)
|
||||
@ -1269,8 +1266,6 @@ fpc_baseinfo:
|
||||
@$(ECHO)
|
||||
@$(ECHO) == Directory info ==
|
||||
@$(ECHO)
|
||||
@$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
|
||||
@$(ECHO)
|
||||
@$(ECHO) Basedir......... $(BASEDIR)
|
||||
@$(ECHO) FPCDir.......... $(FPCDIR)
|
||||
@$(ECHO) CrossBinDir..... $(CROSSBINDIR)
|
||||
@ -1300,13 +1295,12 @@ fpc_baseinfo:
|
||||
@$(ECHO)
|
||||
@$(ECHO) == Object info ==
|
||||
@$(ECHO)
|
||||
@$(ECHO) Target Loaders........ $(TARGET_LOADERS)
|
||||
@$(ECHO) Target Units.......... $(TARGET_UNITS)
|
||||
@$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
|
||||
@$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
|
||||
@$(ECHO) Target Dirs........... $(TARGET_DIRS)
|
||||
@$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
|
||||
@$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
|
||||
@$(ECHO) Target Loaders...... $(TARGET_LOADERS)
|
||||
@$(ECHO) Target Units........ $(TARGET_UNITS)
|
||||
@$(ECHO) Target Programs..... $(TARGET_PROGRAMS)
|
||||
@$(ECHO) Target Dirs......... $(TARGET_DIRS)
|
||||
@$(ECHO) Target Examples..... $(TARGET_EXAMPLES)
|
||||
@$(ECHO) Target ExampleDirs.. $(TARGET_EXAMPLEDIRS)
|
||||
@$(ECHO)
|
||||
@$(ECHO) Clean Units......... $(CLEAN_UNITS)
|
||||
@$(ECHO) Clean Files......... $(CLEAN_FILES)
|
||||
@ -1333,26 +1327,8 @@ fpc_baseinfo:
|
||||
@$(ECHO) Dist destination dir. $(DIST_DESTDIR)
|
||||
@$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
|
||||
@$(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
|
||||
smart: fpc_smart
|
||||
release: fpc_release
|
||||
examples:
|
||||
shared:
|
||||
install: fpc_install
|
||||
@ -1367,8 +1343,11 @@ clean: fpc_clean
|
||||
distclean: fpc_distclean
|
||||
cleanall: fpc_cleanall
|
||||
info: fpc_info
|
||||
makefiles: fpc_makefiles
|
||||
.PHONY: all debug smart release examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
|
||||
.PHONY: debug smart examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info
|
||||
ifneq ($(wildcard fpcmake.loc),)
|
||||
include fpcmake.loc
|
||||
endif
|
||||
.PHONY: cleartarget all
|
||||
cleartarget:
|
||||
-$(DEL) $(COMPILER_UNITTARGETDIR)/allcodetoolunits$(PPUEXT)
|
||||
all: cleartarget allcodetoolunits$(PPUEXT)
|
||||
|
@ -7,8 +7,13 @@
|
||||
name=codetools
|
||||
version=0.8a
|
||||
|
||||
[compiler]
|
||||
unitdir=.
|
||||
unittargetdir=../units
|
||||
options=-gl
|
||||
|
||||
[target]
|
||||
units=codetoolmanager memcheck
|
||||
units=allcodetoolunits
|
||||
implicitunits=avl_tree basiccodetools codecache sourcelog \
|
||||
customcodetool pascalparsertool finddeclarationtool stdcodetools \
|
||||
methodjumptool eventcodetool codecompletiontool codeatom codetree \
|
||||
@ -19,7 +24,11 @@ implicitunits=avl_tree basiccodetools codecache sourcelog \
|
||||
packages=fcl
|
||||
|
||||
[default]
|
||||
lcldir=../../lcl
|
||||
|
||||
[compiler]
|
||||
options=-gl
|
||||
[rules]
|
||||
.PHONY: cleartarget all
|
||||
|
||||
cleartarget:
|
||||
-$(DEL) $(COMPILER_UNITTARGETDIR)/allcodetoolunits$(PPUEXT)
|
||||
|
||||
all: cleartarget allcodetoolunits$(PPUEXT)
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
/***************************************************************************
|
||||
}
|
||||
unit allcodetoolunits;
|
||||
unit AllCodeToolUnits;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
@ -28,6 +28,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.7 2002/01/28 12:14:56 lazarus
|
||||
MG: fixed Makefile
|
||||
|
||||
Revision 1.6 2002/01/23 22:12:54 lazarus
|
||||
MG: external tool output parsing for fpc and make messages
|
||||
|
||||
|
@ -28,23 +28,41 @@
|
||||
ToDo:
|
||||
- many things, search for 'ToDo'
|
||||
|
||||
- Difficulties:
|
||||
1. SOLVED. Searching recursively
|
||||
- ParentNodes
|
||||
- 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
|
||||
- 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)
|
||||
How can this be achieved in good time?
|
||||
-> Caching
|
||||
How can this be achieved in good time?
|
||||
-> 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:
|
||||
For each section node (Interface, Implementation, ...)
|
||||
For each BeginBlock
|
||||
@ -2786,7 +2804,7 @@ writeln('[TFindDeclarationTool.CalculateBinaryOperator] A',
|
||||
then begin
|
||||
// + - *
|
||||
if (Src[BinaryOperator.StartPos]='+')
|
||||
and (LeftOperand.Desc in [xtAnsiString,xtShortString,xtString,xtWideString])
|
||||
and (LeftOperand.Desc in [xtAnsiString,xtShortString,xtString])
|
||||
then begin
|
||||
Result.Desc:=xtConstString;
|
||||
end else begin
|
||||
|
Loading…
Reference in New Issue
Block a user