Selaa lähdekoodia

+ Moved makefiles to top level dir and scripts to install

michael 25 vuotta sitten
vanhempi
commit
eee62f408c
7 muutettua tiedostoa jossa 0 lisäystä ja 3882 poistoa
  1. 0 88
      base/INSTALL
  2. 0 1685
      base/Makefile
  3. 0 504
      base/Makefile.fpc
  4. 0 145
      base/README
  5. BIN
      base/fp32_32.ico
  6. 0 748
      base/os2snap.bat
  7. 0 712
      base/os2snap.cmd

+ 0 - 88
base/INSTALL

@@ -1,88 +0,0 @@
-Extra Required tools
-********************
-
-ppufiles.exe    from utils/
-upx.exe         latest version, currently 1.01
-
-
-Setting up the directory layout
-*******************************
-
-For all releases you need to checkout the following modules:
-
-base
-compiler
-rtl
-fcl
-api
-fv
-ide
-install
-docs
-utils
-packages
-
-then copy the base/Makefile* to the topdir
-
-
-Creating *src.zip files
-***********************
-
-Now the directory is still clean from all build files you can easily create
-the *src.zip files by running the following commands:
-
-make sourcezip
-make demosrc
-make docsrc
-make installersrc
-
-Some of the output files need to be renamed to be in the 8.3 format:
-
-mv installersrc.zip instsrc.zip
-mv packagessrc.zip pkgssrc.zip
-mv compilersrc.zip compsrc.zip
-
-
-Install libgdb.a
-****************
-
-If you want the debugger included in the IDE for some target you need to
-install the libgdb.a file, the libgdb_*.zip files can be found on
-ftp://ftp.freepascal.org/pub/fpc/contrib
-
-Unzip the libgdb*.zip file in the directory packages/gdbint/libgdb/<target>.
-
-
-Building for go32v2,win32
-*************************
-
-When everything is in the correct place you can build the whole release for
-go32v2 and win32 with the following commands:
-
-make go32v2zip
-make win32zip
-
-
-Finally you can create the installer with
-
-make installer OS_TARGET=go32v2
-(copy the install.exe to the dir were you place all the go32v2 packages
-before uploading)
-make installer OS_TARGET=win32
-(copy the install.exe ... )
-
-Futher you need to put the files on the ftp the same way as 0.99.14 is
-stored. With a script on ftp.freepascal.org you can then make the release
-.zips
-
-
-Building for linux
-******************
-
-For linux the creation of the release is the easiest way, just run in the
-topdir:
-
-for debs: make deb
-for rpms: make rpm
-for .tar.gz: copy the makepack script from install/ to the topdir. Then run
-             the script

+ 0 - 1685
base/Makefile

@@ -1,1685 +0,0 @@
-#
-# Makefile generated by fpcmake v0.99.15 [2000/07/02]
-#
-
-defaultrule: help
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inlinux when running under linux
-# define inWinNT when running under WinNT
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-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
-inlinux=1
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-ifndef inlinux
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-endif
-endif
-
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inlinux
-ifndef inWinNT
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inlinux
-EXEEXT=
-else
-EXEEXT=.exe
-endif
-
-# The path which is searched separated by spaces
-ifdef inlinux
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-ifdef inOS2
-FPC=ppos2
-else
-FPC=ppc386
-endif
-endif
-endif
-override FPC:=$(subst $(EXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(EXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
-
-#####################################################################
-# Pre Settings
-#####################################################################
-
-OLDFPCDIR:=$(FPCDIR)
-
-checkfpcdir:
-ifdef OLDFPCDIR
-ifneq ($(OLDFPCDIR),)
-	@echo ---------------------------------------------------------
-	@echo
-	@echo   You must unset FPCDIR to use this the packaging rules.
-	@echo
-	@echo ---------------------------------------------------------
-	@cantcontinuewithfpcdir
-endif
-endif
-
-# Check if install/ subdir is available
-ifneq ($(wildcard install),)
-CVSINSTALL=install
-else
-CVSINSTALL=.
-endif
-
-# All target
-ifdef SNAPSHOT
-ALLTARGET=all
-else
-ifndef ALLTARGET
-ifeq ($(OS_TARGET),win32)
-ALLTARGET=smart
-else
-ifeq ($(OS_TARGET),go32v2)
-ALLTARGET=smart
-else
-ALLTARGET=all
-endif
-endif
-endif
-endif
-
-# Stop with an error?
-ifdef SNAPSHOT
-NOSTOP=-
-else
-NOSTOP=
-endif
-
-# Prefix for units
-ifeq ($(OS_TARGET),linux)
-PKGPRE=units
-else
-PKGPRE=u
-endif
-
-# Test dir if none specified
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-PREFIXINSTALLDIR=/tmp/pptest
-else
-PREFIXINSTALLDIR=/pptest
-endif
-endif
-
-# Always compile for release
-override RELEASE=1
-export RELEASE
-
-# We want to have the resulting .zips in the current dir
-ifndef DESTZIPDIR
-export DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Temporary path to pack a file
-BASEPACKDIR=$(BASEDIR)/basepack
-
-# Use new ppc386
-PPNEW=$(BASEDIR)/compiler/ppc386$(EXEEXT)
-
-# Don't use ppufiles for win32 becuase of commandline length problems
-ifneq ($(OS_TARGET),win32)
-PPUFILESNEW=$(BASEDIR)/utils/ppufiles$(EXEEXT)
-endif
-
-# Build/install options
-BUILDOPTS=FPC=$(PPNEW) RELEASE=1
-INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR)
-ifdef PPUFILESNEW
-override INSTALLOPT+=PPUFILES=$(PPUFILESNEW)
-endif
-
-# Compile also IDE (check for ide and fv dir)
-ifneq ($(wildcard ide),)
-ifneq ($(wildcard fv),)
-ifeq ($(OS_TARGET),go32v2)
-IDE=1
-endif
-ifeq ($(OS_TARGET),win32)
-IDE=1
-endif
-ifeq ($(OS_TARGET),linux)
-IDE=1
-endif
-endif
-endif
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inlinux
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override DIROBJECTS+=$(wildcard compiler rtl utils fcl api fv packages ide)
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-
-# Directories
-
-
-# Packages
-
-
-# Libraries
-
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inlinux
-INSTALL:=install -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inlinux
-INSTALLEXE:=install -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inlinux
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-ifdef inlinux
-PPAS=ppas.sh
-else
-ifdef inOS2
-PPAS=ppas.cmd
-else
-PPAS=ppas.bat
-endif
-endif
-
-# ldconfig to rebuild .so cache
-ifdef inlinux
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# gdate/date
-ifndef DATE
-DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(DATE),)
-DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))
-ifeq ($(DATE),)
-DATE=
-else
-DATE:=$(firstword $(DATE))
-endif
-else
-DATE:=$(firstword $(DATE))
-endif
-endif
-export DATE
-
-ifdef DATE
-DATESTR:=$(shell $(DATE) +%Y%m%d)
-else
-DATESTR=
-endif
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef inlinux
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-debug: $(addsuffix _debug,$(DIROBJECTS))
-
-smart: $(addsuffix _smart,$(DIROBJECTS))
-
-shared: $(addsuffix _shared,$(DIROBJECTS))
-
-showinstall: $(addsuffix _showinstall,$(DIROBJECTS))
-
-cleanall: fpc_cleanall $(addsuffix _cleanall,$(DIROBJECTS))
-
-require: $(addsuffix _require,$(DIROBJECTS))
-
-.PHONY:  debug smart shared showinstall cleanall require
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inlinux
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inlinux
-USETAR=1
-endif
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
-	@$(ECHO) "Please specify ZIPNAME!"
-	@exit 1
-else
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef USETAR
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
-	cd $(PACKDIR) ; $(TARPROG) c$(TAROPT) --file $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
-else
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
-	cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
-	-$(DEL) $(CLEANRSTFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
-	-$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Directories
-#####################################################################
-
-OBJECTDIRCOMPILER=1
-OBJECTDIRRTL=1
-OBJECTDIRUTILS=1
-OBJECTDIRFCL=1
-OBJECTDIRAPI=1
-OBJECTDIRFV=1
-OBJECTDIRPACKAGES=1
-OBJECTDIRIDE=1
-
-# Dir compiler
-
-ifdef OBJECTDIRCOMPILER
-.PHONY:  compiler_all compiler_debug compiler_examples compiler_test compiler_smart compiler_shared compiler_showinstall compiler_install compiler_sourceinstall compiler_exampleinstall compiler_zipinstall compiler_zipsourceinstall compiler_zipexampleinstall compiler_clean compiler_distclean compiler_cleanall compiler_require compiler_info
-
-compiler_all:
-	$(MAKE) -C compiler all
-
-compiler_debug:
-	$(MAKE) -C compiler debug
-
-compiler_examples:
-	$(MAKE) -C compiler examples
-
-compiler_test:
-	$(MAKE) -C compiler test
-
-compiler_smart:
-	$(MAKE) -C compiler smart
-
-compiler_shared:
-	$(MAKE) -C compiler shared
-
-compiler_showinstall:
-	$(MAKE) -C compiler showinstall
-
-compiler_install:
-	$(MAKE) -C compiler install
-
-compiler_sourceinstall:
-	$(MAKE) -C compiler sourceinstall
-
-compiler_exampleinstall:
-	$(MAKE) -C compiler exampleinstall
-
-compiler_zipinstall:
-	$(MAKE) -C compiler zipinstall
-
-compiler_zipsourceinstall:
-	$(MAKE) -C compiler zipsourceinstall
-
-compiler_zipexampleinstall:
-	$(MAKE) -C compiler zipexampleinstall
-
-compiler_clean:
-	$(MAKE) -C compiler clean
-
-compiler_distclean:
-	$(MAKE) -C compiler distclean
-
-compiler_cleanall:
-	$(MAKE) -C compiler cleanall
-
-compiler_require:
-	$(MAKE) -C compiler require
-
-compiler_info:
-	$(MAKE) -C compiler info
-endif
-
-# Dir rtl
-
-ifdef OBJECTDIRRTL
-.PHONY:  rtl_all rtl_debug rtl_examples rtl_test rtl_smart rtl_shared rtl_showinstall rtl_install rtl_sourceinstall rtl_exampleinstall rtl_zipinstall rtl_zipsourceinstall rtl_zipexampleinstall rtl_clean rtl_distclean rtl_cleanall rtl_require rtl_info
-
-rtl_all:
-	$(MAKE) -C rtl all
-
-rtl_debug:
-	$(MAKE) -C rtl debug
-
-rtl_examples:
-	$(MAKE) -C rtl examples
-
-rtl_test:
-	$(MAKE) -C rtl test
-
-rtl_smart:
-	$(MAKE) -C rtl smart
-
-rtl_shared:
-	$(MAKE) -C rtl shared
-
-rtl_showinstall:
-	$(MAKE) -C rtl showinstall
-
-rtl_install:
-	$(MAKE) -C rtl install
-
-rtl_sourceinstall:
-	$(MAKE) -C rtl sourceinstall
-
-rtl_exampleinstall:
-	$(MAKE) -C rtl exampleinstall
-
-rtl_zipinstall:
-	$(MAKE) -C rtl zipinstall
-
-rtl_zipsourceinstall:
-	$(MAKE) -C rtl zipsourceinstall
-
-rtl_zipexampleinstall:
-	$(MAKE) -C rtl zipexampleinstall
-
-rtl_clean:
-	$(MAKE) -C rtl clean
-
-rtl_distclean:
-	$(MAKE) -C rtl distclean
-
-rtl_cleanall:
-	$(MAKE) -C rtl cleanall
-
-rtl_require:
-	$(MAKE) -C rtl require
-
-rtl_info:
-	$(MAKE) -C rtl info
-endif
-
-# Dir utils
-
-ifdef OBJECTDIRUTILS
-.PHONY:  utils_all utils_debug utils_examples utils_test utils_smart utils_shared utils_showinstall utils_install utils_sourceinstall utils_exampleinstall utils_zipinstall utils_zipsourceinstall utils_zipexampleinstall utils_clean utils_distclean utils_cleanall utils_require utils_info
-
-utils_all:
-	$(MAKE) -C utils all
-
-utils_debug:
-	$(MAKE) -C utils debug
-
-utils_examples:
-	$(MAKE) -C utils examples
-
-utils_test:
-	$(MAKE) -C utils test
-
-utils_smart:
-	$(MAKE) -C utils smart
-
-utils_shared:
-	$(MAKE) -C utils shared
-
-utils_showinstall:
-	$(MAKE) -C utils showinstall
-
-utils_install:
-	$(MAKE) -C utils install
-
-utils_sourceinstall:
-	$(MAKE) -C utils sourceinstall
-
-utils_exampleinstall:
-	$(MAKE) -C utils exampleinstall
-
-utils_zipinstall:
-	$(MAKE) -C utils zipinstall
-
-utils_zipsourceinstall:
-	$(MAKE) -C utils zipsourceinstall
-
-utils_zipexampleinstall:
-	$(MAKE) -C utils zipexampleinstall
-
-utils_clean:
-	$(MAKE) -C utils clean
-
-utils_distclean:
-	$(MAKE) -C utils distclean
-
-utils_cleanall:
-	$(MAKE) -C utils cleanall
-
-utils_require:
-	$(MAKE) -C utils require
-
-utils_info:
-	$(MAKE) -C utils info
-endif
-
-# Dir fcl
-
-ifdef OBJECTDIRFCL
-.PHONY:  fcl_all fcl_debug fcl_examples fcl_test fcl_smart fcl_shared fcl_showinstall fcl_install fcl_sourceinstall fcl_exampleinstall fcl_zipinstall fcl_zipsourceinstall fcl_zipexampleinstall fcl_clean fcl_distclean fcl_cleanall fcl_require fcl_info
-
-fcl_all:
-	$(MAKE) -C fcl all
-
-fcl_debug:
-	$(MAKE) -C fcl debug
-
-fcl_examples:
-	$(MAKE) -C fcl examples
-
-fcl_test:
-	$(MAKE) -C fcl test
-
-fcl_smart:
-	$(MAKE) -C fcl smart
-
-fcl_shared:
-	$(MAKE) -C fcl shared
-
-fcl_showinstall:
-	$(MAKE) -C fcl showinstall
-
-fcl_install:
-	$(MAKE) -C fcl install
-
-fcl_sourceinstall:
-	$(MAKE) -C fcl sourceinstall
-
-fcl_exampleinstall:
-	$(MAKE) -C fcl exampleinstall
-
-fcl_zipinstall:
-	$(MAKE) -C fcl zipinstall
-
-fcl_zipsourceinstall:
-	$(MAKE) -C fcl zipsourceinstall
-
-fcl_zipexampleinstall:
-	$(MAKE) -C fcl zipexampleinstall
-
-fcl_clean:
-	$(MAKE) -C fcl clean
-
-fcl_distclean:
-	$(MAKE) -C fcl distclean
-
-fcl_cleanall:
-	$(MAKE) -C fcl cleanall
-
-fcl_require:
-	$(MAKE) -C fcl require
-
-fcl_info:
-	$(MAKE) -C fcl info
-endif
-
-# Dir api
-
-ifdef OBJECTDIRAPI
-.PHONY:  api_all api_debug api_examples api_test api_smart api_shared api_showinstall api_install api_sourceinstall api_exampleinstall api_zipinstall api_zipsourceinstall api_zipexampleinstall api_clean api_distclean api_cleanall api_require api_info
-
-api_all:
-	$(MAKE) -C api all
-
-api_debug:
-	$(MAKE) -C api debug
-
-api_examples:
-	$(MAKE) -C api examples
-
-api_test:
-	$(MAKE) -C api test
-
-api_smart:
-	$(MAKE) -C api smart
-
-api_shared:
-	$(MAKE) -C api shared
-
-api_showinstall:
-	$(MAKE) -C api showinstall
-
-api_install:
-	$(MAKE) -C api install
-
-api_sourceinstall:
-	$(MAKE) -C api sourceinstall
-
-api_exampleinstall:
-	$(MAKE) -C api exampleinstall
-
-api_zipinstall:
-	$(MAKE) -C api zipinstall
-
-api_zipsourceinstall:
-	$(MAKE) -C api zipsourceinstall
-
-api_zipexampleinstall:
-	$(MAKE) -C api zipexampleinstall
-
-api_clean:
-	$(MAKE) -C api clean
-
-api_distclean:
-	$(MAKE) -C api distclean
-
-api_cleanall:
-	$(MAKE) -C api cleanall
-
-api_require:
-	$(MAKE) -C api require
-
-api_info:
-	$(MAKE) -C api info
-endif
-
-# Dir fv
-
-ifdef OBJECTDIRFV
-.PHONY:  fv_all fv_debug fv_examples fv_test fv_smart fv_shared fv_showinstall fv_install fv_sourceinstall fv_exampleinstall fv_zipinstall fv_zipsourceinstall fv_zipexampleinstall fv_clean fv_distclean fv_cleanall fv_require fv_info
-
-fv_all:
-	$(MAKE) -C fv all
-
-fv_debug:
-	$(MAKE) -C fv debug
-
-fv_examples:
-	$(MAKE) -C fv examples
-
-fv_test:
-	$(MAKE) -C fv test
-
-fv_smart:
-	$(MAKE) -C fv smart
-
-fv_shared:
-	$(MAKE) -C fv shared
-
-fv_showinstall:
-	$(MAKE) -C fv showinstall
-
-fv_install:
-	$(MAKE) -C fv install
-
-fv_sourceinstall:
-	$(MAKE) -C fv sourceinstall
-
-fv_exampleinstall:
-	$(MAKE) -C fv exampleinstall
-
-fv_zipinstall:
-	$(MAKE) -C fv zipinstall
-
-fv_zipsourceinstall:
-	$(MAKE) -C fv zipsourceinstall
-
-fv_zipexampleinstall:
-	$(MAKE) -C fv zipexampleinstall
-
-fv_clean:
-	$(MAKE) -C fv clean
-
-fv_distclean:
-	$(MAKE) -C fv distclean
-
-fv_cleanall:
-	$(MAKE) -C fv cleanall
-
-fv_require:
-	$(MAKE) -C fv require
-
-fv_info:
-	$(MAKE) -C fv info
-endif
-
-# Dir packages
-
-ifdef OBJECTDIRPACKAGES
-.PHONY:  packages_all packages_debug packages_examples packages_test packages_smart packages_shared packages_showinstall packages_install packages_sourceinstall packages_exampleinstall packages_zipinstall packages_zipsourceinstall packages_zipexampleinstall packages_clean packages_distclean packages_cleanall packages_require packages_info
-
-packages_all:
-	$(MAKE) -C packages all
-
-packages_debug:
-	$(MAKE) -C packages debug
-
-packages_examples:
-	$(MAKE) -C packages examples
-
-packages_test:
-	$(MAKE) -C packages test
-
-packages_smart:
-	$(MAKE) -C packages smart
-
-packages_shared:
-	$(MAKE) -C packages shared
-
-packages_showinstall:
-	$(MAKE) -C packages showinstall
-
-packages_install:
-	$(MAKE) -C packages install
-
-packages_sourceinstall:
-	$(MAKE) -C packages sourceinstall
-
-packages_exampleinstall:
-	$(MAKE) -C packages exampleinstall
-
-packages_zipinstall:
-	$(MAKE) -C packages zipinstall
-
-packages_zipsourceinstall:
-	$(MAKE) -C packages zipsourceinstall
-
-packages_zipexampleinstall:
-	$(MAKE) -C packages zipexampleinstall
-
-packages_clean:
-	$(MAKE) -C packages clean
-
-packages_distclean:
-	$(MAKE) -C packages distclean
-
-packages_cleanall:
-	$(MAKE) -C packages cleanall
-
-packages_require:
-	$(MAKE) -C packages require
-
-packages_info:
-	$(MAKE) -C packages info
-endif
-
-# Dir ide
-
-ifdef OBJECTDIRIDE
-.PHONY:  ide_all ide_debug ide_examples ide_test ide_smart ide_shared ide_showinstall ide_install ide_sourceinstall ide_exampleinstall ide_zipinstall ide_zipsourceinstall ide_zipexampleinstall ide_clean ide_distclean ide_cleanall ide_require ide_info
-
-ide_all:
-	$(MAKE) -C ide all
-
-ide_debug:
-	$(MAKE) -C ide debug
-
-ide_examples:
-	$(MAKE) -C ide examples
-
-ide_test:
-	$(MAKE) -C ide test
-
-ide_smart:
-	$(MAKE) -C ide smart
-
-ide_shared:
-	$(MAKE) -C ide shared
-
-ide_showinstall:
-	$(MAKE) -C ide showinstall
-
-ide_install:
-	$(MAKE) -C ide install
-
-ide_sourceinstall:
-	$(MAKE) -C ide sourceinstall
-
-ide_exampleinstall:
-	$(MAKE) -C ide exampleinstall
-
-ide_zipinstall:
-	$(MAKE) -C ide zipinstall
-
-ide_zipsourceinstall:
-	$(MAKE) -C ide zipsourceinstall
-
-ide_zipexampleinstall:
-	$(MAKE) -C ide zipexampleinstall
-
-ide_clean:
-	$(MAKE) -C ide clean
-
-ide_distclean:
-	$(MAKE) -C ide distclean
-
-ide_cleanall:
-	$(MAKE) -C ide cleanall
-
-ide_require:
-	$(MAKE) -C ide require
-
-ide_info:
-	$(MAKE) -C ide info
-endif
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-
-#####################################################################
-# Users rules
-#####################################################################
-
-# These values can change
-unexport FPC_VERSION OS_SOURCE
-
-#####################################################################
-# Main targets
-#####################################################################
-
-.PHONY: help checkfpcdir
-
-help:
-	@echo
-	@echo Directory targets:
-	@echo
-	@echo $(DIROBJECTS)
-	@echo
-	@echo Packing targets are:
-	@echo
-	@echo go32v2zip,win32zip,linuxzip,sourcezip
-	@echo
-	@exit
-
-
-#####################################################################
-# Dependencies
-#####################################################################
-
-#######################################
-# Compiler
-#######################################
-
-.PHONY: compiler_cycle
-
-compiler_cycle:
-	$(MAKE) -C compiler cycle
-
-
-#######################################
-# IDE
-#######################################
-
-.PHONY: ide_comp ide_full
-
-ide_comp:
-	$(MAKE) -C compiler ppuclean
-	$(MAKE) -C ide full
-
-# Look if libgdb.a is available then use fullgdb
-ifneq ($(wildcard packages/gdbint/libgdb/$(OS_TARGET)/libgdb.a),)
-ide_full:
-	$(MAKE) -C compiler ppuclean
-	$(MAKE) -C ide fullgdb
-else
-ide_full:
-	$(MAKE) -C compiler ppuclean
-	$(MAKE) -C ide full
-endif
-
-
-#######################################
-# Install targets
-#######################################
-
-demo_install:
-	$(MAKE) -C $(CVSINSTALL)/demo sourceinstall
-
-man_install:
-	$(MAKE) -C $(CVSINSTALL)/man installman
-
-doc_install:
-	$(MAKE) -C $(CVSINSTALL)/doc installdoc
-
-
-#######################################
-# Packaging targets
-#######################################
-
-idezips: ide_fullzip ide_fullgdbzip optcompinstall optcompzip
-
-ide_compzip:
-	$(MAKE) compiler_clean
-	$(MAKE) ide_clean
-	$(MAKE) ide_full
-	$(MAKE) -C ide/text zipinstall ZIPNAME=ide-comp-$(PACKAGESUFFIX)
-ide_fullgdbzip:
-	$(MAKE) ide_clean
-	$(MAKE) ide_fullgdb
-	$(MAKE) -C ide/text zipinstall ZIPNAME=ide-full-$(PACKAGESUFFIX)
-
-optcompinstall:
-	$(MAKE) compiler_cycle OPT=-dNEWOPTIMIZATIONS
-	$(MAKE) compiler_install
-	$(MAKE) rtl_install
-
-optcompzip:
-	$(MAKE) fpc_zipinstall PACKAGENAME=optcomp ZIPTARGET=optcompinstall
-
-
-##########################################################################
-# Install
-##########################################################################
-
-.PHONY: installer installersrc
-
-INSTALLERBUILDDIR=fpinst
-
-installer:
-	$(COPYTREE) $(CVSINSTALL)/fpinst $(INSTALLERBUILDDIR)
-	$(MAKE) -C $(INSTALLERBUILDDIR) all RELEASE=1
-	$(MOVE) $(INSTALLERBUILDDIR)/install.exe .
-ifdef UPXPROG
-	-$(UPXPROG) install.exe
-endif
-	$(DELTREE) $(INSTALLERBUILDDIR)
-
-installersrc:
-	$(COPYTREE) $(CVSINSTALL)/fpinst $(INSTALLERBUILDDIR)
-	$(MAKE) -C $(INSTALLERBUILDDIR) zipsourceinstall
-	$(DELTREE) $(INSTALLERBUILDDIR)
-
-
-##########################################################################
-# Packaging
-##########################################################################
-
-.PHONY: all clean distclean build install installbase zipinstall zipinstallbase zipinstallfcl \
-	zipinstallpackages
-
-export RELEASE DESTZIPDIR
-
-all: build
-
-clean: $(addsuffix _distclean,$(DIROBJECTS))
-	$(DEL) build-stamp.$(OS_TARGET)
-
-distclean: clean
-
-
-build: build-stamp.$(OS_TARGET)
-build-stamp.$(OS_TARGET):
-# create new compiler
-ifeq ($(OS_TARGET),win32)
-	-$(MAKE) compiler_cycle
-else
-	$(MAKE) compiler_cycle
-endif
-# clean
-	$(MAKE) rtl_clean
-	$(MAKE) api_clean
-	$(MAKE) fcl_clean
-	$(MAKE) packages_clean
-	$(MAKE) utils_clean
-ifdef IDE
-	$(MAKE) fv_clean
-	$(MAKE) ide_clean
-endif
-# build everything
-	$(MAKE) rtl_$(ALLTARGET) $(BUILDOPTS)
-	$(MAKE) api_$(ALLTARGET) $(BUILDOPTS)
-	$(MAKE) fcl_$(ALLTARGET) $(BUILDOPTS)
-	$(MAKE) packages_$(ALLTARGET) $(BUILDOPTS)
-	$(MAKE) utils_all $(BUILDOPTS)
-ifdef IDE
-	-$(MAKE) ide_full $(BUILDOPTS)
-endif
-	$(ECHO) Build > build-stamp.$(OS_TARGET)
-
-installbase: build-stamp.$(OS_TARGET)
-# create dirs
-	$(MKDIR) $(BASEINSTALLDIR)
-	$(MKDIR) $(DOCINSTALLDIR)
-	$(MKDIR) $(BININSTALLDIR)
-ifndef SNAPSHOT
-# readme & whatsnew and docs
-	$(COPY) $(CVSINSTALL)/doc/*.txt $(CVSINSTALL)/doc/copying* $(CVSINSTALL)/doc/faq.* $(DOCINSTALLDIR)
-# bingo32 (cwsdpmi,wmemu387.dxe)
-ifeq ($(OS_TARGET),go32v2)
-	$(COPY) $(CVSINSTALL)/bingo32/* $(BININSTALLDIR)
-endif
-# binw32 (cygwin1.dll)
-ifeq ($(OS_TARGET),win32)
-	$(COPY) $(CVSINSTALL)/binw32/* $(BININSTALLDIR)
-endif
-# manpages for linux
-ifeq ($(OS_TARGET),linux)
-	$(MAKE) -C $(CVSINSTALL)/man installman
-endif
-endif
-# install generated things
-	$(MAKE) compiler_install $(INSTALLOPTS)
-	$(MAKE) rtl_install $(INSTALLOPTS)
-
-install: build-stamp.$(OS_TARGET)
-	$(MAKE) installbase $(INSTALLOPTS)
-	$(MAKE) utils_install $(INSTALLOPTS)
-	$(MAKE) api_install $(INSTALLOPTS)
-	$(MAKE) fcl_install $(INSTALLOPTS)
-	$(MAKE) packages_install $(INSTALLOPTS)
-ifdef IDE
-	$(NOSTOP)$(MAKE) ide_install $(BUILDOPTS)
-endif
-# install examples
-ifndef SNAPSHOT
-	$(MAKE) fcl_exampleinstall $(INSTALLOPTS)
-	$(MAKE) api_exampleinstall $(INSTALLOPTS)
-	$(MAKE) packages_exampleinstall $(INSTALLOPTS)
-endif
-
-zipinstall: build-stamp.$(OS_TARGET)
-	$(MAKE) fpc_zipinstall ZIPTARGET=installbase PACKAGENAME=base $(INSTALLOPTS)
-	$(MAKE) utils_zipinstall $(INSTALLOPTS)
-	$(MAKE) api_zipinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-	$(MAKE) fcl_zipinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-	$(MAKE) packages_zipinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-ifdef IDE
-	$(NOSTOP)$(MAKE) ide_zipinstall $(INSTALLOPTS)
-endif
-ifndef SNAPSHOT
-	$(MAKE) fcl_zipexampleinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-	$(MAKE) api_zipexampleinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-	$(MAKE) packages_zipexampleinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-endif
-
-
-##########################################################################
-# Docs
-##########################################################################
-
-.PHONY: docspdf docs docsrcinstall docsrc
-
-docspdf:
-	$(MAKE) -C docs pdfinstall
-
-docs:
-	$(MAKE) fpc_zipinstall ZIPTARGET=docspdf ZIPNAME=docs
-
-docsrcinstall:
-	$(MAKE) -C docs clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) docs $(SOURCEINSTALLDIR)
-
-docsrc:
-	$(MAKE) fpc_zipinstall ZIPTARGET=docsrcinstall ZIPNAME=docsrc
-
-
-##########################################################################
-# Demos
-##########################################################################
-
-.PHONY: demozip
-
-demozip:
-	$(MAKE) -C $(CVSINSTALL)/demo zipsourceinstall ZIPNAME=demo
-
-
-##########################################################################
-# Source targets
-##########################################################################
-
-.PHONY: sourcebase sourcezip
-
-sourcebase:
-# base Makefiles needed for sources
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(MKDIR) $(SOURCEINSTALLDIR)/rtl
-	$(MKDIR) $(SOURCEINSTALLDIR)/packages
-	$(COPY) Makefile*  $(SOURCEINSTALLDIR)
-	$(COPY) rtl/Makefile* $(SOURCEINSTALLDIR)/rtl
-	$(COPY) packages/Makefile* $(SOURCEINSTALLDIR)/packages
-
-sourcezip:
-	$(MAKE) fpc_zipinstall ZIPTARGET=sourcebase ZIPNAME=basesrc
-	$(MAKE) compiler_zipsourceinstall
-	$(MAKE) rtl_zipsourceinstall
-	$(MAKE) api_zipsourceinstall
-	$(MAKE) fcl_zipsourceinstall
-	$(MAKE) packages_zipsourceinstall
-	$(MAKE) utils_zipsourceinstall
-	$(MAKE) ide_zipsourceinstall
-#        $(MAKE) installersrc
-#        $(MAKE) docsrc
-
-
-##########################################################################
-# OS targets
-##########################################################################
-
-.PHONY: go32v2 win32 linux go32v2zip win32zip linuxzip
-
-go32v2: checkfpcdir
-	$(MAKE) install OS_TARGET=go32v2
-
-win32: checkfpcdir
-	$(MAKE) install OS_TARGET=win32
-
-linux: checkfpcdir
-	$(MAKE) install OS_TARGET=linux
-
-go32v2zip: checkfpcdir
-	$(MAKE) zipinstall OS_TARGET=go32v2
-
-win32zip: checkfpcdir
-	$(MAKE) zipinstall OS_TARGET=win32
-
-linuxzip: checkfpcdir
-	$(MAKE) zipinstall OS_TARGET=linux
-
-
-##########################################################################
-# Debian / RPM
-##########################################################################
-
-.PHONY: debcopy deb rpmcopy rpm
-
-DEBSRCDIR:=/usr/src/fpc-$(FPC_VERSION)
-debcopy: distclean
-	rm -rf $(DEBSRCDIR)
-	install -d $(DEBSRCDIR)
-	$(COPYTREE) compiler $(DEBSRCDIR)
-	$(COPYTREE) rtl $(DEBSRCDIR)
-	$(COPYTREE) fcl $(DEBSRCDIR)
-	$(COPYTREE) api $(DEBSRCDIR)
-	$(COPYTREE) packages $(DEBSRCDIR)
-	$(COPYTREE) utils $(DEBSRCDIR)
-	$(COPYTREE) logs $(DEBSRCDIR)
-	$(COPYTREE) docs $(DEBSRCDIR)
-	$(COPYTREE) base/Makefile* $(DEBSRCDIR)
-	$(COPYTREE) $(CVSINSTALL)/debian $(DEBSRCDIR)
-	$(COPYTREE) $(CVSINSTALL)/man $(DEBSRCDIR)
-	$(COPYTREE) $(CVSINSTALL)/doc $(DEBSRCDIR)
-	$(COPYTREE) $(CVSINSTALL)/demo $(DEBSRCDIR)
-	find $(DEBSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
-	chmod 755 $(DEBSRCDIR)/debian/rules
-
-deb: checkfpcdir debcopy
-	cd $(DEBSRCDIR) ; debian/rules binary
-
-
-REDHATDIR=/usr/src/redhat
-RPMSOURCESDIR:=$(REDHATDIR)/SOURCES
-RPMSPECDIR:=$(REDHATDIR)/SPECS
-RPMSRCDIR:=$(RPMSOURCESDIR)/fpc
-DOCSRCDIR:=$(RPMSOURCESDIR)/fpcdoc
-rpmcopy: distclean
-	install -d $(REDHATDIR)
-	install -d $(RPMSPECDIR)
-	install -d $(RPMSOURCESDIR)
-# fpc.rpm
-	rm -rf $(RPMSRCDIR)
-	cp $(CVSINSTALL)/fpc-$(FPC_VERSION).spec $(RPMSPECDIR)
-	install -d $(RPMSRCDIR)
-	$(COPYTREE) compiler $(RPMSRCDIR)
-	$(COPYTREE) rtl $(RPMSRCDIR)
-	$(COPYTREE) fcl $(RPMSRCDIR)
-	$(COPYTREE) api $(RPMSRCDIR)
-	$(COPYTREE) packages $(RPMSRCDIR)
-	$(COPYTREE) utils $(RPMSRCDIR)
-	$(COPYTREE) logs $(RPMSRCDIR)
-	$(COPYTREE) base/Makefile* $(RPMSRCDIR)
-	$(COPYTREE) $(CVSINSTALL)/man $(RPMSRCDIR)
-	$(COPYTREE) $(CVSINSTALL)/doc $(RPMSRCDIR)
-	$(COPYTREE) $(CVSINSTALL)/demo $(RPMSRCDIR)
-	find $(RPMSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
-	cd $(RPMSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-$(FPC_VERSION)-src.tar.gz
-# fpc-docs.rpm
-	rm -rf $(DOCSRCDIR)
-	cp $(CVSINSTALL)/fpc-docs-$(FPC_VERSION).spec $(RPMSPECDIR)
-	install -d $(DOCSRCDIR)
-	$(COPYTREE) docs $(DOCSRCDIR)
-	find $(DOCSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
-	cd $(DOCSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-docs-$(FPC_VERSION)-src.tar.gz
-
-rpm: checkfpcdir rpmcopy
-	cd $(RPMSPECDIR) ; rpm -ba fpc-$(FPC_VERSION).spec
-	cd $(RPMSPECDIR) ; rpm -ba fpc-docs-$(FPC_VERSION).spec

+ 0 - 504
base/Makefile.fpc

@@ -1,504 +0,0 @@
-#
-#   Makefile.fpc for Free Pascal Source Tree
-#
-
-[targets]
-dirs=compiler rtl utils fcl api fv packages ide
-
-[defaults]
-defaultrule=help
-
-[tools]
-toolzip=1
-toolupx=1
-tooldate=1
-
-[sections]
-none=1
-dirs=1
-tools=1
-exts=1
-clean=1
-zipinstall=1
-
-
-[presettings]
-OLDFPCDIR:=$(FPCDIR)
-
-checkfpcdir:
-ifdef OLDFPCDIR
-ifneq ($(OLDFPCDIR),)
-        @echo ---------------------------------------------------------
-        @echo
-        @echo   You must unset FPCDIR to use this the packaging rules.
-        @echo
-        @echo ---------------------------------------------------------
-        @cantcontinuewithfpcdir
-endif
-endif
-
-# Check if install/ subdir is available
-ifneq ($(wildcard install),)
-CVSINSTALL=install
-else
-CVSINSTALL=.
-endif
-
-# All target
-ifdef SNAPSHOT
-ALLTARGET=all
-else
-ifndef ALLTARGET
-ifeq ($(OS_TARGET),win32)
-ALLTARGET=smart
-else
-ifeq ($(OS_TARGET),go32v2)
-ALLTARGET=smart
-else
-ALLTARGET=all
-endif
-endif
-endif
-endif
-
-# Stop with an error?
-ifdef SNAPSHOT
-NOSTOP=-
-else
-NOSTOP=
-endif
-
-# Prefix for units
-ifeq ($(OS_TARGET),linux)
-PKGPRE=units
-else
-PKGPRE=u
-endif
-
-# Test dir if none specified
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-PREFIXINSTALLDIR=/tmp/pptest
-else
-PREFIXINSTALLDIR=/pptest
-endif
-endif
-
-# Always compile for release
-override RELEASE=1
-export RELEASE
-
-# We want to have the resulting .zips in the current dir
-ifndef DESTZIPDIR
-export DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Temporary path to pack a file
-BASEPACKDIR=$(BASEDIR)/basepack
-
-# Use new ppc386
-PPNEW=$(BASEDIR)/compiler/ppc386$(EXEEXT)
-
-# Don't use ppufiles for win32 becuase of commandline length problems
-ifneq ($(OS_TARGET),win32)
-PPUFILESNEW=$(BASEDIR)/utils/ppufiles$(EXEEXT)
-endif
-
-# Build/install options
-BUILDOPTS=FPC=$(PPNEW) RELEASE=1
-INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR)
-ifdef PPUFILESNEW
-override INSTALLOPT+=PPUFILES=$(PPUFILESNEW)
-endif
-
-# Compile also IDE (check for ide and fv dir)
-ifneq ($(wildcard ide),)
-ifneq ($(wildcard fv),)
-ifeq ($(OS_TARGET),go32v2)
-IDE=1
-endif
-ifeq ($(OS_TARGET),win32)
-IDE=1
-endif
-ifeq ($(OS_TARGET),linux)
-IDE=1
-endif
-endif
-endif
-
-[rules]
-# These values can change
-unexport FPC_VERSION OS_SOURCE
-
-#####################################################################
-# Main targets
-#####################################################################
-
-.PHONY: help checkfpcdir
-
-help:
-        @echo
-        @echo Directory targets:
-        @echo
-        @echo $(DIROBJECTS)
-        @echo
-        @echo Packing targets are:
-        @echo
-        @echo go32v2zip,win32zip,linuxzip,sourcezip
-        @echo
-        @exit
-
-
-#####################################################################
-# Dependencies
-#####################################################################
-
-#######################################
-# Compiler
-#######################################
-
-.PHONY: compiler_cycle
-
-compiler_cycle:
-        $(MAKE) -C compiler cycle
-
-
-#######################################
-# IDE
-#######################################
-
-.PHONY: ide_comp ide_full
-
-ide_comp:
-        $(MAKE) -C compiler ppuclean
-        $(MAKE) -C ide full
-
-# Look if libgdb.a is available then use fullgdb
-ifneq ($(wildcard packages/gdbint/libgdb/$(OS_TARGET)/libgdb.a),)
-ide_full:
-        $(MAKE) -C compiler ppuclean
-        $(MAKE) -C ide fullgdb
-else
-ide_full:
-        $(MAKE) -C compiler ppuclean
-        $(MAKE) -C ide full
-endif
-
-
-#######################################
-# Install targets
-#######################################
-
-demo_install:
-        $(MAKE) -C $(CVSINSTALL)/demo sourceinstall
-
-man_install:
-        $(MAKE) -C $(CVSINSTALL)/man installman
-
-doc_install:
-        $(MAKE) -C $(CVSINSTALL)/doc installdoc
-
-
-#######################################
-# Packaging targets
-#######################################
-
-idezips: ide_fullzip ide_fullgdbzip optcompinstall optcompzip
-
-ide_compzip:
-        $(MAKE) compiler_clean
-        $(MAKE) ide_clean
-        $(MAKE) ide_full
-        $(MAKE) -C ide/text zipinstall ZIPNAME=ide-comp-$(PACKAGESUFFIX)
-ide_fullgdbzip:
-        $(MAKE) ide_clean
-        $(MAKE) ide_fullgdb
-        $(MAKE) -C ide/text zipinstall ZIPNAME=ide-full-$(PACKAGESUFFIX)
-
-optcompinstall:
-        $(MAKE) compiler_cycle OPT=-dNEWOPTIMIZATIONS
-        $(MAKE) compiler_install
-        $(MAKE) rtl_install
-
-optcompzip:
-        $(MAKE) fpc_zipinstall PACKAGENAME=optcomp ZIPTARGET=optcompinstall
-
-
-##########################################################################
-# Install
-##########################################################################
-
-.PHONY: installer installersrc
-
-INSTALLERBUILDDIR=fpinst
-
-installer:
-        $(COPYTREE) $(CVSINSTALL)/fpinst $(INSTALLERBUILDDIR)
-        $(MAKE) -C $(INSTALLERBUILDDIR) all RELEASE=1
-        $(MOVE) $(INSTALLERBUILDDIR)/install.exe .
-ifdef UPXPROG
-        -$(UPXPROG) install.exe
-endif
-        $(DELTREE) $(INSTALLERBUILDDIR)
-
-installersrc:
-        $(COPYTREE) $(CVSINSTALL)/fpinst $(INSTALLERBUILDDIR)
-        $(MAKE) -C $(INSTALLERBUILDDIR) zipsourceinstall
-        $(DELTREE) $(INSTALLERBUILDDIR)
-
-
-##########################################################################
-# Packaging
-##########################################################################
-
-.PHONY: all clean distclean build install installbase zipinstall zipinstallbase zipinstallfcl \
-        zipinstallpackages
-
-export RELEASE DESTZIPDIR
-
-all: build
-
-clean: $(addsuffix _distclean,$(DIROBJECTS))
-        $(DEL) build-stamp.$(OS_TARGET)
-
-distclean: clean
-
-
-build: build-stamp.$(OS_TARGET)
-build-stamp.$(OS_TARGET):
-# create new compiler
-ifeq ($(OS_TARGET),win32)
-        -$(MAKE) compiler_cycle
-else
-        $(MAKE) compiler_cycle
-endif
-# clean
-        $(MAKE) rtl_clean
-        $(MAKE) api_clean
-        $(MAKE) fcl_clean
-        $(MAKE) packages_clean
-        $(MAKE) utils_clean
-ifdef IDE
-        $(MAKE) fv_clean
-        $(MAKE) ide_clean
-endif
-# build everything
-        $(MAKE) rtl_$(ALLTARGET) $(BUILDOPTS)
-        $(MAKE) api_$(ALLTARGET) $(BUILDOPTS)
-        $(MAKE) fcl_$(ALLTARGET) $(BUILDOPTS)
-        $(MAKE) packages_$(ALLTARGET) $(BUILDOPTS)
-        $(MAKE) utils_all $(BUILDOPTS)
-ifdef IDE
-        -$(MAKE) ide_full $(BUILDOPTS)
-endif
-        $(ECHO) Build > build-stamp.$(OS_TARGET)
-
-installbase: build-stamp.$(OS_TARGET)
-# create dirs
-        $(MKDIR) $(BASEINSTALLDIR)
-        $(MKDIR) $(DOCINSTALLDIR)
-        $(MKDIR) $(BININSTALLDIR)
-ifndef SNAPSHOT
-# readme & whatsnew and docs
-        $(COPY) $(CVSINSTALL)/doc/*.txt $(CVSINSTALL)/doc/copying* $(CVSINSTALL)/doc/faq.* $(DOCINSTALLDIR)
-# bingo32 (cwsdpmi,wmemu387.dxe)
-ifeq ($(OS_TARGET),go32v2)
-        $(COPY) $(CVSINSTALL)/bingo32/* $(BININSTALLDIR)
-endif
-# binw32 (cygwin1.dll)
-ifeq ($(OS_TARGET),win32)
-        $(COPY) $(CVSINSTALL)/binw32/* $(BININSTALLDIR)
-endif
-# manpages for linux
-ifeq ($(OS_TARGET),linux)
-        $(MAKE) -C $(CVSINSTALL)/man installman
-endif
-endif
-# install generated things
-        $(MAKE) compiler_install $(INSTALLOPTS)
-        $(MAKE) rtl_install $(INSTALLOPTS)
-
-install: build-stamp.$(OS_TARGET)
-        $(MAKE) installbase $(INSTALLOPTS)
-        $(MAKE) utils_install $(INSTALLOPTS)
-        $(MAKE) api_install $(INSTALLOPTS)
-        $(MAKE) fcl_install $(INSTALLOPTS)
-        $(MAKE) packages_install $(INSTALLOPTS)
-ifdef IDE
-        $(NOSTOP)$(MAKE) ide_install $(BUILDOPTS)
-endif
-# install examples
-ifndef SNAPSHOT
-        $(MAKE) fcl_exampleinstall $(INSTALLOPTS)
-        $(MAKE) api_exampleinstall $(INSTALLOPTS)
-        $(MAKE) packages_exampleinstall $(INSTALLOPTS)
-endif
-
-zipinstall: build-stamp.$(OS_TARGET)
-        $(MAKE) fpc_zipinstall ZIPTARGET=installbase PACKAGENAME=base $(INSTALLOPTS)
-        $(MAKE) utils_zipinstall $(INSTALLOPTS)
-        $(MAKE) api_zipinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-        $(MAKE) fcl_zipinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-        $(MAKE) packages_zipinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-ifdef IDE
-        $(NOSTOP)$(MAKE) ide_zipinstall $(INSTALLOPTS)
-endif
-ifndef SNAPSHOT
-        $(MAKE) fcl_zipexampleinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-        $(MAKE) api_zipexampleinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-        $(MAKE) packages_zipexampleinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
-endif
-
-
-##########################################################################
-# Docs
-##########################################################################
-
-.PHONY: docspdf docs docsrcinstall docsrc
-
-docspdf:
-        $(MAKE) -C docs pdfinstall
-
-docs:
-        $(MAKE) fpc_zipinstall ZIPTARGET=docspdf ZIPNAME=docs
-
-docsrcinstall:
-        $(MAKE) -C docs clean
-        $(MKDIR) $(SOURCEINSTALLDIR)
-        $(COPYTREE) docs $(SOURCEINSTALLDIR)
-
-docsrc:
-        $(MAKE) fpc_zipinstall ZIPTARGET=docsrcinstall ZIPNAME=docsrc
-
-
-##########################################################################
-# Demos
-##########################################################################
-
-.PHONY: demozip
-
-demozip:
-        $(MAKE) -C $(CVSINSTALL)/demo zipsourceinstall ZIPNAME=demo
-
-
-##########################################################################
-# Source targets
-##########################################################################
-
-.PHONY: sourcebase sourcezip
-
-sourcebase:
-# base Makefiles needed for sources
-        $(MKDIR) $(SOURCEINSTALLDIR)
-        $(MKDIR) $(SOURCEINSTALLDIR)/rtl
-        $(MKDIR) $(SOURCEINSTALLDIR)/packages
-        $(COPY) Makefile*  $(SOURCEINSTALLDIR)
-        $(COPY) rtl/Makefile* $(SOURCEINSTALLDIR)/rtl
-        $(COPY) packages/Makefile* $(SOURCEINSTALLDIR)/packages
-
-sourcezip:
-        $(MAKE) fpc_zipinstall ZIPTARGET=sourcebase ZIPNAME=basesrc
-        $(MAKE) compiler_zipsourceinstall
-        $(MAKE) rtl_zipsourceinstall
-        $(MAKE) api_zipsourceinstall
-        $(MAKE) fcl_zipsourceinstall
-        $(MAKE) packages_zipsourceinstall
-        $(MAKE) utils_zipsourceinstall
-        $(MAKE) ide_zipsourceinstall
-#        $(MAKE) installersrc
-#        $(MAKE) docsrc
-
-
-##########################################################################
-# OS targets
-##########################################################################
-
-.PHONY: go32v2 win32 linux go32v2zip win32zip linuxzip
-
-go32v2: checkfpcdir
-        $(MAKE) install OS_TARGET=go32v2
-
-win32: checkfpcdir
-        $(MAKE) install OS_TARGET=win32
-
-linux: checkfpcdir
-        $(MAKE) install OS_TARGET=linux
-
-go32v2zip: checkfpcdir
-        $(MAKE) zipinstall OS_TARGET=go32v2
-
-win32zip: checkfpcdir
-        $(MAKE) zipinstall OS_TARGET=win32
-
-linuxzip: checkfpcdir
-        $(MAKE) zipinstall OS_TARGET=linux
-
-
-##########################################################################
-# Debian / RPM
-##########################################################################
-
-.PHONY: debcopy deb rpmcopy rpm
-
-DEBSRCDIR:=/usr/src/fpc-$(FPC_VERSION)
-debcopy: distclean
-        rm -rf $(DEBSRCDIR)
-        install -d $(DEBSRCDIR)
-        $(COPYTREE) compiler $(DEBSRCDIR)
-        $(COPYTREE) rtl $(DEBSRCDIR)
-        $(COPYTREE) fcl $(DEBSRCDIR)
-        $(COPYTREE) api $(DEBSRCDIR)
-        $(COPYTREE) packages $(DEBSRCDIR)
-        $(COPYTREE) utils $(DEBSRCDIR)
-        $(COPYTREE) logs $(DEBSRCDIR)
-        $(COPYTREE) docs $(DEBSRCDIR)
-        $(COPYTREE) base/Makefile* $(DEBSRCDIR)
-        $(COPYTREE) $(CVSINSTALL)/debian $(DEBSRCDIR)
-        $(COPYTREE) $(CVSINSTALL)/man $(DEBSRCDIR)
-        $(COPYTREE) $(CVSINSTALL)/doc $(DEBSRCDIR)
-        $(COPYTREE) $(CVSINSTALL)/demo $(DEBSRCDIR)
-        find $(DEBSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
-        chmod 755 $(DEBSRCDIR)/debian/rules
-
-deb: checkfpcdir debcopy
-        cd $(DEBSRCDIR) ; debian/rules binary
-
-
-REDHATDIR=/usr/src/redhat
-RPMSOURCESDIR:=$(REDHATDIR)/SOURCES
-RPMSPECDIR:=$(REDHATDIR)/SPECS
-RPMSRCDIR:=$(RPMSOURCESDIR)/fpc
-DOCSRCDIR:=$(RPMSOURCESDIR)/fpcdoc
-rpmcopy: distclean
-        install -d $(REDHATDIR)
-        install -d $(RPMSPECDIR)
-        install -d $(RPMSOURCESDIR)
-# fpc.rpm
-        rm -rf $(RPMSRCDIR)
-        cp $(CVSINSTALL)/fpc-$(FPC_VERSION).spec $(RPMSPECDIR)
-        install -d $(RPMSRCDIR)
-        $(COPYTREE) compiler $(RPMSRCDIR)
-        $(COPYTREE) rtl $(RPMSRCDIR)
-        $(COPYTREE) fcl $(RPMSRCDIR)
-        $(COPYTREE) api $(RPMSRCDIR)
-        $(COPYTREE) packages $(RPMSRCDIR)
-        $(COPYTREE) utils $(RPMSRCDIR)
-        $(COPYTREE) logs $(RPMSRCDIR)
-        $(COPYTREE) base/Makefile* $(RPMSRCDIR)
-        $(COPYTREE) $(CVSINSTALL)/man $(RPMSRCDIR)
-        $(COPYTREE) $(CVSINSTALL)/doc $(RPMSRCDIR)
-        $(COPYTREE) $(CVSINSTALL)/demo $(RPMSRCDIR)
-        find $(RPMSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
-        cd $(RPMSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-$(FPC_VERSION)-src.tar.gz
-# fpc-docs.rpm
-        rm -rf $(DOCSRCDIR)
-        cp $(CVSINSTALL)/fpc-docs-$(FPC_VERSION).spec $(RPMSPECDIR)
-        install -d $(DOCSRCDIR)
-        $(COPYTREE) docs $(DOCSRCDIR)
-        find $(DOCSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
-        cd $(DOCSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-docs-$(FPC_VERSION)-src.tar.gz
-
-rpm: checkfpcdir rpmcopy
-        cd $(RPMSPECDIR) ; rpm -ba fpc-$(FPC_VERSION).spec
-        cd $(RPMSPECDIR) ; rpm -ba fpc-docs-$(FPC_VERSION).spec
-

+ 0 - 145
base/README

@@ -1,145 +0,0 @@
-
-Possible settings for common Free Pascal Makefile:
-
-General configurable settings:
-------------------------------
-OS_TARGET       The target operating system you are going to compile for
-                (Note: This has autodetection for go32v2,linux,winnt)
-
-OS_SOURCE       The source operating system you compiling under
-                (Note: This has autodetection for go32v2,linux,winnt)
-
-CPU_TARGET      The target CPU that is used (currently m68k,i386)
-                Default: CPU_TARGET=i386
-
-OPT             General commandline options you want to give
-                Example to compile with debug info: OPT=-g
-
-OPTDEF          Commandline defines, which also need to be passed to
-                programs that don't want other options (like mkdep)
-
-NEEDOPT         Realy needed commandline options, also used when
-                RELEASE=1. Example: NEEDOPT=-Sg to allow goto
-
-NEEDUNITDIR     Realy needed unitdir
-
-FPC             compiler to use, default is ppc386
-                Example to compile with version 0.99.8: FPC=ppc998
-
-AS              assembler to use to compile the loaders
-                Default: AS=as
-
-LD              linker to use
-                Default: LD=ld
-
-RELEASE         setting this to a value (for example RELEASE=1) will compile
-                for a release, no ppc386.cfg is read an compile is done with
-                the following settings: '-Xs -OG2p2 -n'
-
-VERBOSE         setting this to a value (for example VERBOSE=1) will compile
-                with more verbosity, this can be used in combination with
-                the RELEASE option. Verbosity used: '-vwni'
-
-SMARTLINK       setting this to YES will create smartlinked files
-                Example: SMARTLINK=YES
-
-LIBNAME         set the outputname for the library to LIBNAME, mostly used
-                in combination with SMARTLINK to create a one library which
-                contains all units
-                Example: LIBNAME=objpas SMARTLINK=yes
-
-LIBTYPE         can be set to shared or static to set the library type you
-                want to create. When shared is set it overrides smartlink
-                and turns it off.
-                Example: LIBTYPE=shared LIBNAME=objpas
-
-DEFAULTUNITS    if this is set then a 'make all' will only compile the units
-                and not the exes
-
-NODEFAULTRULES  Don't include the default compiler rules. This is needed for
-                top-makefiles which call other files in subdirs
-
-
-Location:
----------
-INC             Where to find the .inc files.
-                Example: INC=inc $(OS_TARGET)
-
-TARGETDIR       Where to place all the .o,.ppu,.exe files
-                Example: TARGETDIR=. (this is needed when you compile
-                a unit from an other dir, but want the .ppu,.o in the
-                current directory)
-
-UNITTARGETDIR   Where to place the .o,.ppu files, this overrides the
-                TARGETDIR setting for these files.
-                Example see TARGETDIR
-
-
-File Handling:
---------------
-MOVE            Command to move files
-COPY            Command to copy files
-DEL             Command to delete files
-DELTREE         Command to delete a whole directory tree
-INSTALL         Command to install a normal file (not executable)
-INSTALLEXE      Command to install an executable file
-MKDIR           Command to make a new directory
-
-
-Tools:
-------
-LDCONFIG        command to rebuild the ld.so.cache (automaticly set for linux)
-PPAS            ppas.sh for linux, other os's ppas.bat
-PPUMOVE         PPUMove program
-DIFF            GNU Diff
-DATE            GNU Date (automaticly searched)
-SED             GNU Sed (automaticly searched)
-PWD             GNU PWD (automaticly searched)
-UPXPROG         UPX ExeFile compressor (automaticly searched)
-ZIPPROG         ZIP compressor (automaticly searched)
-
-
-Directories:
------------
-BASEDIR         Current working directory (automaticly loaded using PWD)
-
-FPCDIR          Base directory of Free Pascal
-
-RTLDIR          Directory to the used RTL. This contains already the target
-                Default: $FPCDIR/rtl/$OS_TARGET
-
-UNITDIR         Directory to the currently used units for the target
-                Default: $FPCDIR/units/$OS_TARGET
-
-
-Installation directories:
--------------------------
-BASEINSTALLDIR  Base directory where to install all the files.
-                Default: /pp (linux: /usr/lib/fpc/$VER)
-
-LIBINSTALLDIR   Directory to install all libraries
-                Default: $BASEINSTALLDIR/lib (linux: $BASEINSTALLDIR)
-
-BININSTALLDIR   Directory where to install the binaries
-                Default: $BASEINSTALLDIR/bin/$OS_TARGET (linux: /usr/bin)
-
-UNITINSTALLDIR  Directory where to install the normal units
-                Default: $BASEINSTALLDIR/rtl/$OS_TARGET
-
-STATIC_UNITINSTALLDIR  Directory where to install static (smartlinked) units
-                Default: $BASEINSTALLDIR/rtl/$OS_TARGET/static
-
-SHARED_UNITINSTALLDIR  Directory where to install shared linked units
-                Default: $BASEINSTALLDIR/rtl/$OS_TARGET/shared
-
-STATIC_LIBINSTALLDIR  Directory where to install static linked libraries
-                Default: $STATIC_UNITINSTALLDIR
-
-SHARED_LIBINSTALLDIR  Directory where to install shared linked libraries
-                Default: $SHARED_UNITINSTALLDIR (linux: /usr/lib)
-
-MSGINSTALLDIR   Directory where to place the .msg (language) files
-                Default: $BASEINSTALLDIR/msg
-
-DOCINSTALLDIR:  Directory where to install the documentation
-                Default: $BASEINSTALLDIR/doc (linux: /usr/doc/fpc/$VER)

BIN
base/fp32_32.ico


+ 0 - 748
base/os2snap.bat

@@ -1,748 +0,0 @@
-@echo off
-
-rem ***  $Id$
-
-rem *** Batch file for creating of FPC snapshot for OS/2.
-rem *** FPCDIR variable must be set to your base FPC directory and
-rem *** must _not_ contain forward slashes (only backslashes allowed).
-rem *** Please, note, that you need to have enough space for environment
-rem *** variables to run this batch - something like 2 kB should be enough
-rem *** unless path to FPC source is long (don't try to run it under Norton
-rem *** Commander or similar programs under DOS with COMMAND.COM as shell).
-rem *** Your compiler (PPC386.EXE per default) and AS.EXE must be somewhere
-rem *** on PATH (unless you set path to them explicitly using FPCTOOLS
-rem *** variable, which must end with \ if present). However, be sure which
-rem *** version of AS.EXE, etc. gets called if several such files exist.
-rem *** One of the following parameters may be specified: rtl, compiler,
-rem *** both, cycle and snapshot ("snapshot" being the default), optionally
-rem *** followed by parameters "debug" (causing debugging symbols not to be
-rem *** stripped from the created compiler), "release" (code optimization,
-rem *** debug info stripped out), and "verbose" (compiler messages are
-rem *** shown; the same can be accomplished with setting environment
-rem *** variable DOVERBOSE to 1). Parameters "debug" and "release" are
-rem *** mutually exclusive (the later one is used if both are present).
-rem *** Parameter "ppas" forces only PPAS script to be created
-rem *** by the compiler and called manually afterwards. This might help
-rem *** to resolve LD crashes due to low stack (e.g. under WinXX).
-rem *** Parameters _must_ be in lowercase to be recognized correctly,
-rem *** unless running under 4dos or compatible (e.g. NDOS).
-rem *** Meaning of parameters:
-rem ***  rtl .......... RTL only, _no_ snapshot created
-rem ***  compiler ..... compiler only, _no_ snapshot created
-rem ***  both ......... both RTL and compiler, _no_ snapshot created
-rem ***  snapshot ..... both RTL and compiler, snapshot _is_ created
-rem ***  cycle ........ RTL and compiler compiled, the resulting compiler
-rem ***                 is then copied to %FPCTOOLS% (BIN\OS2 by default)
-rem ***                 backing up possible previous version to ppos2.x),
-rem ***                 the whole procedure is started again (RTL is compiled
-rem ***                 with the new compiler version this time) and after
-rem ***                 another cycle (to make sure the new compiler works
-rem ***                 correctly) the snapshot is finally created
-rem *** PPC386.EXE is used for the compilation (for the first one only with
-rem *** "cycle" option), unless a different compiler name (e.g. PPOS2.EXE)
-rem *** is specified in FPCCOMPILER variable. In any case, the compiler should
-rem *** reside in the same directory as the other required tools (AS.EXE,
-rem *** LD.EXE, etc.).
-rem *** Environment variable OTHEROPTS may be used to specify additional
-rem *** switches (e.g. setting level of verbosity, etc.).
-rem *** Environment variable FPCLOG can specify a file for error logging
-rem *** (full path needed). Please, note, that the previous contents of
-rem *** file will be overwritten each time the batch file is run.
-rem *** Environment variable VERBOSEOPT may be used to specify level of
-rem *** verbosity used with "verbose" parameter (-va by default, i.e. show
-rem *** everything). Another way would be specifying this in OTHEROPTS
-rem *** variable (see above) and not using "verbose" at all.
-rem *** Environment variable FPCSNAPPATH may be used to specify path, where
-rem *** the compiled files should be placed and possibly the ZIP file
-rem *** created.
-
-set FPCERRLOG=%FPCLOG%
-if .%FPCERRLOG% == . set FPCERRLOG=CON
-if .%FPCERRLOG% == . echo Error: Not enough environment space!!!
-if .%FPCERRLOG% == . exit
-
-echo *"Makefile" for OS/2: > %FPCERRLOG%
-
-echo *Setting up environment (possible "Invalid path" messages are OK here) ... >> %FPCERRLOG%
-
-rem Check whether FPCDIR exists
-if .%FPCDIR% == . goto ErrorDir
-if exist %FPCDIR% goto DirOK
-if exist %FPCDIR%\. goto DirOK
-if exist %FPCDIR%\makefile goto DirOK
-if exist %FPCDIR%\COMPILER\pp.pas goto DirOK
-if exist %FPCDIR%\SOURCE\makefile goto DirOK
-if exist %FPCDIR%\SOURCE\COMPILER\pp.pas goto DirOK
-goto ErrorDir
-
-:DirOK
-
-rem Set path to the source files
-if exist %FPCDIR%\SOURCE goto SrcExists
-if exist %FPCDIR%\SOURCE\. goto SrcExists
-if exist %FPCDIR%\SOURCE\makefile goto SrcExists
-if exist %FPCDIR%\SOURCE\COMPILER\pp.pas goto SrcExists
-set FPCSRC=%FPCDIR%
-goto SnapDir
-
-:SrcExists
-set FPCSRC=%FPCDIR%\SOURCE
-
-:SnapDir
-set FPCSNAP=%FPCSNAPPATH%
-if .%FPCSNAP% == . set FPCSNAP=%FPCSRC%\SNAPSHOT
-echo X > %FPCSNAP%\TEST.TMP
-if exist %FPCSNAP%\TEST.TMP goto SnapExists
-echo *Creating directories for the snapshot ... >> %FPCERRLOG%
-mkdir %FPCSNAP% >> %FPCERRLOG%
-echo X > %FPCSNAP%\TEST.TMP
-if exist %FPCSNAP%\TEST.TMP goto SnapExists
-echo *Error: Cannot create the directory %FPCSNAP%!!
-goto End
-
-:SnapExists
-del %FPCSNAP%\TEST.TMP > nul
-echo X > %FPCSNAP%\BIN\TEST.TMP
-if exist %FPCSNAP%\BIN\TEST.TMP goto BinExists
-echo *Creating directories for the snapshot (binaries) ... >> %FPCERRLOG%
-mkdir %FPCSNAP%\BIN >> %FPCERRLOG%
-echo X > %FPCSNAP%\BIN\TEST.TMP
-if exist %FPCSNAP%\BIN\TEST.TMP goto BinExists
-echo *Error: Cannot create the directory %FPCSNAP%\BIN!!
-goto End
-
-:BinExists
-del %FPCSNAP%\BIN\TEST.TMP > nul
-set FPCSNAPBIN=%FPCSNAP%\BIN\OS2
-echo X > %FPCSNAPBIN%\TEST.TMP
-if exist %FPCSNAPBIN%\TEST.TMP goto BinOS2Exists
-echo *Creating directories for the snapshot (binaries for OS/2) ... >> %FPCERRLOG%
-mkdir %FPCSNAPBIN% >> %FPCERRLOG%
-echo X > %FPCSNAPBIN%\TEST.TMP
-if exist %FPCSNAPBIN%\TEST.TMP goto BinOS2Exists
-echo *Error: Cannot create the directory %FPCSNAPBIN%!!
-goto End
-
-:BinOS2Exists
-del %FPCSNAPBIN%\TEST.TMP > nul
-set FPCSNAPMSG=%FPCSNAP%\MSG
-echo X > %FPCSNAPMSG%\TEST.TMP
-if exist %FPCSNAPMSG%\TEST.TMP goto MsgExists
-echo *Creating directories for the snapshot (messages) ... >> %FPCERRLOG%
-mkdir %FPCSNAPMSG% >> %FPCERRLOG%
-echo X > %FPCSNAPMSG%\TEST.TMP
-if exist %FPCSNAPMSG%\TEST.TMP goto MsgExists
-echo *Error: Cannot create the directory %FPCSNAPMSG%!!
-goto End
-
-:MsgExists
-del %FPCSNAPMSG%\TEST.TMP > nul
-echo X > %FPCSNAP%\UNITS\TEST.TMP
-if exist %FPCSNAP%\UNITS\TEST.TMP goto UnitsExists
-echo *Creating directories for the snapshot (units) ... >> %FPCERRLOG%
-mkdir %FPCSNAP%\UNITS >> %FPCERRLOG%
-echo X > %FPCSNAP%\UNITS\TEST.TMP
-if exist %FPCSNAP%\UNITS\TEST.TMP goto UnitsExists
-echo *Error: Cannot create the directory %FPCSNAP%\UNITS!!
-goto End
-
-:UnitsExists
-del %FPCSNAP%\UNITS\TEST.TMP > nul
-echo X > %FPCSNAP%\UNITS\OS2\TEST.TMP
-if exist %FPCSNAP%\UNITS\OS2\TEST.TMP goto UnitsOS2Exists
-echo *Creating directories for the snapshot (units for OS/2) ... >> %FPCERRLOG%
-mkdir %FPCSNAP%\UNITS\OS2 >> %FPCERRLOG%
-echo X > %FPCSNAP%\UNITS\OS2\TEST.TMP
-if exist %FPCSNAP%\UNITS\OS2\TEST.TMP goto UnitsOS2Exists
-echo *Error: Cannot create the directory %FPCSNAP%\UNITS\OS2!!
-goto End
-
-:UnitsOS2Exists
-del %FPCSNAP%\UNITS\OS2\TEST.TMP > nul
-set FPCSNAPRTL=%FPCSNAP%\UNITS\OS2\RTL
-echo X > %FPCSNAPRTL%\TEST.TMP
-if exist %FPCSNAPRTL%\TEST.TMP goto OS2RTLExists
-echo *Creating directories for the snapshot (units for OS/2 RTL) ... >> %FPCERRLOG%
-mkdir %FPCSNAPRTL% >> %FPCERRLOG%
-echo X > %FPCSNAPRTL%\TEST.TMP
-if exist %FPCSNAPRTL%\TEST.TMP goto OS2RTLExists
-echo *Error: Cannot create the directory %FPCSNAPRTL%!!
-goto End
-
-:OS2RTLExists
-del %FPCSNAPRTL%\TEST.TMP > nul
-set FPCSNAPDOC=%FPCSNAP%\DOC
-echo X > %FPCSNAPDOC%\TEST.TMP
-if exist %FPCSNAPDOC%\TEST.TMP goto SetOpts
-echo *Creating directories for the snapshot (documentation) ... >> %FPCERRLOG%
-mkdir %FPCSNAPDOC% >> %FPCERRLOG%
-echo X > %FPCSNAPDOC%\TEST.TMP
-if exist %FPCSNAPDOC%\TEST.TMP goto SetOpts
-echo *Error: Cannot create the directory %FPCSNAPDOC%!!
-goto End
-
-:SetOpts
-
-del %FPCSNAPDOC%\TEST.TMP > nul
-
-rem Path to file with options
-set OS2OPTF=%FPCSRC%\OS2SNAP.OPT
-rem Path for the OS/2 RTL
-set OS2RTL=%FPCSRC%\RTL\OS2
-rem Path for OS/2 RTL parts compiled from common sources
-set OS2RTLC=%FPCSRC%\RTL\INC
-rem Path for OS/2 RTL parts compiled from processor dependent sources
-set OS2RTLP=%FPCSRC%\RTL\I386
-rem Path for OS/2 RTL parts for Object Pascal extensions
-set OS2RTLO=%FPCSRC%\RTL\OBJPAS
-rem Path to the compiler source
-set COMPSPATH=%FPCSRC%\COMPILER
-rem Option to skip the default configuration file
-set SKIPCFG=-n
-rem Common options for OS/2 target
-set OS2OPT1=-TOS2
-set OS2OPT2=-dGDB
-set OS2OPT3=-dI386
-set OS2OPT4=-Sg
-rem "Release" options (optimizations, strip debug symbols)
-set RELEASEOPT1=-Og2p1
-set RELEASEOPT2=-Xs
-rem "Debug" options (add debug symbols, do all code generation checks)
-set DEBUGOPT1=-g
-set DEBUGOPT2=-Crtoi
-rem "Verbose" options
-if .%VERBOSEOPT% == . set VERBOSEOPT=-va
-set DOVERBOSE=
-rem Place for debug or release options, empty by default
-set CURRENTOPT1=
-set CURRENTOPT2=
-rem Stack size for the compiler
-rem set STACKOPT=-Cs64500
-set STACKOPT=-Cs256000
-rem Path to object files
-set OS2OBJP=-Fo%OS2RTL%
-rem Path to units
-set OS2UNITP=-Fu%FPCSNAPRTL%
-rem Path to compiler units
-set COMPUNITP=-Fu%COMPSPATH%
-rem Path to compiler include files
-set COMPINCP=-Fi%COMPSPATH%
-rem Path to compiler object files
-set COMPOBJP=-Fo%COMPSPATH%
-rem Target path for RTL units
-set OS2UNITT=-FU%FPCSNAPRTL%
-rem Fake target path for executables for RTL compilation (path for PPAS)
-set OS2UNITE=-FE%FPCSNAPRTL%
-rem Target path for executables
-set OS2EXET=-FE%FPCSNAPBIN%
-rem Path to include files
-set OS2INCP=-Fi%OS2RTL%;%OS2RTLC%;%OS2RTLO%;%OS2RTLP%
-rem PPAS step disabled by default
-set FORCEPPAS=
-rem Name of the PPAS script
-set PPASNAME=PPAS.BAT
-rem Default compiler for the first compilation
-set CYCLE=0
-if not .%CYCLE% == .0 goto EnvErr
-set COMPILER=%FPCCOMPILER%
-if not .%COMPILER% == .%FPCCOMPILER% goto EnvErr
-if .%FPCCOMPILER% == . goto SetCompiler
-goto PrgFound
-:SetCompiler
-set COMPILER=PPC386.EXE
-if not .%COMPILER% == .PPC386.EXE goto EnvErr
-
-:PrgFound
-
-echo *Searching for tools ... >> %FPCERRLOG%
-
-set REALTOOLS=%FPCTOOLS%
-if %FPCTOOLS%. == . goto SetupTools
-goto ToolsOK
-
-:SetupTools
-if exist %FPCDIR%\BIN\OS2\%COMPILER% goto Tools1
-if exist %FPCDIR%\BIN\OS2\%COMPILER%.EXE goto Tools1
-goto NoTools1
-:Tools1
-if exist %FPCDIR%\BIN\OS2\AS.EXE goto Tools1OK
-echo *Warning: %COMPILER% found, but AS.EXE isn't in the same directory! >> %FPCERRLOG%
-goto NoTools1
-:Tools1OK
-set REALTOOLS=%FPCDIR%\BIN\OS2\
-goto ToolsOK
-:NoTools1
-if exist %FPCDIR%\BIN\%COMPILER% goto Tools2
-if exist %FPCDIR%\BIN\%COMPILER%.EXE goto Tools2
-goto NoTools2
-:Tools2
-if exist %FPCDIR%\BIN\AS.EXE goto Tools2OK
-echo *Warning: %COMPILER% found, but AS.EXE isn't in the same directory! >> %FPCERRLOG%
-goto NoTools2
-:Tools2OK
-set REALTOOLS=%FPCDIR%\BIN\
-goto ToolsOK
-:NoTools2
-echo *Warning: Cannot locate your %COMPILER% and AS.EXE, make sure they're on PATH! >> %FPCERRLOG%
-
-:ToolsOK
-
-echo *Checking parameters >> %FPCERRLOG%
-set PARAMS=%1
-if .%PARAMS% == . set PARAMS=snapshot
-if not %@EVAL[0] == 0 goto ParLoop
-set PARAMS=%@LOWER[%PARAMS%]
-:ParLoop
-shift
-if %1. == . goto NoPars
-if %@EVAL[0] == 0 goto Shl1
-if %1 == debug set CURRENTOPT1=%DEBUGOPT1%
-if %1 == debug set CURRENTOPT2=%DEBUGOPT2%
-if %1 == release set CURRENTOPT1=%RELEASEOPT1%
-if %1 == release set CURRENTOPT2=%RELEASEOPT2%
-if %1 == verbose set DOVERBOSE=1
-if %1 == ppas set FORCEPPAS=1
-goto ParLoop
-:Shl1
-if %@LOWER[%1] == debug set CURRENTOPT1=%DEBUGOPT1%
-if %@LOWER[%1] == debug set CURRENTOPT2=%DEBUGOPT2%
-if %@LOWER[%1] == release set CURRENTOPT1=%RELEASEOPT1%
-if %@LOWER[%1] == release set CURRENTOPT2=%RELEASEOPT2%
-if %@LOWER[%1] == verbose set DOVERBOSE=1
-if %@LOWER[%1] == ppas set FORCEPPAS=1
-goto ParLoop
-:NoPars
-if %PARAMS% == clean goto CleanRTL
-if %PARAMS% == both goto CleanRTL
-if %PARAMS% == snapshot goto CleanRTL
-if %PARAMS% == rtl goto CleanRTL
-if %PARAMS% == cycle goto CleanRTL
-if %PARAMS% == compiler goto CleanCompiler
-echo *Error: Unknown parameter - %PARAMS% >> %FPCERRLOG%
-goto End
-
-:CleanRTL
-if %@EVAL[0] == 0 goto JPCleanRTL
-echo *Cleaning up the RTL (error messages are OK here) ... >> %FPCERRLOG%
-del %OS2OPTF% >> %FPCERRLOG%
-del %OS2RTL%\*.ppo >> %FPCERRLOG%
-del %OS2RTL%\*.oo2 >> %FPCERRLOG%
-del %OS2RTL%\ppas.bat >> %FPCERRLOG%
-del %OS2RTL%\ppas.cmd >> %FPCERRLOG%
-del %OS2RTL%\link.res >> %FPCERRLOG%
-del %FPCSNAPRTL%\*.ppo >> %FPCERRLOG%
-del %FPCSNAPRTL%\*.oo2 >> %FPCERRLOG%
-del %FPCSNAPRTL%\ppas.bat >> %FPCERRLOG%
-del %FPCSNAPRTL%\ppas.cmd >> %FPCERRLOG%
-del %FPCSNAPRTL%\link.res >> %FPCERRLOG%
-goto ContClRTL
-:JPCleanRTL
-echo *Cleaning up the RTL ... >> %FPCERRLOG%
-del %OS2OPTF% >& nul >> %FPCERRLOG%
-del %OS2RTL%\*.ppo >& nul >> %FPCERRLOG%
-del %OS2RTL%\*.oo2 >& nul >> %FPCERRLOG%
-del %OS2RTL%\ppas.bat >& nul >> %FPCERRLOG%
-del %OS2RTL%\ppas.cmd >& nul >> %FPCERRLOG%
-del %OS2RTL%\link.res >& nul >> %FPCERRLOG%
-del %FPCSNAPRTL%\*.ppo >& nul >> %FPCERRLOG%
-del %FPCSNAPRTL%\*.oo2 >& nul >> %FPCERRLOG%
-del %FPCSNAPRTL%\ppas.bat >& nul >> %FPCERRLOG%
-del %FPCSNAPRTL%\ppas.cmd >& nul >> %FPCERRLOG%
-del %FPCSNAPRTL%\link.res >& nul >> %FPCERRLOG%
-:ContClRTL
-if %PARAMS% == rtl goto Branches
-:CleanCompiler
-if %@EVAL[0] == 0 goto JPCleanComp
-echo *Cleaning up the compiler (error messages are OK here) ... >> %FPCERRLOG%
-del %OS2OPTF% >> %FPCERRLOG%
-del %COMPSPATH%\*.ppo >> %FPCERRLOG%
-del %COMPSPATH%\*.oo2 >> %FPCERRLOG%
-del %COMPSPATH%\pp >> %FPCERRLOG%
-del %COMPSPATH%\pp.exe >> %FPCERRLOG%
-del %COMPSPATH%\ppos2.exe >> %FPCERRLOG%
-del %COMPSPATH%\ppas.bat >> %FPCERRLOG%
-del %COMPSPATH%\ppas.cmd >> %FPCERRLOG%
-del %COMPSPATH%\link.res >> %FPCERRLOG%
-del %FPCSNAPBIN%\*.ppo >> %FPCERRLOG%
-del %FPCSNAPBIN%\*.oo2 >> %FPCERRLOG%
-del %FPCSNAPBIN%\pp >> %FPCERRLOG%
-del %FPCSNAPBIN%\pp.exe >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppos2.exe >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppas.bat >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppas.cmd >> %FPCERRLOG%
-del %FPCSNAPBIN%\link.res >> %FPCERRLOG%
-goto ContClComp
-:JPCleanComp
-echo *Cleaning up the compiler ... >> %FPCERRLOG%
-del %OS2OPTF% >& nul >> %FPCERRLOG%
-del %COMPSPATH%\*.ppo >& nul >> %FPCERRLOG%
-del %COMPSPATH%\*.oo2 >& nul >> %FPCERRLOG%
-del %COMPSPATH%\pp >& nul >> %FPCERRLOG%
-del %COMPSPATH%\pp.exe >& nul >> %FPCERRLOG%
-del %COMPSPATH%\ppos2.exe >& nul >> %FPCERRLOG%
-del %COMPSPATH%\ppas.bat >& nul >> %FPCERRLOG%
-del %COMPSPATH%\ppas.cmd >& nul >> %FPCERRLOG%
-del %COMPSPATH%\link.res >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\*.ppo >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\*.oo2 >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\pp >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\pp.exe >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppos2.exe >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppas.bat >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppas.cmd >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\link.res >& nul >> %FPCERRLOG%
-:ContClComp
-if %PARAMS% == compiler goto Branches
-if %PARAMS% == both goto Branches
-:CleanSnapshot
-if %@EVAL[0] == 0 goto JPCleanSnap
-echo *Deleting the old snapshot (error messages are OK here) ... >> %FPCERRLOG%
-del %FPCSNAPDOC%\*.txt >> %FPCERRLOG%
-del %FPCSNAPDOC%\*.htm* >> %FPCERRLOG%
-del %FPCSNAPDOC%\copying.* >> %FPCERRLOG%
-del %FPCSNAPMSG%\*.msg >> %FPCERRLOG%
-del %FPCSNAP%\baseemx.zip >> %FPCERRLOG%
-goto ContClSnap
-:JPCleanSnap
-echo *Deleting the old snapshot ... >> %FPCERRLOG%
-del %FPCSNAP%\baseemx.zip >& nul >> %FPCERRLOG%
-del %FPCSNAPDOC%\*.txt >& nul >> %FPCERRLOG%
-del %FPCSNAPDOC%\*.htm* >& nul >> %FPCERRLOG%
-del %FPCSNAPDOC%\copying.* >& nul >> %FPCERRLOG%
-del %FPCSNAPMSG%\*.msg >& nul >> %FPCERRLOG%
-:ContClSnap
-if %PARAMS% == clean goto End
-
-:Branches
-if %PARAMS% == both goto RTL1
-if %PARAMS% == snapshot goto RTL1
-if %PARAMS% == compiler goto Compiler
-if %PARAMS% == rtl goto RTL1
-if %PARAMS% == cycle goto RTL1
-echo *Error: Unknown parameter - %PARAMS% >> %FPCERRLOG%
-goto End
-
-:RTL1
-echo *Creating file with all the needed options and paths for RTL ... >> %FPCERRLOG%
-echo %SKIPCFG% > %OS2OPTF%
-echo %OS2OPT1% >> %OS2OPTF%
-echo %OS2OPT2% >> %OS2OPTF%
-echo %OS2OPT3% >> %OS2OPTF%
-echo %OS2OPT4% >> %OS2OPTF%
-echo %OS2OBJP% >> %OS2OPTF%
-echo %OS2UNITP% >> %OS2OPTF%
-echo %OS2INCP% >> %OS2OPTF%
-echo %OS2UNITT% >> %OS2OPTF%
-echo %OS2UNITE% >> %OS2OPTF%
-echo -FD%REALTOOLS% >> %OS2OPTF%
-if not .%CURRENTOPT1% == . echo %CURRENTOPT1% >> %OS2OPTF%
-if not .%CURRENTOPT2% == . echo %CURRENTOPT2% >> %OS2OPTF%
-if not .%FPCLOG% == . echo -Fe%FPCERRLOG% >> %OS2OPTF%
-if not .%FORCEPPAS% == . echo -a >> %OS2OPTF%
-if not .%FORCEPPAS% == . echo -s >> %OS2OPTF%
-if .%DOVERBOSE% == .1 echo %VERBOSEOPT% >> %OS2OPTF%
-if not .%DOVERBOSE% == .1 goto CompS1
-echo *Start of basic options used for compilation >> %FPCERRLOG%
-type %OS2OPTF% >> %FPCERRLOG%
-echo *End of basic options used for compilation >> %FPCERRLOG%
-if not .%OTHEROPTS% == . echo *User specified options: %OTHEROPTS% >> %FPCERRLOG%
-:CompS1
-echo *Assembling the helpers ... >> %FPCERRLOG%
-%REALTOOLS%\as -o %FPCSNAPRTL%\prt0.oo2 %OS2RTL%\prt0.as >> %FPCERRLOG%
-%REALTOOLS%\as -o %FPCSNAPRTL%\prt1.oo2 %OS2RTL%\prt1.as >> %FPCERRLOG%
-%REALTOOLS%\as -o %FPCSNAPRTL%\code2.oo2 %OS2RTL%\code2.as >> %FPCERRLOG%
-%REALTOOLS%\as -o %FPCSNAPRTL%\code3.oo2 %OS2RTL%\code3.as >> %FPCERRLOG%
-echo *Compiling the system unit ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% -Us %OTHEROPTS% %OS2RTL%\SYSOS2.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit ObjPas ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLO%\OBJPAS.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit Objects ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\OBJECTS.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit Strings ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\STRINGS.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit HeapTrace ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\HEAPTRC.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit DosCalls ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\DOSCALLS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit DOS ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\DOS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit CPU ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLP%\CPU.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit MMX ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLP%\MMX.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit SysUtils ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLO%\SYSUTILS.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit TypInfo ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLO%\TYPINFO.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit CRT ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\CRT.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit Printer ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PRINTER.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit Math ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLO%\MATH.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit UComplex ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\UCOMPLEX.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit GetOpts ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\GETOPTS.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit LineInfo ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\LINEINFO.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit KbdCalls ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\KBDCALLS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit MouCalls ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\MOUCALLS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit VioCalls ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\VIOCALLS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit MonCalls ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\MONCALLS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit Ports ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PORTS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling PM units ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\OS2DEF.PAS
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PMWIN.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PMBITMAP.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PMGPI.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling MMOS2 units ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\DIVE.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 echo * Deleting the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 del %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-
-if %PARAMS% == rtl goto End
-
-:Compiler
-echo *Creating file with all the needed options and paths for the compiler ... >> %FPCERRLOG%
-echo %SKIPCFG% > %OS2OPTF%
-echo %OS2OPT1% >> %OS2OPTF%
-echo %OS2OPT2% >> %OS2OPTF%
-echo %OS2OPT3% >> %OS2OPTF%
-echo %OS2OPT4% >> %OS2OPTF%
-echo %OS2OBJP% >> %OS2OPTF%
-echo %OS2UNITP% >> %OS2OPTF%
-echo -FD%REALTOOLS% >> %OS2OPTF%
-echo %COMPUNITP% >> %OS2OPTF%
-echo %COMPINCP% >> %OS2OPTF%
-echo %COMPOBJP% >> %OS2OPTF%
-echo %STACKOPT% >> %OS2OPTF%
-echo %OS2EXET% >> %OS2OPTF%
-if not .%CURRENTOPT1% == . echo %CURRENTOPT1% >> %OS2OPTF%
-if not .%CURRENTOPT2% == . echo %CURRENTOPT2% >> %OS2OPTF%
-if not .%FPCLOG% == . echo -Fe%FPCERRLOG% >> %OS2OPTF%
-if not .%FORCEPPAS% == . echo -a >> %OS2OPTF%
-if not .%FORCEPPAS% == . echo -s >> %OS2OPTF%
-if .%DOVERBOSE% == .1 echo %VERBOSEOPT% >> %OS2OPTF%
-if not .%DOVERBOSE% == .1 goto CompS2
-echo *Start of basic options used for compilation >> %FPCERRLOG%
-type %OS2OPTF% >> %FPCERRLOG%
-echo *End of basic options used for compilation >> %FPCERRLOG%
-if not .%OTHEROPTS% == . echo *User specified options: %OTHEROPTS% >> %FPCERRLOG%
-:CompS2
-echo *Compiling the compiler ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %COMPSPATH%\PP.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPBIN%\%PPASNAME% >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 echo * Deleting the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 del %FPCSNAPBIN%\%PPASNAME% >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 del %FPCSNAPBIN%\link.res >> %FPCERRLOG%
-:Comp2
-ren %FPCSNAPBIN%\pp.exe ppos2.exe >> %FPCERRLOG%
-if exist %FPCSNAPBIN%\ppos2.exe goto OKCompiler
-if not exist %FPCSNAPBIN%\pp goto C2Cont
-if exist %FPCSNAPBIN%\ppas.bat goto PPasBat
-if exist %FPCSNAPBIN%\ppas.cmd goto PPasCmd
-:C2Cont
-echo *Error: The compiler wasn't compiled!! >> %FPCERRLOG%
-goto End
-
-:PPasCmd
-ren %FPCSNAPBIN%\ppas.cmd ppas.bat >> %FPCERRLOG%
-
-:PPasBat
-echo *Automatic binding failed, trying again ... >> %FPCERRLOG%
-call %FPCSNAPBIN%\ppas.bat
-del %FPCSNAPBIN%\ppas.bat >> %FPCERRLOG%
-goto Comp2
-
-:OKCompiler
-if %PARAMS% == compiler goto End
-if %PARAMS% == both goto End
-if %PARAMS% == cycle goto Cycle
-goto CopyFiles
-
-:Cycle
-
-rem Another loop?
-if %CYCLE% == 2 goto CopyFiles
-echo *Backing up previous compiler version to ppos2.%CYCLE% ... >> %FPCERRLOG%
-copy %REALTOOLS%ppos2.exe %REALTOOLS%ppos2.%CYCLE% >> %FPCERRLOG%
-echo *Copying the newly created compiler to %REALTOOLS% ... >> %FPCERRLOG%
-copy %FPCSNAPBIN%\ppos2.exe %REALTOOLS%. >> %FPCERRLOG%
-if %CYCLE% == 1 goto Cycle2
-set COMPILER=PPOS2.EXE
-set CYCLE=1
-goto NoPars
-
-:Cycle2
-set CYCLE=2
-goto NoPars
-
-:CopyFiles
-set FPCSNAPTXT=%FPCSNAPDOC%\snapshot.txt
-echo *Copying the documentation ... >> %FPCERRLOG%
-copy %FPCSRC%\INSTALL\DOC\*.txt %FPCSNAPDOC% >> %FPCERRLOG%
-copy %FPCSRC%\INSTALL\DOC\*.htm* %FPCSNAPDOC% >> %FPCERRLOG%
-copy %FPCSRC%\INSTALL\DOC\copying.* %FPCSNAPDOC% >> %FPCERRLOG%
-echo *Creating the snapshot readme file ... >> %FPCERRLOG%
-echo This is a FPC snapshot for OS/2. It contains compilation of the most current >> %FPCSNAPTXT%
-echo developers' sources as of time of its creation. It contains the latest fixes >> %FPCSNAPTXT%
-echo but might contain some new bugs as well, since it's less tested than regular >> %FPCSNAPTXT%
-echo releases. Please, send your error reports to [email protected] >> %FPCSNAPTXT%
-echo mailing list (and don't forget to mention the fact you're not subscribed to >> %FPCSNAPTXT%
-echo the list in your e-mail, if it's the case). >> %FPCSNAPTXT%
-echo The snapshot has the same structure as the release ZIP files, so it may be >> %FPCSNAPTXT%
-echo installed using the normal installer (INSTALL.EXE and INSTALL.DAT must be >> %FPCSNAPTXT%
-echo in the same directory) or directly unzipped into your FPC tree. >> %FPCSNAPTXT%
-echo *Copying the message files ... >> %FPCERRLOG%
-copy %COMPSPATH%\*.msg %FPCSNAPMSG% >> %FPCERRLOG%
-
-if %@EVAL[0] == 0 goto Pack
-echo *Warning: Packing in this environment might fail. >> %FPCERRLOG%
-echo *You should press Ctrl-Break now if the current drive is different from that >> %FPCERRLOG%
-echo *of %FPCSNAP%; otherwise press any key to continue. >> %FPCERRLOG%
-if not %FPCERRLOG% == CON echo *Warning: Packing in this environment might fail.
-if not %FPCERRLOG% == CON echo *You should press Ctrl-Break now if the current drive is different from that
-if not %FPCERRLOG% == CON echo *of %FPCDIR%; otherwise press any key to continue.
-pause>nul
-cd %FPCSNAP%
-
-:Pack
-echo *Packing the snapshot ... >> %FPCERRLOG%
-if %@EVAL[0] == 0 goto SHL2
-goto Cmd2
-:Shl2
-pushd
-cdd %FPCSNAP%
-:Cmd2
-
-rem ZIP.EXE must be on the PATH
-zip -9 -r baseemx.zip bin\os2\ppos2.exe doc\*.* msg\*.* units\os2\rtl\*.ppo units\os2\rtl\*.oo2 units\os2\rtl\*.ao2 >> %FPCERRLOG%
-if exist baseemx.zip goto ZipOK
-echo *Error: The ZIP file hasn't been created!! >> %FPCERRLOG%
-:ZipOK
-if %@EVAL[0] == 0 popd
-
-echo *Done. >> %FPCERRLOG%
-
-goto End
-
-:ErrorDir
-echo *Error: Environment variable FPCDIR must point to your base FPC directory!!! >> %FPCERRLOG%
-goto End
-
-:EnvErr
-echo *Error: Not enough environment space!!! >> %FPCERRLOG%
-goto End
-
-
-  $Log$
-  Revision 1.1  2000-07-13 06:31:26  michael
-  + Initial import
-
-  Revision 1.18  2000/06/26 17:31:12  hajny
-    * workaround for MS command shell limitation
-
-  Revision 1.17  2000/05/21 16:09:42  hajny
-    * os2def.pas added
-
-  Revision 1.16  2000/05/14 16:46:09  hajny
-    * cmd.exe compatibility problem fixed
-
-  Revision 1.15  2000/04/03 17:42:46  hajny
-    + LineInfo added
-
-  Revision 1.14  2000/03/28 19:30:49  hajny
-    * another change of order
-
-  Revision 1.13  2000/03/16 19:43:36  hajny
-    * fix for COMMAND.COM, order, etc.
-
-  Revision 1.12  2000/03/12 18:29:40  hajny
-    * wrong order corrected
-
-  Revision 1.11  2000/03/12 13:37:24  hajny
-    * support for calling PPAS script, compiler stack increased
-
-  Revision 1.10  2000/03/06 17:38:39  hajny
-    * little omission (ZIP parameters)
-
-  Revision 1.9  2000/03/05 19:13:25  hajny
-    * new snapshot structure
-
-  Revision 1.8  2000/01/29 16:24:01  hajny
-    * logging enhanced, verbose support, error for non-4dos fixed
-
-  Revision 1.7  2000/01/26 22:34:36  hajny
-    * support for error logging added
-
-  Revision 1.6  2000/01/16 18:44:21  hajny
-    * got rid of PPC386.CFG dependency
-
-  Revision 1.3  1999/10/01 09:00:21  hajny
-    + PMGPI and DIVE added
-
-  Revision 1.2  1999/09/15 07:31:49  hajny
-    + some units added, OTHEROPTS variable support
-
-
-
-:End

+ 0 - 712
base/os2snap.cmd

@@ -1,712 +0,0 @@
-@echo off
-
-rem ***  $Id$
-
-rem *** Batch file for creating of FPC snapshot for OS/2.
-rem *** FPCDIR variable must be set to your base FPC directory and
-rem *** must _not_ contain forward slashes (only backslashes allowed).
-rem *** Your compiler (PPOS2.EXE per default) and AS.EXE must be somewhere
-rem *** on PATH (unless you set path to them explicitly using FPCTOOLS
-rem *** variable, which must end with \ if present). However, be sure which
-rem *** version of AS.EXE, etc. gets called if several such files exist.
-rem *** One of the following parameters may be specified: rtl, compiler,
-rem *** both, cycle and snapshot ("snapshot" being the default), optionally
-rem *** followed by parameters "debug" (causing debugging symbols not to be
-rem *** stripped from the created compiler), "release" (code optimization,
-rem *** debug info stripped out), and "verbose" (compiler messages are
-rem *** shown; the same can be accomplished with setting environment
-rem *** variable DOVERBOSE to 1). Parameters "debug" and "release" are
-rem *** mutually exclusive (the later one is used if both are present).
-rem *** Parameter "ppas" forces only PPAS script to be created
-rem *** by the compiler and called manually afterwards. This might help
-rem *** to resolve LD crashes due to low stack (e.g. under WinXX).
-rem *** Parameters _must_ be in lowercase to be recognized correctly,
-rem *** unless running under 4os2 or compatible.
-rem *** Meaning of parameters:
-rem ***  rtl .......... RTL only, _no_ snapshot created
-rem ***  compiler ..... compiler only, _no_ snapshot created
-rem ***  both ......... both RTL and compiler, _no_ snapshot created
-rem ***  snapshot ..... both RTL and compiler, snapshot _is_ created
-rem ***  cycle ........ RTL and compiler compiled, the resulting compiler
-rem ***                 is then copied to %FPCTOOLS% (BIN\OS2 by default)
-rem ***                 backing up possible previous version to ppos2.x),
-rem ***                 the whole procedure is started again (RTL is compiled
-rem ***                 with the new compiler version this time) and after
-rem ***                 another cycle (to make sure the new compiler works
-rem ***                 correctly) the snapshot is finally created
-rem *** PPOS2.EXE is used for the compilation, unless a different compiler name
-rem *** is specified in FPCCOMPILER variable. In any case, the compiler should
-rem *** reside in the same directory as the other required tools (AS.EXE,
-rem *** LD.EXE, etc.).
-rem *** Environment variable OTHEROPTS may be used to specify additional
-rem *** switches (e.g. setting level of verbosity, etc.).
-rem *** Environment variable FPCLOG can specify a file for error logging
-rem *** (full path needed). Please, note, that the previous contents of
-rem *** file will be overwritten each time the batch file is run.
-rem *** Environment variable VERBOSEOPT may be used to specify level of
-rem *** verbosity used with "verbose" parameter (-va by default, i.e. show
-rem *** everything). Another way would be specifying this in OTHEROPTS
-rem *** variable (see above) and not using "verbose" at all.
-rem *** Environment variable FPCSNAPPATH may be used to specify path, where
-rem *** the compiled files should be placed and possibly the ZIP file
-rem *** created.
-
-set FPCERRLOG=%FPCLOG%
-if .%FPCERRLOG% == . set FPCERRLOG=CON
-
-echo *"Makefile" for OS/2: > %FPCERRLOG%
-
-echo *Setting up environment ... >> %FPCERRLOG%
-
-rem Check whether FPCDIR exists
-if .%FPCDIR% == . goto ErrorDir
-if exist %FPCDIR% goto DirOK
-if exist %FPCDIR%\. goto DirOK
-if exist %FPCDIR%\makefile goto DirOK
-if exist %FPCDIR%\COMPILER\pp.pas goto DirOK
-if exist %FPCDIR%\SOURCE\makefile goto DirOK
-if exist %FPCDIR%\SOURCE\COMPILER\pp.pas goto DirOK
-goto ErrorDir
-
-:DirOK
-
-rem Set path to the source files
-if exist %FPCDIR%\SOURCE goto SrcExists
-if exist %FPCDIR%\SOURCE\. goto SrcExists
-if exist %FPCDIR%\SOURCE\makefile goto SrcExists
-if exist %FPCDIR%\SOURCE\COMPILER\pp.pas goto SrcExists
-set FPCSRC=%FPCDIR%
-goto SnapDir
-
-:SrcExists
-set FPCSRC=%FPCDIR%\SOURCE
-
-:SnapDir
-set FPCSNAP=%FPCSNAPPATH%
-if .%FPCSNAP% == . set FPCSNAP=%FPCSRC%\SNAPSHOT
-if exist %FPCSNAP% goto SnapExists
-echo *Creating directories for the snapshot ... >> %FPCERRLOG%
-mkdir %FPCSNAP% >> %FPCERRLOG%
-if exist %FPCSNAP% goto SnapExists
-echo *Error: Cannot create the directory %FPCSNAP%!!
-goto End
-
-:SnapExists
-if exist %FPCSNAP%\BIN goto BinExists
-echo *Creating directories for the snapshot (binaries) ... >> %FPCERRLOG%
-mkdir %FPCSNAP%\BIN >> %FPCERRLOG%
-if exist %FPCSNAP%\BIN goto BinExists
-echo *Error: Cannot create the directory %FPCSNAP%\BIN!!
-goto End
-
-:BinExists
-set FPCSNAPBIN=%FPCSNAP%\BIN\OS2
-if exist %FPCSNAPBIN% goto BinOS2Exists
-echo *Creating directories for the snapshot (binaries for OS/2) ... >> %FPCERRLOG%
-mkdir %FPCSNAPBIN% >> %FPCERRLOG%
-if exist %FPCSNAPBIN% goto BinOS2Exists
-echo *Error: Cannot create the directory %FPCSNAPBIN%!!
-goto End
-
-:BinOS2Exists
-set FPCSNAPMSG=%FPCSNAP%\MSG
-if exist %FPCSNAPMSG% goto MsgExists
-echo *Creating directories for the snapshot (messages) ... >> %FPCERRLOG%
-mkdir %FPCSNAPMSG% >> %FPCERRLOG%
-if exist %FPCSNAPMSG% goto MsgExists
-echo *Error: Cannot create the directory %FPCSNAPMSG%!!
-goto End
-
-:MsgExists
-if exist %FPCSNAP%\UNITS goto UnitsExists
-echo *Creating directories for the snapshot (units) ... >> %FPCERRLOG%
-mkdir %FPCSNAP%\UNITS >> %FPCERRLOG%
-if exist %FPCSNAP%\UNITS goto UnitsExists
-echo *Error: Cannot create the directory %FPCSNAP%\UNITS!!
-goto End
-
-:UnitsExists
-if exist %FPCSNAP%\UNITS\OS2 goto UnitsOS2Exists
-echo *Creating directories for the snapshot (units for OS/2) ... >> %FPCERRLOG%
-mkdir %FPCSNAP%\UNITS\OS2 >> %FPCERRLOG%
-if exist %FPCSNAP%\UNITS\OS2 goto UnitsOS2Exists
-echo *Error: Cannot create the directory %FPCSNAP%\UNITS\OS2!!
-goto End
-
-:UnitsOS2Exists
-set FPCSNAPRTL=%FPCSNAP%\UNITS\OS2\RTL
-if exist %FPCSNAPRTL% goto OS2RTLExists
-echo *Creating directories for the snapshot (units for OS/2 RTL) ... >> %FPCERRLOG%
-mkdir %FPCSNAPRTL% >> %FPCERRLOG%
-if exist %FPCSNAPRTL% goto OS2RTLExists
-echo *Error: Cannot create the directory %FPCSNAPRTL%!!
-goto End
-
-:OS2RTLExists
-set FPCSNAPDOC=%FPCSNAP%\DOC
-if exist %FPCSNAPDOC% goto SetOpts
-echo *Creating directories for the snapshot (documentation) ... >> %FPCERRLOG%
-mkdir %FPCSNAPDOC% >> %FPCERRLOG%
-if exist %FPCSNAPDOC% goto SetOpts
-echo *Error: Cannot create the directory %FPCSNAPDOC%!!
-goto End
-
-:SetOpts
-
-rem Path to file with options
-set OS2OPTF=%FPCSRC%\OS2SNAP.OPT
-rem Path for the OS/2 RTL
-set OS2RTL=%FPCSRC%\RTL\OS2
-rem Path for OS/2 RTL parts compiled from common sources
-set OS2RTLC=%FPCSRC%\RTL\INC
-rem Path for OS/2 RTL parts compiled from processor dependent sources
-set OS2RTLP=%FPCSRC%\RTL\I386
-rem Path for OS/2 RTL parts for Object Pascal extensions
-set OS2RTLO=%FPCSRC%\RTL\OBJPAS
-rem Path to the compiler source
-set COMPSPATH=%FPCSRC%\COMPILER
-rem Option to skip the default configuration file
-set SKIPCFG=-n
-rem Common options for OS/2 target
-set OS2OPT1=-TOS2
-set OS2OPT2=-dGDB
-set OS2OPT3=-dI386
-set OS2OPT4=-Sg
-rem "Release" options (optimizations, strip debug symbols)
-set RELEASEOPT1=-Og2p1
-set RELEASEOPT2=-Xs
-rem "Debug" options (add debug symbols, do all code generation checks)
-set DEBUGOPT1=-g
-set DEBUGOPT2=-Crtoi
-rem "Verbose" options
-if .%VERBOSEOPT% == . set VERBOSEOPT=-va
-set DOVERBOSE=
-rem Place for debug or release options, empty by default
-set CURRENTOPT1=
-set CURRENTOPT2=
-rem Stack size for the compiler
-rem set STACKOPT=-Cs64500
-set STACKOPT=-Cs256000
-rem Path to object files
-set OS2OBJP=-Fo%OS2RTL%
-rem Path to units
-set OS2UNITP=-Fu%FPCSNAPRTL%
-rem Path to compiler units
-set COMPUNITP=-Fu%COMPSPATH%
-rem Path to compiler include files
-set COMPINCP=-Fi%COMPSPATH%
-rem Path to compiler object files
-set COMPOBJP=-Fo%COMPSPATH%
-rem Target path for RTL units
-set OS2UNITT=-FU%FPCSNAPRTL%
-rem Fake target path for executables for RTL compilation (path for PPAS)
-set OS2UNITE=-FE%FPCSNAPRTL%
-rem Target path for executables
-set OS2EXET=-FE%FPCSNAPBIN%
-rem Path to include files
-set OS2INCP=-Fi%OS2RTL%;%OS2RTLC%;%OS2RTLO%;%OS2RTLP%
-rem PPAS step disabled by default
-set FORCEPPAS=
-rem Name of the PPAS script
-set PPASNAME=PPAS.CMD
-rem Default compiler for the first compilation
-set CYCLE=0
-set COMPILER=%FPCCOMPILER%
-if .%FPCCOMPILER% == . goto SetCompiler
-goto PrgFound
-:SetCompiler
-set COMPILER=PPOS2.EXE
-
-:PrgFound
-
-echo *Searching for tools ... >> %FPCERRLOG%
-
-set REALTOOLS=%FPCTOOLS%
-if %FPCTOOLS%. == . goto SetupTools
-goto ToolsOK
-
-:SetupTools
-if exist %FPCDIR%\BIN\OS2\%COMPILER% goto Tools1
-if exist %FPCDIR%\BIN\OS2\%COMPILER%.EXE goto Tools1
-goto NoTools1
-:Tools1
-if exist %FPCDIR%\BIN\OS2\AS.EXE goto Tools1OK
-echo *Warning: %COMPILER% found, but AS.EXE isn't in the same directory! >> %FPCERRLOG%
-goto NoTools1
-:Tools1OK
-set REALTOOLS=%FPCDIR%\BIN\OS2\
-goto ToolsOK
-:NoTools1
-if exist %FPCDIR%\BIN\%COMPILER% goto Tools2
-if exist %FPCDIR%\BIN\%COMPILER%.EXE goto Tools2
-goto NoTools2
-:Tools2
-if exist %FPCDIR%\BIN\AS.EXE goto Tools2OK
-echo *Warning: %COMPILER% found, but AS.EXE isn't in the same directory! >> %FPCERRLOG%
-goto NoTools2
-:Tools2OK
-set REALTOOLS=%FPCDIR%\BIN\
-goto ToolsOK
-:NoTools2
-echo *Warning: Cannot locate your %COMPILER% and AS.EXE, make sure they're on PATH! >> %FPCERRLOG%
-
-:ToolsOK
-
-echo *Checking parameters >> %FPCERRLOG%
-set PARAMS=%1
-if .%PARAMS% == . set PARAMS=snapshot
-if not %@EVAL[0] == 0 goto ParLoop
-set PARAMS=%@LOWER[%PARAMS%]
-:ParLoop
-shift
-if %1. == . goto NoPars
-if %@EVAL[0] == 0 goto Shl1
-if %1 == debug set CURRENTOPT1=%DEBUGOPT1%
-if %1 == debug set CURRENTOPT2=%DEBUGOPT2%
-if %1 == release set CURRENTOPT1=%RELEASEOPT1%
-if %1 == release set CURRENTOPT2=%RELEASEOPT2%
-if %1 == verbose set DOVERBOSE=1
-if %1 == ppas set FORCEPPAS=1
-goto ParLoop
-:Shl1
-if %@LOWER[%1] == debug set CURRENTOPT1=%DEBUGOPT1%
-if %@LOWER[%1] == debug set CURRENTOPT2=%DEBUGOPT2%
-if %@LOWER[%1] == release set CURRENTOPT1=%RELEASEOPT1%
-if %@LOWER[%1] == release set CURRENTOPT2=%RELEASEOPT2%
-if %@LOWER[%1] == verbose set DOVERBOSE=1
-if %@LOWER[%1] == ppas set FORCEPPAS=1
-goto ParLoop
-:NoPars
-if %PARAMS% == clean goto CleanRTL
-if %PARAMS% == both goto CleanRTL
-if %PARAMS% == snapshot goto CleanRTL
-if %PARAMS% == rtl goto CleanRTL
-if %PARAMS% == cycle goto CleanRTL
-if %PARAMS% == compiler goto CleanCompiler
-echo *Error: Unknown parameter - %PARAMS% >> %FPCERRLOG%
-goto End
-
-:CleanRTL
-if %@EVAL[0] == 0 goto JPCleanRTL
-echo *Cleaning up the RTL (error messages are OK here) ... >> %FPCERRLOG%
-del %OS2OPTF% >> %FPCERRLOG%
-del %OS2RTL%\*.ppo >> %FPCERRLOG%
-del %OS2RTL%\*.oo2 >> %FPCERRLOG%
-del %OS2RTL%\ppas.bat >> %FPCERRLOG%
-del %OS2RTL%\ppas.cmd >> %FPCERRLOG%
-del %OS2RTL%\link.res >> %FPCERRLOG%
-del %FPCSNAPRTL%\*.ppo >> %FPCERRLOG%
-del %FPCSNAPRTL%\*.oo2 >> %FPCERRLOG%
-del %FPCSNAPRTL%\ppas.bat >> %FPCERRLOG%
-del %FPCSNAPRTL%\ppas.cmd >> %FPCERRLOG%
-del %FPCSNAPRTL%\link.res >> %FPCERRLOG%
-goto ContClRTL
-:JPCleanRTL
-echo *Cleaning up the RTL ... >> %FPCERRLOG%
-del %OS2OPTF% >& nul >> %FPCERRLOG%
-del %OS2RTL%\*.ppo >& nul >> %FPCERRLOG%
-del %OS2RTL%\*.oo2 >& nul >> %FPCERRLOG%
-del %OS2RTL%\ppas.bat >& nul >> %FPCERRLOG%
-del %OS2RTL%\ppas.cmd >& nul >> %FPCERRLOG%
-del %OS2RTL%\link.res >& nul >> %FPCERRLOG%
-del %FPCSNAPRTL%\*.ppo >& nul >> %FPCERRLOG%
-del %FPCSNAPRTL%\*.oo2 >& nul >> %FPCERRLOG%
-del %FPCSNAPRTL%\ppas.bat >& nul >> %FPCERRLOG%
-del %FPCSNAPRTL%\ppas.cmd >& nul >> %FPCERRLOG%
-del %FPCSNAPRTL%\link.res >& nul >> %FPCERRLOG%
-:ContClRTL
-if %PARAMS% == rtl goto Branches
-:CleanCompiler
-if %@EVAL[0] == 0 goto JPCleanComp
-echo *Cleaning up the compiler (error messages are OK here) ... >> %FPCERRLOG%
-del %OS2OPTF% >> %FPCERRLOG%
-del %COMPSPATH%\*.ppo >> %FPCERRLOG%
-del %COMPSPATH%\*.oo2 >> %FPCERRLOG%
-del %COMPSPATH%\pp >> %FPCERRLOG%
-del %COMPSPATH%\pp.exe >> %FPCERRLOG%
-del %COMPSPATH%\ppos2.exe >> %FPCERRLOG%
-del %COMPSPATH%\ppas.bat >> %FPCERRLOG%
-del %COMPSPATH%\ppas.cmd >> %FPCERRLOG%
-del %COMPSPATH%\link.res >> %FPCERRLOG%
-del %FPCSNAPBIN%\*.ppo >> %FPCERRLOG%
-del %FPCSNAPBIN%\*.oo2 >> %FPCERRLOG%
-del %FPCSNAPBIN%\pp >> %FPCERRLOG%
-del %FPCSNAPBIN%\pp.exe >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppos2.exe >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppas.bat >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppas.cmd >> %FPCERRLOG%
-del %FPCSNAPBIN%\link.res >> %FPCERRLOG%
-goto ContClComp
-:JPCleanComp
-echo *Cleaning up the compiler ... >> %FPCERRLOG%
-del %OS2OPTF% >& nul >> %FPCERRLOG%
-del %COMPSPATH%\*.ppo >& nul >> %FPCERRLOG%
-del %COMPSPATH%\*.oo2 >& nul >> %FPCERRLOG%
-del %COMPSPATH%\pp >& nul >> %FPCERRLOG%
-del %COMPSPATH%\pp.exe >& nul >> %FPCERRLOG%
-del %COMPSPATH%\ppos2.exe >& nul >> %FPCERRLOG%
-del %COMPSPATH%\ppas.bat >& nul >> %FPCERRLOG%
-del %COMPSPATH%\ppas.cmd >& nul >> %FPCERRLOG%
-del %COMPSPATH%\link.res >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\*.ppo >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\*.oo2 >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\pp >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\pp.exe >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppos2.exe >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppas.bat >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\ppas.cmd >& nul >> %FPCERRLOG%
-del %FPCSNAPBIN%\link.res >& nul >> %FPCERRLOG%
-:ContClComp
-if %PARAMS% == compiler goto Branches
-if %PARAMS% == both goto Branches
-:CleanSnapshot
-if %@EVAL[0] == 0 goto JPCleanSnap
-echo *Deleting the old snapshot (error messages are OK here) ... >> %FPCERRLOG%
-del %FPCSNAPDOC%\*.txt >> %FPCERRLOG%
-del %FPCSNAPDOC%\*.htm* >> %FPCERRLOG%
-del %FPCSNAPDOC%\copying.* >> %FPCERRLOG%
-del %FPCSNAPMSG%\*.msg >> %FPCERRLOG%
-del %FPCSNAP%\baseemx.zip >> %FPCERRLOG%
-goto ContClSnap
-:JPCleanSnap
-echo *Deleting the old snapshot ... >> %FPCERRLOG%
-del %FPCSNAP%\baseemx.zip >& nul >> %FPCERRLOG%
-del %FPCSNAPDOC%\*.txt >& nul >> %FPCERRLOG%
-del %FPCSNAPDOC%\*.htm* >& nul >> %FPCERRLOG%
-del %FPCSNAPDOC%\copying.* >& nul >> %FPCERRLOG%
-del %FPCSNAPMSG%\*.msg >& nul >> %FPCERRLOG%
-:ContClSnap
-if %PARAMS% == clean goto End
-
-:Branches
-if %PARAMS% == both goto RTL1
-if %PARAMS% == snapshot goto RTL1
-if %PARAMS% == compiler goto Compiler
-if %PARAMS% == rtl goto RTL1
-if %PARAMS% == cycle goto RTL1
-echo *Error: Unknown parameter - %PARAMS% >> %FPCERRLOG%
-goto End
-
-:RTL1
-echo *Creating file with all the needed options and paths for RTL ... >> %FPCERRLOG%
-echo %SKIPCFG% > %OS2OPTF%
-echo %OS2OPT1% >> %OS2OPTF%
-echo %OS2OPT2% >> %OS2OPTF%
-echo %OS2OPT3% >> %OS2OPTF%
-echo %OS2OPT4% >> %OS2OPTF%
-echo %OS2OBJP% >> %OS2OPTF%
-echo %OS2UNITP% >> %OS2OPTF%
-echo %OS2INCP% >> %OS2OPTF%
-echo %OS2UNITT% >> %OS2OPTF%
-echo %OS2UNITE% >> %OS2OPTF%
-echo -FD%REALTOOLS% >> %OS2OPTF%
-if not .%CURRENTOPT1% == . echo %CURRENTOPT1% >> %OS2OPTF%
-if not .%CURRENTOPT2% == . echo %CURRENTOPT2% >> %OS2OPTF%
-if not .%FPCLOG% == . echo -Fe%FPCERRLOG% >> %OS2OPTF%
-if not .%FORCEPPAS% == . echo -a >> %OS2OPTF%
-if not .%FORCEPPAS% == . echo -s >> %OS2OPTF%
-if .%DOVERBOSE% == .1 echo %VERBOSEOPT% >> %OS2OPTF%
-if not .%DOVERBOSE% == .1 goto CompS1
-echo *Start of basic options used for compilation >> %FPCERRLOG%
-type %OS2OPTF% >> %FPCERRLOG%
-echo *End of basic options used for compilation >> %FPCERRLOG%
-if not .%OTHEROPTS% == . echo *User specified options: %OTHEROPTS% >> %FPCERRLOG%
-:CompS1
-echo *Assembling the helpers ... >> %FPCERRLOG%
-%REALTOOLS%\as -o %FPCSNAPRTL%\prt0.oo2 %OS2RTL%\prt0.as >> %FPCERRLOG%
-%REALTOOLS%\as -o %FPCSNAPRTL%\prt1.oo2 %OS2RTL%\prt1.as >> %FPCERRLOG%
-%REALTOOLS%\as -o %FPCSNAPRTL%\code2.oo2 %OS2RTL%\code2.as >> %FPCERRLOG%
-%REALTOOLS%\as -o %FPCSNAPRTL%\code3.oo2 %OS2RTL%\code3.as >> %FPCERRLOG%
-echo *Compiling the system unit ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% -Us %OTHEROPTS% %OS2RTL%\SYSOS2.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit ObjPas ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLO%\OBJPAS.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit Objects ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\OBJECTS.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit Strings ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\STRINGS.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit HeapTrace ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\HEAPTRC.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit DosCalls ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\DOSCALLS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit DOS ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\DOS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit CPU ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLP%\CPU.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit MMX ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLP%\MMX.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit SysUtils ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLO%\SYSUTILS.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit TypInfo ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLO%\TYPINFO.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit CRT ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\CRT.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit Printer ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PRINTER.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit Math ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLO%\MATH.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit UComplex ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\UCOMPLEX.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit GetOpts ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\GETOPTS.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit LineInfo ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\LINEINFO.PP
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit KbdCalls ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\KBDCALLS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit MouCalls ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\MOUCALLS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit VioCalls ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\VIOCALLS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit MonCalls ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\MONCALLS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling unit Ports ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PORTS.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling PM units ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\OS2DEF.PAS
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PMWIN.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PMBITMAP.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PMGPI.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-echo *Compiling MMOS2 units ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\DIVE.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 echo * Deleting the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 del %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
-
-if %PARAMS% == rtl goto End
-
-:Compiler
-echo *Creating file with all the needed options and paths for the compiler ... >> %FPCERRLOG%
-echo %SKIPCFG% > %OS2OPTF%
-echo %OS2OPT1% >> %OS2OPTF%
-echo %OS2OPT2% >> %OS2OPTF%
-echo %OS2OPT3% >> %OS2OPTF%
-echo %OS2OPT4% >> %OS2OPTF%
-echo %OS2OBJP% >> %OS2OPTF%
-echo %OS2UNITP% >> %OS2OPTF%
-echo -FD%REALTOOLS% >> %OS2OPTF%
-echo %COMPUNITP% >> %OS2OPTF%
-echo %COMPINCP% >> %OS2OPTF%
-echo %COMPOBJP% >> %OS2OPTF%
-echo %STACKOPT% >> %OS2OPTF%
-echo %OS2EXET% >> %OS2OPTF%
-if not .%CURRENTOPT1% == . echo %CURRENTOPT1% >> %OS2OPTF%
-if not .%CURRENTOPT2% == . echo %CURRENTOPT2% >> %OS2OPTF%
-if not .%FPCLOG% == . echo -Fe%FPCERRLOG% >> %OS2OPTF%
-if not .%FORCEPPAS% == . echo -a >> %OS2OPTF%
-if not .%FORCEPPAS% == . echo -s >> %OS2OPTF%
-if .%DOVERBOSE% == .1 echo %VERBOSEOPT% >> %OS2OPTF%
-if not .%DOVERBOSE% == .1 goto CompS2
-echo *Start of basic options used for compilation >> %FPCERRLOG%
-type %OS2OPTF% >> %FPCERRLOG%
-echo *End of basic options used for compilation >> %FPCERRLOG%
-if not .%OTHEROPTS% == . echo *User specified options: %OTHEROPTS% >> %FPCERRLOG%
-:CompS2
-echo *Compiling the compiler ... >> %FPCERRLOG%
-%REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %COMPSPATH%\PP.PAS
-if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 call %FPCSNAPBIN%\%PPASNAME% >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 echo * Deleting the PPAS script >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 del %FPCSNAPBIN%\%PPASNAME% >> %FPCERRLOG%
-if .%FORCEPPAS% == .1 del %FPCSNAPBIN%\link.res >> %FPCERRLOG%
-:Comp2
-ren %FPCSNAPBIN%\pp.exe ppos2.exe >> %FPCERRLOG%
-if exist %FPCSNAPBIN%\ppos2.exe goto OKCompiler
-if not exist %FPCSNAPBIN%\pp goto C2Cont
-if exist %FPCSNAPBIN%\ppas.bat goto PPasBat
-if exist %FPCSNAPBIN%\ppas.cmd goto PPasCmd
-:C2Cont
-echo *Error: The compiler wasn't compiled!! >> %FPCERRLOG%
-goto End
-
-:PPasCmd
-echo *Automatic binding failed, trying again ... >> %FPCERRLOG%
-call %FPCSNAPBIN%\ppas.cmd
-del %FPCSNAPBIN%\ppas.cmd >> %FPCERRLOG%
-goto Comp2
-
-:PPasBat
-echo *Automatic binding failed, trying again ... >> %FPCERRLOG%
-call %FPCSNAPBIN%\ppas.bat
-del %FPCSNAPBIN%\ppas.bat >> %FPCERRLOG%
-goto Comp2
-
-:OKCompiler
-if %PARAMS% == compiler goto End
-if %PARAMS% == both goto End
-if %PARAMS% == cycle goto Cycle
-goto CopyFiles
-
-:Cycle
-
-rem Another loop?
-if %CYCLE% == 2 goto CopyFiles
-echo *Backing up previous compiler version to ppos2.%CYCLE% ... >> %FPCERRLOG%
-copy %REALTOOLS%ppos2.exe %REALTOOLS%ppos2.%CYCLE% >> %FPCERRLOG%
-echo *Copying the newly created compiler to %REALTOOLS% ... >> %FPCERRLOG%
-copy %FPCSNAPBIN%\ppos2.exe %REALTOOLS%. >> %FPCERRLOG%
-if %CYCLE% == 1 goto Cycle2
-set COMPILER=PPOS2.EXE
-set CYCLE=1
-goto NoPars
-
-:Cycle2
-set CYCLE=2
-goto NoPars
-
-:CopyFiles
-set FPCSNAPTXT=%FPCSNAPDOC%\snapshot.txt
-echo *Copying the documentation ... >> %FPCERRLOG%
-copy %FPCSRC%\INSTALL\DOC\*.txt %FPCSNAPDOC% >> %FPCERRLOG%
-copy %FPCSRC%\INSTALL\DOC\*.htm* %FPCSNAPDOC% >> %FPCERRLOG%
-copy %FPCSRC%\INSTALL\DOC\copying.* %FPCSNAPDOC% >> %FPCERRLOG%
-echo *Creating the snapshot readme file ... >> %FPCERRLOG%
-echo This is a FPC snapshot for OS/2. It contains compilation of the most current >> %FPCSNAPTXT%
-echo developers' sources as of time of its creation. It contains the latest fixes >> %FPCSNAPTXT%
-echo but might contain some new bugs as well, since it's less tested than regular >> %FPCSNAPTXT%
-echo releases. Please, send your error reports to [email protected] >> %FPCSNAPTXT%
-echo mailing list (and don't forget to mention the fact you're not subscribed to >> %FPCSNAPTXT%
-echo the list in your e-mail, if it's the case). >> %FPCSNAPTXT%
-echo The snapshot has the same structure as the release ZIP files, so it may be >> %FPCSNAPTXT%
-echo installed using the normal installer (INSTALL.EXE and INSTALL.DAT must be >> %FPCSNAPTXT%
-echo in the same directory) or directly unzipped into your FPC tree. >> %FPCSNAPTXT%
-echo *Copying the message files ... >> %FPCERRLOG%
-copy %COMPSPATH%\*.msg %FPCSNAPMSG% >> %FPCERRLOG%
-
-if %@EVAL[0] == 0 goto Pack
-echo *Warning: Packing in this environment might fail. >> %FPCERRLOG%
-echo *You should press Ctrl-Break now if the current drive is different from that >> %FPCERRLOG%
-echo *of %FPCSNAP%; otherwise press any key to continue. >> %FPCERRLOG%
-if not %FPCERRLOG% == CON echo *Warning: Packing in this environment might fail.
-if not %FPCERRLOG% == CON echo *You should press Ctrl-Break now if the current drive is different from that
-if not %FPCERRLOG% == CON echo *of %FPCDIR%; otherwise press any key to continue.
-pause>nul
-cd %FPCSNAP%
-
-:Pack
-echo *Packing the snapshot ... >> %FPCERRLOG%
-if %@EVAL[0] == 0 goto SHL2
-goto Cmd2
-:Shl2
-pushd
-cdd %FPCSNAP%
-:Cmd2
-
-rem ZIP.EXE must be on the PATH
-zip -9 -r baseemx.zip bin\os2\ppos2.exe doc\* msg\* units\os2\rtl\*.ppo units\os2\rtl\*.oo2 units\os2\rtl\*.ao2 >> %FPCERRLOG%
-if exist baseemx.zip goto ZipOK
-echo *Error: The ZIP file hasn't been created!! >> %FPCERRLOG%
-:ZipOK
-if %@EVAL[0] == 0 popd
-
-echo *Done. >> %FPCERRLOG%
-
-goto End
-
-:ErrorDir
-echo *Error: Environment variable FPCDIR must point to your base FPC directory!!! >> %FPCERRLOG%
-goto End
-
-
-  $Log$
-  Revision 1.1  2000-07-13 06:31:26  michael
-  + Initial import
-
-  Revision 1.18  2000/06/26 17:31:12  hajny
-    * workaround for MS command shell limitation
-
-  Revision 1.17  2000/05/21 16:09:42  hajny
-    * os2def.pas added
-
-  Revision 1.16  2000/05/14 16:46:09  hajny
-    * cmd.exe compatibility problem fixed
-
-  Revision 1.15  2000/04/03 17:42:46  hajny
-    + LineInfo added
-
-  Revision 1.14  2000/03/28 19:30:50  hajny
-    * another change of order
-
-  Revision 1.13  2000/03/16 19:43:36  hajny
-    * fix for COMMAND.COM, order, etc.
-
-  Revision 1.12  2000/03/12 18:29:40  hajny
-    * wrong order corrected
-
-  Revision 1.11  2000/03/12 13:42:00  hajny
-    * cosmetic change for easier synchronization
-
-  Revision 1.10  2000/03/12 13:37:24  hajny
-    * support for calling PPAS script, compiler stack increased
-
-  Revision 1.9  2000/03/05 19:13:25  hajny
-    * new snapshot structure
-
-  Revision 1.8  2000/01/29 16:24:01  hajny
-    * logging enhanced, verbose support, error for non-4dos fixed
-
-  Revision 1.7  2000/01/26 22:34:36  hajny
-    * support for error logging added
-
-  Revision 1.6  2000/01/16 18:44:21  hajny
-    * got rid of PPC386.CFG dependency
-
-  Revision 1.3  1999/10/01 09:00:21  hajny
-    + PMGPI and DIVE added
-
-  Revision 1.2  1999/09/15 07:31:49  hajny
-    + some units added, OTHEROPTS variable support
-
-
-
-:End