mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 13:31:20 +02:00
* Removed usubst unit, use fpTemplate instead
* Commented out not-implemented option -l from help screen git-svn-id: trunk@15192 -
This commit is contained in:
parent
983c0e6765
commit
1834156acd
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -11321,7 +11321,6 @@ utils/fpcmkcfg/fpcmkcfg.pp svneol=native#text/plain
|
||||
utils/fpcmkcfg/fpinc.cfg svneol=native#text/plain
|
||||
utils/fpcmkcfg/fpinc.ini svneol=native#text/plain
|
||||
utils/fpcmkcfg/fpini.inc svneol=native#text/plain
|
||||
utils/fpcmkcfg/usubst.pp svneol=native#text/plain
|
||||
utils/fpcres/Makefile svneol=native#text/plain
|
||||
utils/fpcres/Makefile.fpc svneol=native#text/plain
|
||||
utils/fpcres/closablefilestream.pas svneol=native#text/plain
|
||||
|
@ -447,556 +447,7 @@ endif
|
||||
ifeq ($(FULL_TARGET),mipsel-linux)
|
||||
override TARGET_PROGRAMS+=fpcmkcfg
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-linux)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-go32v2)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-win32)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-os2)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-freebsd)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-beos)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-haiku)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netbsd)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-solaris)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-qnx)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netware)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-openbsd)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-wdosx)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-darwin)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-emx)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-watcom)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netwlibc)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-wince)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-embedded)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-symbian)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-nativent)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-linux)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-freebsd)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-netbsd)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-amiga)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-atari)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-openbsd)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-palmos)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-embedded)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-linux)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-netbsd)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-amiga)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-macos)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-darwin)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-morphos)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-embedded)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-linux)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-netbsd)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-solaris)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-embedded)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-linux)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-freebsd)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-solaris)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-darwin)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-win64)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-embedded)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-linux)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-palmos)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-darwin)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-wince)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-gba)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-nds)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-embedded)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-symbian)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-linux)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-darwin)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-embedded)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),avr-embedded)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),armeb-linux)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),armeb-embedded)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mipsel-linux)
|
||||
override CLEAN_UNITS+=usubst
|
||||
endif
|
||||
override INSTALL_FPCPACKAGE=y
|
||||
ifeq ($(FULL_TARGET),i386-linux)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-go32v2)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-win32)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-os2)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-freebsd)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-beos)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-haiku)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netbsd)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-solaris)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-qnx)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netware)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-openbsd)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-wdosx)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-darwin)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-emx)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-watcom)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netwlibc)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-wince)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-embedded)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-symbian)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-nativent)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-linux)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-freebsd)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-netbsd)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-amiga)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-atari)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-openbsd)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-palmos)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-embedded)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-linux)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-netbsd)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-amiga)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-macos)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-darwin)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-morphos)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-embedded)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-linux)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-netbsd)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-solaris)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-embedded)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-linux)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-freebsd)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-solaris)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-darwin)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-win64)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-embedded)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-linux)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-palmos)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-darwin)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-wince)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-gba)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-nds)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-embedded)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-symbian)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-linux)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-darwin)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-embedded)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),avr-embedded)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),armeb-linux)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),armeb-embedded)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mipsel-linux)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-linux)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-go32v2)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-win32)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-os2)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-freebsd)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-beos)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-haiku)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netbsd)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-solaris)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-qnx)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netware)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-openbsd)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-wdosx)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-darwin)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-emx)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-watcom)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netwlibc)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-wince)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-embedded)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-symbian)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-nativent)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-linux)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-freebsd)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-netbsd)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-amiga)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-atari)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-openbsd)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-palmos)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-embedded)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-linux)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-netbsd)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-amiga)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-macos)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-darwin)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-morphos)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-embedded)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-linux)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-netbsd)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-solaris)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-embedded)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-linux)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-freebsd)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-solaris)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-darwin)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-win64)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-embedded)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-linux)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-palmos)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-darwin)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-wince)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-gba)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-nds)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-embedded)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-symbian)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-linux)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-darwin)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-embedded)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),avr-embedded)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),armeb-linux)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),armeb-embedded)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mipsel-linux)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
override SHARED_BUILD=n
|
||||
override SHARED_BUILD=n
|
||||
ifdef REQUIRE_UNITSDIR
|
||||
@ -1769,189 +1220,255 @@ else
|
||||
TAROPT=vz
|
||||
TAREXT=.tar.gz
|
||||
endif
|
||||
override REQUIRE_PACKAGES=rtl
|
||||
override REQUIRE_PACKAGES=rtl fcl-base
|
||||
ifeq ($(FULL_TARGET),i386-linux)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-go32v2)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-win32)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-os2)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-freebsd)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-beos)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-haiku)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netbsd)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-solaris)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-qnx)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netware)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-openbsd)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-wdosx)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-darwin)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_UNIVINT=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-emx)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-watcom)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-netwlibc)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-wince)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-embedded)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-symbian)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),i386-nativent)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-linux)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-freebsd)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-netbsd)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-amiga)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-atari)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-openbsd)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-palmos)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),m68k-embedded)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-linux)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-netbsd)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-amiga)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-macos)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-darwin)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_UNIVINT=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-morphos)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc-embedded)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-linux)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-netbsd)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-solaris)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),sparc-embedded)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-linux)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-freebsd)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-solaris)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-darwin)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_UNIVINT=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-win64)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),x86_64-embedded)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-linux)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-palmos)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-darwin)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_UNIVINT=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-wince)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-gba)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-nds)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-embedded)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),arm-symbian)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-linux)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-darwin)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_UNIVINT=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),powerpc64-embedded)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),avr-embedded)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),armeb-linux)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),armeb-embedded)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mipsel-linux)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
REQUIRE_PACKAGES_FCL-BASE=1
|
||||
endif
|
||||
ifdef REQUIRE_PACKAGES_RTL
|
||||
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
|
||||
@ -1979,6 +1496,58 @@ ifdef UNITDIR_RTL
|
||||
override COMPILER_UNITDIR+=$(UNITDIR_RTL)
|
||||
endif
|
||||
endif
|
||||
ifdef REQUIRE_PACKAGES_FCL-BASE
|
||||
PACKAGEDIR_FCL-BASE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-base/Makefile.fpc,$(PACKAGESDIR))))))
|
||||
ifneq ($(PACKAGEDIR_FCL-BASE),)
|
||||
ifneq ($(wildcard $(PACKAGEDIR_FCL-BASE)/units/$(TARGETSUFFIX)),)
|
||||
UNITDIR_FCL-BASE=$(PACKAGEDIR_FCL-BASE)/units/$(TARGETSUFFIX)
|
||||
else
|
||||
UNITDIR_FCL-BASE=$(PACKAGEDIR_FCL-BASE)
|
||||
endif
|
||||
ifdef CHECKDEPEND
|
||||
$(PACKAGEDIR_FCL-BASE)/$(FPCMADE):
|
||||
$(MAKE) -C $(PACKAGEDIR_FCL-BASE) $(FPCMADE)
|
||||
override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-BASE)/$(FPCMADE)
|
||||
endif
|
||||
else
|
||||
PACKAGEDIR_FCL-BASE=
|
||||
UNITDIR_FCL-BASE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-base/Package.fpc,$(UNITSDIR)))))
|
||||
ifneq ($(UNITDIR_FCL-BASE),)
|
||||
UNITDIR_FCL-BASE:=$(firstword $(UNITDIR_FCL-BASE))
|
||||
else
|
||||
UNITDIR_FCL-BASE=
|
||||
endif
|
||||
endif
|
||||
ifdef UNITDIR_FCL-BASE
|
||||
override COMPILER_UNITDIR+=$(UNITDIR_FCL-BASE)
|
||||
endif
|
||||
endif
|
||||
ifdef REQUIRE_PACKAGES_UNIVINT
|
||||
PACKAGEDIR_UNIVINT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /univint/Makefile.fpc,$(PACKAGESDIR))))))
|
||||
ifneq ($(PACKAGEDIR_UNIVINT),)
|
||||
ifneq ($(wildcard $(PACKAGEDIR_UNIVINT)/units/$(TARGETSUFFIX)),)
|
||||
UNITDIR_UNIVINT=$(PACKAGEDIR_UNIVINT)/units/$(TARGETSUFFIX)
|
||||
else
|
||||
UNITDIR_UNIVINT=$(PACKAGEDIR_UNIVINT)
|
||||
endif
|
||||
ifdef CHECKDEPEND
|
||||
$(PACKAGEDIR_UNIVINT)/$(FPCMADE):
|
||||
$(MAKE) -C $(PACKAGEDIR_UNIVINT) $(FPCMADE)
|
||||
override ALLDEPENDENCIES+=$(PACKAGEDIR_UNIVINT)/$(FPCMADE)
|
||||
endif
|
||||
else
|
||||
PACKAGEDIR_UNIVINT=
|
||||
UNITDIR_UNIVINT:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /univint/Package.fpc,$(UNITSDIR)))))
|
||||
ifneq ($(UNITDIR_UNIVINT),)
|
||||
UNITDIR_UNIVINT:=$(firstword $(UNITDIR_UNIVINT))
|
||||
else
|
||||
UNITDIR_UNIVINT=
|
||||
endif
|
||||
endif
|
||||
ifdef UNITDIR_UNIVINT
|
||||
override COMPILER_UNITDIR+=$(UNITDIR_UNIVINT)
|
||||
endif
|
||||
endif
|
||||
ifndef NOCPUDEF
|
||||
override FPCOPTDEF=$(ARCH)
|
||||
endif
|
||||
@ -2485,6 +2054,15 @@ DATA2INC:=$(firstword $(DATA2INC))
|
||||
endif
|
||||
endif
|
||||
export DATA2INC
|
||||
ifndef DATA2INC
|
||||
DATA2INC:=$(strip $(wildcard $(addsuffix /data2inc$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(DATA2INC),)
|
||||
DATA2INC= __missing_command_DATA2INC
|
||||
else
|
||||
DATA2INC:=$(firstword $(DATA2INC))
|
||||
endif
|
||||
endif
|
||||
export DATA2INC
|
||||
all: fpc_all
|
||||
debug: fpc_debug
|
||||
smart: fpc_smart
|
||||
@ -2510,7 +2088,7 @@ ifneq ($(wildcard fpcmake.loc),)
|
||||
include fpcmake.loc
|
||||
endif
|
||||
.NOTPARALLEL:
|
||||
fpcmkcfg$(EXEEXT): fpcmkcfg.pp usubst.pp fpccfg.inc fpcfg.inc fpini.inc
|
||||
fpcmkcfg$(EXEEXT): fpcmkcfg.pp fpccfg.inc fpcfg.inc fpini.inc
|
||||
ifneq ($(DATA2INC),)
|
||||
fpccfg.inc: fpc.cft
|
||||
$(DATA2INC) -b -s fpc.cft fpccfg.inc DefaultConfig
|
||||
|
@ -6,18 +6,13 @@
|
||||
programs=fpcmkcfg
|
||||
rst=fpcmkcfg
|
||||
|
||||
[clean]
|
||||
units=usubst
|
||||
|
||||
[compiler]
|
||||
unitdir=..
|
||||
sourcedir=..
|
||||
|
||||
[install]
|
||||
fpcpackage=y
|
||||
|
||||
[require]
|
||||
tools=data2inc
|
||||
packages=fcl-base
|
||||
tools=data2inc
|
||||
|
||||
[default]
|
||||
fpcdir=../..
|
||||
@ -34,7 +29,7 @@ build=n
|
||||
# due to overwriting each other's link.res file
|
||||
.NOTPARALLEL:
|
||||
|
||||
fpcmkcfg$(EXEEXT): fpcmkcfg.pp usubst.pp fpccfg.inc fpcfg.inc fpini.inc
|
||||
fpcmkcfg$(EXEEXT): fpcmkcfg.pp fpccfg.inc fpcfg.inc fpini.inc
|
||||
|
||||
ifneq ($(DATA2INC),)
|
||||
fpccfg.inc: fpc.cft
|
||||
|
@ -16,7 +16,7 @@
|
||||
**********************************************************************}
|
||||
program fpcmkcfg;
|
||||
|
||||
uses usubst,SysUtils,Classes;
|
||||
uses SysUtils,Classes,fpTemplate;
|
||||
|
||||
{
|
||||
The inc files must be built from a template with the data2inc
|
||||
@ -44,7 +44,7 @@ Resourcestring
|
||||
SUsage40 = ' -d name=value define name=value pair.';
|
||||
SUsage50 = ' -h show this help and exit.';
|
||||
SUsage60 = ' -u name remove name from list of name/value pairs.';
|
||||
SUsage70 = ' -l filename read name/value pairs from filename';
|
||||
// SUsage70 = ' -l filename read name/value pairs from filename';
|
||||
SUsage80 = ' -b show builtin template and exit.';
|
||||
SUsage90 = ' -v be verbose.';
|
||||
Susage100 = ' -0 use built in fpc.cfg template (default)';
|
||||
@ -52,6 +52,7 @@ Resourcestring
|
||||
Susage120 = ' -2 use built in fp.ini template';
|
||||
SErrUnknownOption = 'Error: Unknown option.';
|
||||
SErrArgExpected = 'Error: Option "%s" requires an argument.';
|
||||
SErrIncompletePair = 'Error: Incomplete name-value pair "%s".';
|
||||
SErrNoSuchFile = 'Error: File "%s" does not exist.';
|
||||
SErrBackupFailed = 'Error: Backup of file "%s" to "%s" failed.';
|
||||
SErrDelBackupFailed = 'Error: Delete of old backup file "%s" failed.';
|
||||
@ -64,7 +65,8 @@ Resourcestring
|
||||
Var
|
||||
Verbose : Boolean;
|
||||
SkipBackup : Boolean;
|
||||
List,Cfg : TStringList;
|
||||
Cfg : TStringList;
|
||||
TemplateParser: TTemplateParser;
|
||||
TemplateFileName,
|
||||
OutputFileName : String;
|
||||
IDEBuildin : Integer;
|
||||
@ -75,13 +77,17 @@ procedure Init;
|
||||
begin
|
||||
Verbose:=False;
|
||||
IDEBuildIn:=0;
|
||||
List:=TStringList.Create;
|
||||
AddToList(List,'FPCVERSION',BuildVersion);
|
||||
AddToList(List,'FPCTARGET',BuildTarget);
|
||||
AddToList(List,'FPCTARGETOS',BuildOSTarget);
|
||||
AddToList(List,'PWD',GetCurrentDir);
|
||||
AddToList(List,'BUILDDATE',DateToStr(Date));
|
||||
AddToList(List,'BUILDTIME',TimeToStr(Time));
|
||||
|
||||
TemplateParser := TTemplateParser.Create;
|
||||
TemplateParser.StartDelimiter:='%';
|
||||
TemplateParser.EndDelimiter:='%';
|
||||
TemplateParser.Values['FPCVERSION'] := BuildVersion;
|
||||
TemplateParser.Values['FPCTARGET'] := BuildTarget;
|
||||
TemplateParser.Values['FPCTARGETOS'] := BuildOSTarget;
|
||||
TemplateParser.Values['PWD'] := GetCurrentDir;
|
||||
TemplateParser.Values['BUILDDATE'] := DateToStr(Date);
|
||||
TemplateParser.Values['BUILDTIME'] := TimeToStr(Time);
|
||||
|
||||
Cfg:=TStringList.Create;
|
||||
Cfg.Text:=StrPas(Addr(DefaultConfig[0][1]));
|
||||
end;
|
||||
@ -89,8 +95,8 @@ end;
|
||||
Procedure Done;
|
||||
|
||||
begin
|
||||
FreeAndNil(List);
|
||||
FreeAndNil(Cfg);
|
||||
FreeAndNil(TemplateParser);
|
||||
end;
|
||||
|
||||
Procedure Usage;
|
||||
@ -103,7 +109,7 @@ begin
|
||||
Writeln(SUsage40);
|
||||
Writeln(SUsage50);
|
||||
Writeln(SUsage60);
|
||||
Writeln(SUsage70);
|
||||
// Writeln(SUsage70);
|
||||
Writeln(SUsage80);
|
||||
Writeln(SUsage90);
|
||||
Writeln(SUsage100);
|
||||
@ -149,6 +155,22 @@ Var
|
||||
Result:=ParamStr(I);
|
||||
end;
|
||||
|
||||
procedure AddPair(const Value: String);
|
||||
var P: integer;
|
||||
N,V: String;
|
||||
begin
|
||||
P:=Pos('=',Value);
|
||||
If p=0 then
|
||||
begin
|
||||
Writeln(StdErr,Format(SErrIncompletePair,[Value]));
|
||||
Halt(1);
|
||||
end;
|
||||
V:=Value;
|
||||
N:=Copy(V,1,P-1);
|
||||
Delete(V,1,P);
|
||||
TemplateParser.Values[N] := V;
|
||||
end;
|
||||
|
||||
begin
|
||||
I:=1;
|
||||
While( I<=ParamCount) do
|
||||
@ -165,8 +187,8 @@ begin
|
||||
halt(0);
|
||||
end;
|
||||
't' : TemplateFileName:=GetOptArg;
|
||||
'd' : AddPair(List,GetOptArg);
|
||||
'u' : AddPair(List,GetOptArg+'=');
|
||||
'd' : AddPair(GetOptArg);
|
||||
'u' : TemplateParser.Values[GetOptArg]:='';
|
||||
'o' : OutputFileName:=GetoptArg;
|
||||
's' : SkipBackup:=True;
|
||||
'0' : IDEBuildin:=0;
|
||||
@ -185,7 +207,7 @@ begin
|
||||
Halt(1);
|
||||
end;
|
||||
Cfg.LoadFromFile(TemplateFileName);
|
||||
AddToList(List,'TEMPLATEFILE',TemplateFileName);
|
||||
TemplateParser.Values['TEMPLATEFILE'] := TemplateFileName;
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -196,7 +218,7 @@ begin
|
||||
Cfg.Text:=StrPas(Addr(fpini[0][1]));
|
||||
end;
|
||||
|
||||
AddToList(List,'TEMPLATEFILE','builtin');
|
||||
TemplateParser.Values['TEMPLATEFILE'] := 'builtin';
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -206,7 +228,7 @@ Procedure CreateFile;
|
||||
Var
|
||||
Fout : Text;
|
||||
S,BFN : String;
|
||||
I,RCount : INteger;
|
||||
I : Integer;
|
||||
|
||||
begin
|
||||
If (OutputFileName<>'')
|
||||
@ -228,15 +250,12 @@ begin
|
||||
Assign(Fout,OutputFileName);
|
||||
Rewrite(FOut);
|
||||
Try
|
||||
RCount:=0;
|
||||
For I:=0 to Cfg.Count-1 do
|
||||
begin
|
||||
S:=Cfg[i];
|
||||
Inc(RCount,DoSubstitutions(List,S));
|
||||
S := TemplateParser.ParseString(S);
|
||||
Writeln(FOut,S);
|
||||
end;
|
||||
If Verbose then
|
||||
Writeln(StdErr,Format(SStats,[RCount,Cfg.Count]));
|
||||
Finally
|
||||
Close(Fout);
|
||||
end;
|
||||
|
@ -1,109 +0,0 @@
|
||||
{$mode objfpc}
|
||||
{$H+}
|
||||
{
|
||||
This file is part of Free Pascal build tools
|
||||
Copyright (c) 2005 by Michael Van Canneyt
|
||||
|
||||
Implements string substitutions
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
unit usubst;
|
||||
|
||||
interface
|
||||
|
||||
uses SysUtils,Classes;
|
||||
|
||||
// Add N=V pair to list.
|
||||
Procedure AddToList(List : TStrings; Const N,V : String);
|
||||
// Split NV to N/V and call AddToList
|
||||
Function AddPair(List : TStrings; Const NV : String) : Boolean;
|
||||
// Perform substitutions in S, from List.
|
||||
Function DoSubStitutions(List : TStrings; Var S : String) : Integer;
|
||||
|
||||
implementation
|
||||
|
||||
Procedure AddToList(List : TStrings; Const N,V : String);
|
||||
|
||||
var
|
||||
I : Integer;
|
||||
|
||||
begin
|
||||
I:=List.IndexOfName(N);
|
||||
If (V='') then
|
||||
begin
|
||||
If (I<>-1) then
|
||||
List.Delete(I)
|
||||
end
|
||||
else
|
||||
begin
|
||||
If (I=-1) then
|
||||
List.Add(N+'='+V)
|
||||
else
|
||||
List[I]:=N+'='+V;
|
||||
end;
|
||||
end;
|
||||
|
||||
Function AddPair(List : TStrings; Const NV : String) : Boolean;
|
||||
|
||||
Var
|
||||
P : Integer;
|
||||
N,V : string;
|
||||
|
||||
begin
|
||||
P:=Pos('=',NV);
|
||||
Result:=(P<>0);
|
||||
If Result then
|
||||
begin
|
||||
V:=NV;
|
||||
N:=Copy(V,1,P-1);
|
||||
Delete(V,1,P);
|
||||
AddToList(List,N,V);
|
||||
end;
|
||||
end;
|
||||
|
||||
Function DoSubstitutions(List : TStrings; Var S : String) : Integer;
|
||||
|
||||
Var
|
||||
N,T : String;
|
||||
P : Integer;
|
||||
|
||||
begin
|
||||
Result:=0;
|
||||
T:=S;
|
||||
S:='';
|
||||
P:=Pos('%',T);
|
||||
While (P>0) do
|
||||
begin
|
||||
S:=S+Copy(T,1,P-1);
|
||||
Delete(T,1,P);
|
||||
If (Length(T)>0) then
|
||||
if (T[1]='%') then
|
||||
begin
|
||||
S:=S+'%';
|
||||
Delete(T,1,1);
|
||||
end
|
||||
else
|
||||
begin
|
||||
P:=Pos('%',T);
|
||||
If (P=0) then
|
||||
S:=S+'%'
|
||||
else
|
||||
begin
|
||||
N:=Copy(T,1,P-1);
|
||||
Delete(T,1,P);
|
||||
S:=S+List.Values[N];
|
||||
end;
|
||||
end;
|
||||
P:=Pos('%',T);
|
||||
end;
|
||||
S:=S+T;
|
||||
end;
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user