* Updated README with copy of Tom Verhoeff

* Added additional key
  ProjectFile=
  Any file whose name (no extension) matches this, will be renamed to __PROJNAME__
* Improved variables dialog: when there is no message, the grid
  is disabled, and the message adapted accordingly

git-svn-id: trunk@16196 -
This commit is contained in:
michael 2008-08-23 11:05:01 +00:00
parent 88e3f9b965
commit 7c20c96113
9 changed files with 300 additions and 129 deletions

View File

@ -1,8 +1,8 @@
# #
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/07/29] # Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/06/18]
# #
default: all default: all
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
BSDs = freebsd netbsd openbsd darwin BSDs = freebsd netbsd openbsd darwin
UNIXs = linux $(BSDs) solaris qnx UNIXs = linux $(BSDs) solaris qnx
LIMIT83fs = go32v2 os2 emx watcom LIMIT83fs = go32v2 os2 emx watcom
@ -166,6 +166,17 @@ OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
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)
ifeq ($(CPU_TARGET),armeb)
ARCH=arm
override FPCOPT+=-Cb
else
ifeq ($(CPU_TARGET),armel)
ARCH=arm
override FPCOPT+=-CaEABI
else
ARCH=$(CPU_TARGET)
endif
endif
ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
TARGETSUFFIX=$(OS_TARGET) TARGETSUFFIX=$(OS_TARGET)
SOURCESUFFIX=$(OS_SOURCE) SOURCESUFFIX=$(OS_SOURCE)
@ -187,7 +198,7 @@ endif
ifeq ($(OS_TARGET),linux) ifeq ($(OS_TARGET),linux)
linuxHier=1 linuxHier=1
endif endif
export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
ifdef FPCDIR ifdef FPCDIR
override FPCDIR:=$(subst \,/,$(FPCDIR)) override FPCDIR:=$(subst \,/,$(FPCDIR))
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),) ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
@ -282,6 +293,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos) ifeq ($(FULL_TARGET),i386-beos)
override TARGET_UNITS+=projtemplates.pas override TARGET_UNITS+=projtemplates.pas
endif endif
ifeq ($(FULL_TARGET),i386-haiku)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),i386-netbsd) ifeq ($(FULL_TARGET),i386-netbsd)
override TARGET_UNITS+=projtemplates.pas override TARGET_UNITS+=projtemplates.pas
endif endif
@ -399,6 +413,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos) ifeq ($(FULL_TARGET),arm-palmos)
override TARGET_UNITS+=projtemplates.pas override TARGET_UNITS+=projtemplates.pas
endif endif
ifeq ($(FULL_TARGET),arm-darwin)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),arm-wince) ifeq ($(FULL_TARGET),arm-wince)
override TARGET_UNITS+=projtemplates.pas override TARGET_UNITS+=projtemplates.pas
endif endif
@ -423,6 +440,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded) ifeq ($(FULL_TARGET),powerpc64-embedded)
override TARGET_UNITS+=projtemplates.pas override TARGET_UNITS+=projtemplates.pas
endif endif
ifeq ($(FULL_TARGET),avr-embedded)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),armeb-linux)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_UNITS+=projtemplates.pas
endif
ifeq ($(FULL_TARGET),i386-linux) ifeq ($(FULL_TARGET),i386-linux)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif endif
@ -441,6 +467,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos) ifeq ($(FULL_TARGET),i386-beos)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif endif
ifeq ($(FULL_TARGET),i386-haiku)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),i386-netbsd) ifeq ($(FULL_TARGET),i386-netbsd)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif endif
@ -558,6 +587,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos) ifeq ($(FULL_TARGET),arm-palmos)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif endif
ifeq ($(FULL_TARGET),arm-darwin)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),arm-wince) ifeq ($(FULL_TARGET),arm-wince)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif endif
@ -582,164 +614,188 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded) ifeq ($(FULL_TARGET),powerpc64-embedded)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif endif
ifeq ($(FULL_TARGET),avr-embedded)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),armeb-linux)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override CLEAN_FILES+=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),i386-linux) ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-go32v2) ifeq ($(FULL_TARGET),i386-go32v2)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-win32) ifeq ($(FULL_TARGET),i386-win32)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-os2) ifeq ($(FULL_TARGET),i386-os2)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-freebsd) ifeq ($(FULL_TARGET),i386-freebsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-beos) ifeq ($(FULL_TARGET),i386-beos)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),i386-haiku)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-netbsd) ifeq ($(FULL_TARGET),i386-netbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-solaris) ifeq ($(FULL_TARGET),i386-solaris)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-qnx) ifeq ($(FULL_TARGET),i386-qnx)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-netware) ifeq ($(FULL_TARGET),i386-netware)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-openbsd) ifeq ($(FULL_TARGET),i386-openbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-wdosx) ifeq ($(FULL_TARGET),i386-wdosx)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-darwin) ifeq ($(FULL_TARGET),i386-darwin)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-emx) ifeq ($(FULL_TARGET),i386-emx)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-watcom) ifeq ($(FULL_TARGET),i386-watcom)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-netwlibc) ifeq ($(FULL_TARGET),i386-netwlibc)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-wince) ifeq ($(FULL_TARGET),i386-wince)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-embedded) ifeq ($(FULL_TARGET),i386-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-symbian) ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),m68k-linux) ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),m68k-freebsd) ifeq ($(FULL_TARGET),m68k-freebsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),m68k-netbsd) ifeq ($(FULL_TARGET),m68k-netbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),m68k-amiga) ifeq ($(FULL_TARGET),m68k-amiga)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),m68k-atari) ifeq ($(FULL_TARGET),m68k-atari)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),m68k-openbsd) ifeq ($(FULL_TARGET),m68k-openbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),m68k-palmos) ifeq ($(FULL_TARGET),m68k-palmos)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),m68k-embedded) ifeq ($(FULL_TARGET),m68k-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),powerpc-linux) ifeq ($(FULL_TARGET),powerpc-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),powerpc-netbsd) ifeq ($(FULL_TARGET),powerpc-netbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),powerpc-amiga) ifeq ($(FULL_TARGET),powerpc-amiga)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),powerpc-macos) ifeq ($(FULL_TARGET),powerpc-macos)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),powerpc-darwin) ifeq ($(FULL_TARGET),powerpc-darwin)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),powerpc-morphos) ifeq ($(FULL_TARGET),powerpc-morphos)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),powerpc-embedded) ifeq ($(FULL_TARGET),powerpc-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),sparc-linux) ifeq ($(FULL_TARGET),sparc-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),sparc-netbsd) ifeq ($(FULL_TARGET),sparc-netbsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),sparc-solaris) ifeq ($(FULL_TARGET),sparc-solaris)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),sparc-embedded) ifeq ($(FULL_TARGET),sparc-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),x86_64-linux) ifeq ($(FULL_TARGET),x86_64-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),x86_64-freebsd) ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),x86_64-darwin) ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),x86_64-win64) ifeq ($(FULL_TARGET),x86_64-win64)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),x86_64-embedded) ifeq ($(FULL_TARGET),x86_64-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),arm-linux) ifeq ($(FULL_TARGET),arm-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),arm-palmos) ifeq ($(FULL_TARGET),arm-palmos)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),arm-darwin)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),arm-wince) ifeq ($(FULL_TARGET),arm-wince)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),arm-gba) ifeq ($(FULL_TARGET),arm-gba)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),arm-nds) ifeq ($(FULL_TARGET),arm-nds)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),arm-embedded) ifeq ($(FULL_TARGET),arm-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),arm-symbian) ifeq ($(FULL_TARGET),arm-symbian)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),powerpc64-linux) ifeq ($(FULL_TARGET),powerpc64-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),powerpc64-darwin) ifeq ($(FULL_TARGET),powerpc64-darwin)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),powerpc64-embedded) ifeq ($(FULL_TARGET),powerpc64-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),avr-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),armeb-linux)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_OPTIONS+=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
endif endif
ifeq ($(FULL_TARGET),i386-linux) ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_INCLUDEDIR+=./ override COMPILER_INCLUDEDIR+=./
@ -759,6 +815,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos) ifeq ($(FULL_TARGET),i386-beos)
override COMPILER_INCLUDEDIR+=./ override COMPILER_INCLUDEDIR+=./
endif endif
ifeq ($(FULL_TARGET),i386-haiku)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),i386-netbsd) ifeq ($(FULL_TARGET),i386-netbsd)
override COMPILER_INCLUDEDIR+=./ override COMPILER_INCLUDEDIR+=./
endif endif
@ -876,6 +935,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos) ifeq ($(FULL_TARGET),arm-palmos)
override COMPILER_INCLUDEDIR+=./ override COMPILER_INCLUDEDIR+=./
endif endif
ifeq ($(FULL_TARGET),arm-darwin)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),arm-wince) ifeq ($(FULL_TARGET),arm-wince)
override COMPILER_INCLUDEDIR+=./ override COMPILER_INCLUDEDIR+=./
endif endif
@ -900,6 +962,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded) ifeq ($(FULL_TARGET),powerpc64-embedded)
override COMPILER_INCLUDEDIR+=./ override COMPILER_INCLUDEDIR+=./
endif endif
ifeq ($(FULL_TARGET),avr-embedded)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),armeb-linux)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_INCLUDEDIR+=./
endif
ifeq ($(FULL_TARGET),i386-linux) ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./ override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif endif
@ -918,6 +989,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos) ifeq ($(FULL_TARGET),i386-beos)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./ override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif endif
ifeq ($(FULL_TARGET),i386-haiku)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),i386-netbsd) ifeq ($(FULL_TARGET),i386-netbsd)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./ override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif endif
@ -1035,6 +1109,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos) ifeq ($(FULL_TARGET),arm-palmos)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./ override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif endif
ifeq ($(FULL_TARGET),arm-darwin)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),arm-wince) ifeq ($(FULL_TARGET),arm-wince)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./ override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif endif
@ -1059,6 +1136,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded) ifeq ($(FULL_TARGET),powerpc64-embedded)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./ override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif endif
ifeq ($(FULL_TARGET),avr-embedded)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),armeb-linux)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_UNITDIR+=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
endif
ifeq ($(FULL_TARGET),i386-linux) ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif endif
@ -1077,6 +1163,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos) ifeq ($(FULL_TARGET),i386-beos)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif endif
ifeq ($(FULL_TARGET),i386-haiku)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),i386-netbsd) ifeq ($(FULL_TARGET),i386-netbsd)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif endif
@ -1194,6 +1283,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos) ifeq ($(FULL_TARGET),arm-palmos)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif endif
ifeq ($(FULL_TARGET),arm-darwin)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),arm-wince) ifeq ($(FULL_TARGET),arm-wince)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif endif
@ -1218,6 +1310,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded) ifeq ($(FULL_TARGET),powerpc64-embedded)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif endif
ifeq ($(FULL_TARGET),avr-embedded)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),armeb-linux)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_UNITTARGETDIR+=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
endif
ifdef REQUIRE_UNITSDIR ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR) override UNITSDIR+=$(REQUIRE_UNITSDIR)
endif endif
@ -1507,6 +1608,11 @@ BATCHEXT=.sh
EXEEXT= EXEEXT=
SHORTSUFFIX=be SHORTSUFFIX=be
endif endif
ifeq ($(OS_TARGET),haiku)
BATCHEXT=.sh
EXEEXT=
SHORTSUFFIX=hai
endif
ifeq ($(OS_TARGET),solaris) ifeq ($(OS_TARGET),solaris)
BATCHEXT=.sh BATCHEXT=.sh
EXEEXT= EXEEXT=
@ -1984,6 +2090,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos) ifeq ($(FULL_TARGET),i386-beos)
REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_RTL=1
endif endif
ifeq ($(FULL_TARGET),i386-haiku)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),i386-netbsd) ifeq ($(FULL_TARGET),i386-netbsd)
REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_RTL=1
endif endif
@ -2101,6 +2210,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos) ifeq ($(FULL_TARGET),arm-palmos)
REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_RTL=1
endif endif
ifeq ($(FULL_TARGET),arm-darwin)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),arm-wince) ifeq ($(FULL_TARGET),arm-wince)
REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_RTL=1
endif endif
@ -2125,6 +2237,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded) ifeq ($(FULL_TARGET),powerpc64-embedded)
REQUIRE_PACKAGES_RTL=1 REQUIRE_PACKAGES_RTL=1
endif endif
ifeq ($(FULL_TARGET),avr-embedded)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),armeb-linux)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),armeb-embedded)
REQUIRE_PACKAGES_RTL=1
endif
ifdef REQUIRE_PACKAGES_RTL ifdef REQUIRE_PACKAGES_RTL
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR)))))) PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_RTL),) ifneq ($(PACKAGEDIR_RTL),)
@ -2152,13 +2273,13 @@ override COMPILER_UNITDIR+=$(UNITDIR_RTL)
endif endif
endif endif
ifndef NOCPUDEF ifndef NOCPUDEF
override FPCOPTDEF=$(CPU_TARGET) override FPCOPTDEF=$(ARCH)
endif endif
ifneq ($(OS_TARGET),$(OS_SOURCE)) ifneq ($(OS_TARGET),$(OS_SOURCE))
override FPCOPT+=-T$(OS_TARGET) override FPCOPT+=-T$(OS_TARGET)
endif endif
ifneq ($(CPU_TARGET),$(CPU_SOURCE)) ifneq ($(CPU_TARGET),$(CPU_SOURCE))
override FPCOPT+=-P$(CPU_TARGET) override FPCOPT+=-P$(ARCH)
endif endif
ifeq ($(OS_SOURCE),openbsd) ifeq ($(OS_SOURCE),openbsd)
override FPCOPT+=-FD$(NEW_BINUTILS_PATH) override FPCOPT+=-FD$(NEW_BINUTILS_PATH)

View File

@ -2,7 +2,7 @@
# #
# Makefile.fpc for ProjTemplates 1.0 # Makefile.fpc for ProjTemplates 1.0
# #
# This file was generated on 20-8-08 # This file was generated on 23/08/08
[package] [package]
name=projtemplates name=projtemplates
@ -12,7 +12,7 @@ version=1.0
unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)
unitdir=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./ unitdir=../../ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ ../../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ ../../packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./
includedir=./ includedir=./
options=-dLCL -dLCL$(LCL_PLATFORM) -Scgi -MObjFPC options=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
[target] [target]
units=projtemplates.pas units=projtemplates.pas

View File

@ -5,15 +5,17 @@ Installing this package in the IDE adds a category to the 'File-New' dialog:
It also adds a 'New project from Template' menu item to the 'File' menu, as It also adds a 'New project from Template' menu item to the 'File' menu, as
well as a 'project template options' menu under the 'Tools' menu. well as a 'project template options' menu under the 'Tools' menu.
This menu item is visible only if the templates directory (see next paragraph)
exists and contains at least one template subdirectory.
In the 'Project template options', a directory can be selected. This project In the 'Project template options', a directory can be selected. This directory
should contain a subdirectory per template. Each template directory contains should contain a subdirectory per template. Each template directory contains
a template for a project: A collection of files which will be copied and a template for a project: A collection of files which will be copied and
used as a new project. used as a new project.
During the copy, the package will scan the file/directory names and the During the copy, the package will scan the file/directory names and the
contents of the files for variable substitution: $(VARNAME) will be contents of the files for variable substitution: __VARNAME__ will be
replaced by the value of a variable $(VARNAME). replaced by the value of a variable VARNAME
By default, the engine knows 2 variables: By default, the engine knows 2 variables:
ProjDir : The directory where the new project will be created. ProjDir : The directory where the new project will be created.
@ -34,6 +36,14 @@ The 'project.ini' file can contain a second section, called 'Project', which
can contain some info about the project. The following keywords can be found can contain some info about the project. The following keywords can be found
there: there:
ProjectFile
Any file that has a name equal to this (no extension) is treated specially,
it is renamed to the project name. That is
ProjectFile=example
will replace example.lpi example.lpr and example.cfg with the name given
by the user. By default, the value of ProjectFile is assumed to be 'project'.
(note that the .ini file is not copied)
Name Name
Name of the template Name of the template
Author Author
@ -47,4 +57,4 @@ Exclude
Comma separated list of filename extensions which should not be searched Comma separated list of filename extensions which should not be searched
for keyword subsitution. for keyword subsitution.
The Name,Author and description will be presented in the 'File-New' dialog. The Name and description will be presented in the 'File-New' dialog.

View File

@ -1,14 +1,15 @@
object ProjectVariablesForm: TProjectVariablesForm object ProjectVariablesForm: TProjectVariablesForm
Left = 268 Left = 505
Height = 328 Height = 326
Top = 219 Top = 306
Width = 499 Width = 573
HorzScrollBar.Page = 498
VertScrollBar.Page = 327
ActiveControl = BOK ActiveControl = BOK
Caption = 'New project from template' Caption = 'New project from template'
ClientHeight = 326
ClientWidth = 573
OnShow = ProjectVariablesFormShow OnShow = ProjectVariablesFormShow
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '0.9.25'
object Label1: TLabel object Label1: TLabel
Left = 8 Left = 8
Height = 23 Height = 23
@ -17,7 +18,6 @@ object ProjectVariablesForm: TProjectVariablesForm
Alignment = taRightJustify Alignment = taRightJustify
AutoSize = False AutoSize = False
Caption = '&Name for new project:' Caption = '&Name for new project:'
Color = clNone
Layout = tlCenter Layout = tlCenter
ParentColor = False ParentColor = False
end end
@ -29,7 +29,6 @@ object ProjectVariablesForm: TProjectVariablesForm
Alignment = taRightJustify Alignment = taRightJustify
AutoSize = False AutoSize = False
Caption = 'Create in &directory:' Caption = 'Create in &directory:'
Color = clNone
Layout = tlCenter Layout = tlCenter
ParentColor = False ParentColor = False
end end
@ -37,7 +36,7 @@ object ProjectVariablesForm: TProjectVariablesForm
Left = 8 Left = 8
Height = 58 Height = 58
Top = 80 Top = 80
Width = 485 Width = 559
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BevelInner = bvRaised BevelInner = bvRaised
BevelOuter = bvLowered BevelOuter = bvLowered
@ -47,24 +46,23 @@ object ProjectVariablesForm: TProjectVariablesForm
end end
object SGVariables: TStringGrid object SGVariables: TStringGrid
Left = 10 Left = 10
Height = 140 Height = 138
Top = 144 Top = 144
Width = 483 Width = 557
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
AutoFillColumns = True AutoFillColumns = True
ColCount = 3 ColCount = 3
DefaultColWidth = 120 DefaultColWidth = 120
ExtendedSelect = True
FixedColor = clBtnFace FixedColor = clBtnFace
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goEditing, goAlwaysShowEditor, goDblClickAutoSize, goSmoothScroll] Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goEditing, goAlwaysShowEditor, goDblClickAutoSize, goSmoothScroll]
RowCount = 5 RowCount = 5
ScrollBars = ssAutoBoth
TabOrder = 5 TabOrder = 5
TabStop = True
end end
object BOK: TButton object BOK: TButton
Left = 411 Left = 485
Height = 25 Height = 25
Top = 292 Top = 290
Width = 75 Width = 75
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4 BorderSpacing.InnerBorder = 4
@ -75,9 +73,9 @@ object ProjectVariablesForm: TProjectVariablesForm
TabOrder = 1 TabOrder = 1
end end
object BCancel: TButton object BCancel: TButton
Left = 323 Left = 397
Height = 25 Height = 25
Top = 292 Top = 290
Width = 75 Width = 75
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4 BorderSpacing.InnerBorder = 4
@ -90,7 +88,7 @@ object ProjectVariablesForm: TProjectVariablesForm
Left = 152 Left = 152
Height = 23 Height = 23
Top = 16 Top = 16
Width = 237 Width = 311
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
TabOrder = 3 TabOrder = 3
end end
@ -98,7 +96,7 @@ object ProjectVariablesForm: TProjectVariablesForm
Left = 152 Left = 152
Height = 23 Height = 23
Top = 48 Top = 48
Width = 317 Width = 391
ButtonWidth = 23 ButtonWidth = 23
NumGlyphs = 1 NumGlyphs = 1
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]

View File

@ -1,35 +1,37 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TProjectVariablesForm','FORMDATA',[ LazarusResources.Add('TProjectVariablesForm','FORMDATA',[
'TPF0'#21'TProjectVariablesForm'#20'ProjectVariablesForm'#4'Left'#3#12#1#6'He' 'TPF0'#21'TProjectVariablesForm'#20'ProjectVariablesForm'#4'Left'#3#249#1#6'H'
+'ight'#3'H'#1#3'Top'#3#219#0#5'Width'#3#243#1#18'HorzScrollBar.Page'#3#242#1 +'eight'#3'F'#1#3'Top'#3'2'#1#5'Width'#3'='#2#13'ActiveControl'#7#3'BOK'#7'Ca'
+#18'VertScrollBar.Page'#3'G'#1#13'ActiveControl'#7#3'BOK'#7'Caption'#6#25'Ne' +'ption'#6#25'New project from template'#12'ClientHeight'#3'F'#1#11'ClientWid'
+'w project from template'#6'OnShow'#7#24'ProjectVariablesFormShow'#8'Positio' +'th'#3'='#2#6'OnShow'#7#24'ProjectVariablesFormShow'#8'Position'#7#14'poScre'
+'n'#7#14'poScreenCenter'#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'Height'#2#23#3 +'enCenter'#10'LCLVersion'#6#6'0.9.25'#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'He'
+'Top'#2#16#5'Width'#3#131#0#9'Alignment'#7#14'taRightJustify'#8'AutoSize'#8#7 +'ight'#2#23#3'Top'#2#16#5'Width'#3#131#0#9'Alignment'#7#14'taRightJustify'#8
+'Caption'#6#22'&Name for new project:'#5'Color'#7#6'clNone'#6'Layout'#7#8'tl' +'AutoSize'#8#7'Caption'#6#22'&Name for new project:'#6'Layout'#7#8'tlCenter'
+'Center'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#22 +#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#22#3'Top'
+#3'Top'#2'0'#5'Width'#3#131#0#9'Alignment'#7#14'taRightJustify'#8'AutoSize'#8 +#2'0'#5'Width'#3#131#0#9'Alignment'#7#14'taRightJustify'#8'AutoSize'#8#7'Cap'
+#7'Caption'#6#21'Create in &directory:'#5'Color'#7#6'clNone'#6'Layout'#7#8't' +'tion'#6#21'Create in &directory:'#6'Layout'#7#8'tlCenter'#11'ParentColor'#8
+'lCenter'#11'ParentColor'#8#0#0#6'TPanel'#12'PDescription'#4'Left'#2#8#6'Hei' +#0#0#6'TPanel'#12'PDescription'#4'Left'#2#8#6'Height'#2':'#3'Top'#2'P'#5'Wid'
+'ght'#2':'#3'Top'#2'P'#5'Width'#3#229#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'a' +'th'#3'/'#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#10'BevelInner'#7#8
+'kRight'#0#10'BevelInner'#7#8'bvRaised'#10'BevelOuter'#7#9'bvLowered'#7'Capt' +'bvRaised'#10'BevelOuter'#7#9'bvLowered'#7'Caption'#6'ZThis project contains'
+'ion'#6'ZThis project contains some additional variables. Please provide val' +' some additional variables. Please provide values for these variables'#11'F'
+'ues for these variables'#11'FullRepaint'#8#8'TabOrder'#2#0#0#0#11'TStringGr' +'ullRepaint'#8#8'TabOrder'#2#0#0#0#11'TStringGrid'#11'SGVariables'#4'Left'#2
+'id'#11'SGVariables'#4'Left'#2#10#6'Height'#3#140#0#3'Top'#3#144#0#5'Width'#3 +#10#6'Height'#3#138#0#3'Top'#3#144#0#5'Width'#3'-'#2#7'Anchors'#11#5'akTop'#6
+#227#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#15'AutoFill' +'akLeft'#7'akRight'#8'akBottom'#0#15'AutoFillColumns'#9#8'ColCount'#2#3#15'D'
+'Columns'#9#8'ColCount'#2#3#15'DefaultColWidth'#2'x'#10'FixedColor'#7#9'clBt' +'efaultColWidth'#2'x'#14'ExtendedSelect'#9#10'FixedColor'#7#9'clBtnFace'#7'O'
+'nFace'#7'Options'#11#15'goFixedVertLine'#15'goFixedHorzLine'#10'goVertLine' +'ptions'#11#15'goFixedVertLine'#15'goFixedHorzLine'#10'goVertLine'#10'goHorz'
+#10'goHorzLine'#13'goRangeSelect'#11'goColSizing'#9'goEditing'#18'goAlwaysSh' +'Line'#13'goRangeSelect'#11'goColSizing'#9'goEditing'#18'goAlwaysShowEditor'
+'owEditor'#18'goDblClickAutoSize'#14'goSmoothScroll'#0#8'RowCount'#2#5#10'Sc' +#18'goDblClickAutoSize'#14'goSmoothScroll'#0#8'RowCount'#2#5#8'TabOrder'#2#5
+'rollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#5#7'TabStop'#9#0#0#7'TButton'#3'BO' +#0#0#7'TButton'#3'BOK'#4'Left'#3#229#1#6'Height'#2#25#3'Top'#3'"'#1#5'Width'
+'K'#4'Left'#3#155#1#6'Height'#2#25#3'Top'#3'$'#1#5'Width'#2'K'#7'Anchors'#11 +#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2
+#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#3'&' +#4#7'Caption'#6#3'&OK'#7'Default'#9#11'ModalResult'#2#1#7'OnClick'#7#8'BOKCl'
+'OK'#7'Default'#9#11'ModalResult'#2#1#7'OnClick'#7#8'BOKClick'#8'TabOrder'#2 +'ick'#8'TabOrder'#2#1#0#0#7'TButton'#7'BCancel'#4'Left'#3#141#1#6'Height'#2
+#1#0#0#7'TButton'#7'BCancel'#4'Left'#3'C'#1#6'Height'#2#25#3'Top'#3'$'#1#5'W' +#25#3'Top'#3'"'#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'Bo'
+'idth'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBor' +'rderSpacing.InnerBorder'#2#4#6'Cancel'#9#7'Caption'#6#7'&Cancel'#11'ModalRe'
+'der'#2#4#6'Cancel'#9#7'Caption'#6#7'&Cancel'#11'ModalResult'#2#2#8'TabOrder' +'sult'#2#2#8'TabOrder'#2#2#0#0#5'TEdit'#12'EProjectName'#4'Left'#3#152#0#6'H'
+#2#2#0#0#5'TEdit'#12'EProjectName'#4'Left'#3#152#0#6'Height'#2#23#3'Top'#2#16 +'eight'#2#23#3'Top'#2#16#5'Width'#3'7'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
+#5'Width'#3#237#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2 +'akRight'#0#8'TabOrder'#2#3#0#0#14'TDirectoryEdit'#9'DEProject'#4'Left'#3#152
+#3#0#0#14'TDirectoryEdit'#9'DEProject'#4'Left'#3#152#0#6'Height'#2#23#3'Top' +#0#6'Height'#2#23#3'Top'#2'0'#5'Width'#3#135#1#11'ButtonWidth'#2#23#9'NumGly'
+#2'0'#5'Width'#3'='#1#11'ButtonWidth'#2#23#9'NumGlyphs'#2#1#7'Anchors'#11#5 +'phs'#2#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#11'ParentColor'#8#8
+'akTop'#6'akLeft'#7'akRight'#0#11'ParentColor'#8#8'TabOrder'#2#4#0#0#0 +'TabOrder'#2#4#0#0#0
]); ]);

View File

@ -49,6 +49,7 @@ ResourceString
SVariable = 'Variable'; SVariable = 'Variable';
SValue = 'Value'; SValue = 'Value';
SDescription = 'Description'; SDescription = 'Description';
SNoAdditionalVars = 'This project has no additional variables.';
{ TProjectVariablesForm } { TProjectVariablesForm }
@ -86,6 +87,13 @@ Var
begin begin
FVariables:=AValue; FVariables:=AValue;
If (FVariables.Count=0) then
begin
SGVariables.Enabled:=False;
PDescription.Caption:=SNoAdditionalVars;
end
else
begin
SGVariables.RowCount:=FVariables.Count+1; SGVariables.RowCount:=FVariables.Count+1;
For I:=1 to FVariables.Count do For I:=1 to FVariables.Count do
begin begin
@ -96,6 +104,7 @@ begin
SGVariables.Cells[1,I]:=''; SGVariables.Cells[1,I]:='';
SGVariables.Cells[2,I]:=V; SGVariables.Cells[2,I]:=V;
end; end;
end;
end; end;
function TProjectVariablesForm.GetProjectDir: String; function TProjectVariablesForm.GetProjectDir: String;

View File

@ -297,6 +297,7 @@ begin
If B then If B then
begin begin
FN:=FProjectDirectory+FTemplate.TargetFileName(FN,FVariables); FN:=FProjectDirectory+FTemplate.TargetFileName(FN,FVariables);
Writeln('Project file',FN);
AFile:=AProject.CreateProjectFile(FN); AFile:=AProject.CreateProjectFile(FN);
AFile.IsPartOfProject:=true; AFile.IsPartOfProject:=true;
AProject.AddFile(AFile,Not B); AProject.AddFile(AFile,Not B);

View File

@ -8,6 +8,10 @@ msgstr ""
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#: frmtemplatevariables.snoadditionalvars
msgid "This project has no additional variables."
msgstr ""
#: frmtemplatevariables.svalue #: frmtemplatevariables.svalue
msgid "Value" msgid "Value"
msgstr "" msgstr ""

View File

@ -17,14 +17,17 @@ type
FDirectory: String; FDirectory: String;
FExclude: String; FExclude: String;
FName: String; FName: String;
FProjectFile: String;
FRecurse: Boolean; FRecurse: Boolean;
FFiles : TStrings; FFiles : TStrings;
FVariables: TStrings; FVariables: TStrings;
function DefaultFileSubstitutes(AFileName: String): string;
function GetFileCount: Integer; function GetFileCount: Integer;
function GetFileName(FileIndex : Integer): String; function GetFileName(FileIndex : Integer): String;
procedure SetVariables(const AValue: TStrings); procedure SetVariables(const AValue: TStrings);
procedure GetFileList(Const Dir : String); procedure GetFileList(Const Dir : String);
Protected Protected
Function SpecialFile(Const AName : String) : Boolean;
procedure InitFromDir(Const DirName : String); procedure InitFromDir(Const DirName : String);
procedure CopyAndSubstituteDir(Const SrcDir,DestDir : String; Values : TStrings); procedure CopyAndSubstituteDir(Const SrcDir,DestDir : String; Values : TStrings);
procedure CopyAndSubstituteFile(Const SrcFN,DestFN : String; Values : Tstrings); procedure CopyAndSubstituteFile(Const SrcFN,DestFN : String; Values : Tstrings);
@ -44,6 +47,7 @@ type
Property Directory : String Read FDirectory; Property Directory : String Read FDirectory;
Property Description : String Read FDescription Write FDescription; Property Description : String Read FDescription Write FDescription;
Property Variables : TStrings Read FVariables Write SetVariables; Property Variables : TStrings Read FVariables Write SetVariables;
Property ProjectFile : String Read FProjectFile;
Property Author : String Read FAuthor; Property Author : String Read FAuthor;
Property Recurse : Boolean Read FRecurse; Property Recurse : Boolean Read FRecurse;
Property Exclude : String Read FExclude; Property Exclude : String Read FExclude;
@ -83,6 +87,7 @@ Const
KeyDescription = 'Description'; KeyDescription = 'Description';
KeyRecurse = 'Recurse'; KeyRecurse = 'Recurse';
KeyExclude = 'Exclude'; KeyExclude = 'Exclude';
KeyProjectFile = 'ProjectFile';
varprefixstr = '__'; // subtitution pattern is "__varname__" varprefixstr = '__'; // subtitution pattern is "__varname__"
varpostfixstr = '__'; varpostfixstr = '__';
@ -238,6 +243,7 @@ begin
inherited Create(ACollection); inherited Create(ACollection);
FVariables:=TStringList.Create; FVariables:=TStringList.Create;
FFiles:=TStringList.Create; FFiles:=TStringList.Create;
FProjectFile:='project' // Do not localize
end; end;
@ -280,6 +286,7 @@ begin
begin begin
With TMemInifile.Create(FN) do With TMemInifile.Create(FN) do
try try
FProjectFile:=ReadString(SProject,KeyProjectFile,FProjectFile);
FName:=ReadString(SProject,KeyName,DirName); FName:=ReadString(SProject,KeyName,DirName);
FAuthor:=ReadString(SProject,KeyAuthor,''); FAuthor:=ReadString(SProject,KeyAuthor,'');
FDescription:=ReadString(SProject,KeyDescription,''); FDescription:=ReadString(SProject,KeyDescription,'');
@ -350,10 +357,19 @@ begin
end; end;
end; end;
function TProjectTemplate.DefaultFileSubstitutes(AFileName : String) : string;
begin
Result:=AFileName;
If SameFileName(ChangeFileExt(ExtractFileName(Result),''),ProjectFile) then
Result:=ExtractFilePath(Result)+VarPrefixStr+'ProjName'+varpostfixstr+ExtractFileExt(Result);
end;
function TProjectTemplate.TargetFileName(FN: String; Values: TStrings): String; function TProjectTemplate.TargetFileName(FN: String; Values: TStrings): String;
begin begin
Result:=ExtractRelativePath(Directory,FN); Result:=ExtractRelativePath(Directory,FN);
Result:=DefaultFileSubstitutes(Result);
Result:=SubstituteString(Result,Values); Result:=SubstituteString(Result,Values);
end; end;
@ -394,7 +410,7 @@ begin
If FindFirst(Dir+AllFilesMask,0,Info)=0 then If FindFirst(Dir+AllFilesMask,0,Info)=0 then
try try
repeat repeat
if (info.name<>'description.txt') and (info.name<>'project.ini') then if Not SpecialFile(info.name) then
FFiles.Add(Dir+Info.Name); FFiles.Add(Dir+Info.Name);
Until (FindNext(Info)<>0); Until (FindNext(Info)<>0);
finally finally
@ -413,12 +429,18 @@ begin
end; end;
end; end;
function TProjectTemplate.SpecialFile(const AName: String): Boolean;
begin
Result:=SameFileName(AName,'description.txt') or SameFileName(AName,'project.ini');
end;
procedure TProjectTemplate.CopyAndSubstituteDir(Const SrcDir,DestDir : String; Values: Tstrings); procedure TProjectTemplate.CopyAndSubstituteDir(Const SrcDir,DestDir : String; Values: Tstrings);
Var Var
D1,D2 : String; D1,D2 : String;
Info : TSearchRec; Info : TSearchRec;
N : String;
begin begin
D1:=IncludeTrailingPathDelimiter(SrcDir); D1:=IncludeTrailingPathDelimiter(SrcDir);
@ -428,9 +450,13 @@ begin
If FindFirst(D1+AllFilesMask,0,Info)=0 then If FindFirst(D1+AllFilesMask,0,Info)=0 then
try try
repeat repeat
if (info.name<>'description.txt') N:=Info.Name;
and (info.name<>'project.ini') then if Not SpecialFile(N) then
CopyAndSubstituteFile(D1+Info.Name,D2+SubstituteString(Info.Name,Values),Values); begin
// Anything that has projectfile as a name, is also substituted
N:=DefaultFileSubstitutes(N);
CopyAndSubstituteFile(D1+Info.Name,D2+SubstituteString(N,Values),Values);
end;
Until (FindNext(Info)<>0); Until (FindNext(Info)<>0);
finally finally
FindClose(Info); FindClose(Info);