diff --git a/utils/fpcmake.inc b/utils/fpcmake.inc index 01d7295d3d..2d25568952 100644 --- a/utils/fpcmake.inc +++ b/utils/fpcmake.inc @@ -1,7 +1,7 @@ {$ifdef Delphi} -const fpcmakeini : array[0..109] of string[240]=( +const fpcmakeini : array[0..112] of string[240]=( {$else Delphi} -const fpcmakeini : array[0..109,1..240] of char=( +const fpcmakeini : array[0..112,1..240] of char=( {$endif Delphi} ';'#010+ '; Templates used by fpcmake to create a Makefile from Makefile.fpc'#010+ @@ -119,37 +119,46 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ #010+ '[fpcdircheckenv]'#010+ + '#####################################################################'#010+ + '# FPCDIR Setting'#010+ + '######################################################','##############'+ + '#'#010+ + #010+ '# Test FPCDIR to look if the RTL dir exists'#010+ 'ifdef FPCDIR'#010+ 'override FPCDIR:=$(subst \,/,$(FPCDIR))'#010+ 'ifeq ($(wildcard $(FPCDIR)/rtl),)'#010+ - 'override F','PCDIR=wrong'#010+ + 'override FPCDIR=wrong'#010+ 'endif'#010+ 'else'#010+ 'override FPCDIR=wrong'#010+ 'endif'#010+ #010+ '[fpcdirdetect]'#010+ - '# Detect FPCDIR'#010+ + '# Detect FPCDIR',#010+ 'ifeq ($(FPCDIR),wrong)'#010+ 'ifdef inlinux'#010+ 'override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)'#010+ 'else'#010+ 'override FPCDIR:=$(subst /$(FPC)$(EXEEXT),,$(firstword $(strip $(wildc'+ - 'a','rd $(addsuffix /$(FPC)$(EXEEXT),$(SEARCHPATH))))))'#010+ + 'ard $(addsuffix /$(FPC)$(EXEEXT),$(SEARCHPATH))))))'#010+ 'endif'#010+ 'endif'#010+ #010+ '[fpcdirsubs]'#010+ - '# Create units dir'#010+ + '# Cre','ate units dir'#010+ 'ifneq ($(FPCDIR),.)'#010+ 'UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)'#010+ 'endif'#010+ #010+ + '[checkfpcdirsubs]'#010+ '# Check if the dirs really exists, else turn it off'#010+ - 'ifeq ($(wildcard $(UNITSDIR',')),)'#010+ + 'ifeq ($(wildcard $(UNITSDIR)),)'#010+ 'UNITSDIR='#010+ 'endif'#010+ + 'ifeq ($(wildcard $(TOOLKITDIR)),)'#010+ + 'TOOLKITDI','R='#010+ + 'endif'#010+ 'ifeq ($(wildcard $(PACKAGEDIR)),)'#010+ 'PACKAGEDIR='#010+ 'endif'#010+ @@ -158,50 +167,39 @@ const fpcmakeini : array[0..109,1..240] of char=( 'endif'#010+ #010+ #010+ - '[defaultsettings]'#010+ + '[presettings]'#010+ '#####################################################################'#010+ - '# Default Settings'#010+ - '##','##################################################################'+ + '# Pre Settings'#010+ + '######################','##############################################'+ '#'#010+ #010+ - '# Release ? Then force OPT and don'#039't use extra opts via commandlin'+ - 'e'#010+ - 'ifndef REDIRFILE'#010+ - 'REDIRFILE=log'#010+ - 'endif'#010+ - #010+ - 'ifdef REDIR'#010+ - 'ifndef inlinux'#010+ - 'override FPC=redir -eo $(FPC)'#010+ - 'endif'#010+ - '# ','set the verbosity to max'#010+ - 'override OPT+=-va'#010+ - 'override REDIR:= >> $(REDIRFILE)'#010+ - 'endif'#010+ - #010+ - #010+ '[usersettings]'#010+ '#####################################################################'#010+ '# User Settings'#010+ - '#######################################################','#############'+ + '#####################################################################'#010+ + #010+ + '[postsettings]'#010+ + '####','################################################################'+ '#'#010+ + '# Post Settings'#010+ + '#####################################################################'#010+ #010+ #010+ '[dir_default]'#010+ '#####################################################################'#010+ - '# Default Directories'#010+ + '# ','Default Directories'#010+ '#####################################################################'#010+ #010+ '# Base dir'#010+ 'ifdef PWD'#010+ - 'BASEDIR:=$(shell $(PWD))'#010, + 'BASEDIR:=$(shell $(PWD))'#010+ 'else'#010+ 'BASEDIR=.'#010+ 'endif'#010+ #010+ '# set the prefix directory where to install everything'#010+ 'ifndef PREFIXINSTALLDIR'#010+ - 'ifdef inlinux'#010+ + 'if','def inlinux'#010+ 'PREFIXINSTALLDIR=/usr'#010+ 'else'#010+ 'PREFIXINSTALLDIR=/pp'#010+ @@ -211,41 +209,41 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ #010+ '[dir_install]'#010+ - '#########################','###########################################'+ - '#'#010+ - '# Install Directories'#010+ '#####################################################################'#010+ + '# Install Directories'#010+ + '####################################','################################'+ + '#'#010+ #010+ '# set the base directory where to install everything'#010+ 'ifndef BASEINSTALLDIR'#010+ 'ifdef inlinux'#010+ - 'BASEINSTALLDI','R=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)'#010+ + 'BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)'#010+ 'else'#010+ 'BASEINSTALLDIR=$(PREFIXINSTALLDIR)'#010+ 'endif'#010+ 'endif'#010+ #010+ - '# set the directory where to install the binaries'#010+ + '# set',' the directory where to install the binaries'#010+ 'ifndef BININSTALLDIR'#010+ 'ifdef inlinux'#010+ 'BININSTALLDIR=$(PREFIXINSTALLDIR)/bin'#010+ 'else'#010+ - 'BININSTALLDIR=','$(BASEINSTALLDIR)/bin/$(OS_TARGET)'#010+ + 'BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)'#010+ 'endif'#010+ 'endif'#010+ #010+ '# set the directory where to install the units.'#010+ - 'ifndef UNITINSTALLDIR'#010+ + 'ifndef ','UNITINSTALLDIR'#010+ 'UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)'#010+ 'ifdef UNITSUBDIR'#010+ 'UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)'#010+ - 'endif',#010+ + 'endif'#010+ 'endif'#010+ #010+ '# Where to install shared libraries'#010+ 'ifndef LIBINSTALLDIR'#010+ 'ifdef inlinux'#010+ - 'LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib'#010+ + 'LIBINSTALLDIR=$(PREFIXIN','STALLDIR)/lib'#010+ 'else'#010+ 'LIBINSTALLDIR=$(UNITINSTALLDIR)'#010+ 'endif'#010+ @@ -253,23 +251,23 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ '# Where the source files will be stored'#010+ 'ifndef SOURCEINSTALLDIR'#010+ - 'ifdef inl','inux'#010+ + 'ifdef inlinux'#010+ 'SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)'#010+ 'else'#010+ - 'SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source'#010+ + 'SOURCEINSTALLDIR=$(BASEINSTALLDIR',')/source'#010+ 'endif'#010+ 'endif'#010+ #010+ '# Where the doc files will be stored'#010+ 'ifndef DOCINSTALLDIR'#010+ 'ifdef inlinux'#010+ - 'DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$','(FPC_VERSION)'#010+ + 'DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)'#010+ 'else'#010+ 'DOCINSTALLDIR=$(BASEINSTALLDIR)/doc'#010+ 'endif'#010+ 'endif'#010+ #010+ - '# Where the some extra (data)files will be stored'#010+ + '# Where the some extra (data)files ','will be stored'#010+ 'ifndef DATAINSTALLDIR'#010+ 'DATAINSTALLDIR=$(BASEINSTALLDIR)'#010+ 'endif'#010+ @@ -277,10 +275,10 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ '[dir_gcclib]'#010+ '# On linux, try to find where libgcc.a is.'#010+ - 'ifd','ef inlinux'#010+ + 'ifdef inlinux'#010+ 'ifndef GCCLIBDIR'#010+ 'GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '#039'{ print'+ - ' $$4 } '#039'`)'#010+ + ' $$4 } '#039'`',')'#010+ 'endif'#010+ 'endif'#010+ 'export GCCLIBDIR'#010+ @@ -290,25 +288,47 @@ const fpcmakeini : array[0..109,1..240] of char=( '# Where to find other libraries'#010+ 'ifdef inlinux'#010+ 'ifndef OTHERLIBDIR'#010+ - 'OTHERLIBDIR:=$(shell gre','p -v "^\#" /etc/ld.so.conf | awk '#039'{ ORS='+ - '" "; print $1 }'#039')'#010+ + 'OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '#039'{ ORS=" '+ + '"; print $1 }'#039')'#010+ 'endif'#010+ 'endif'#010+ 'export OTHERLIBDIR'#010+ #010+ #010+ - '[command_begin]'#010+ - '#####################################################################'#010+ - '# Compiler Command Line'#010+ - '#######################################','#############################'+ + '[redir]'#010+ + '####','################################################################'+ '#'#010+ + '# Redirection'#010+ + '#####################################################################'#010+ + #010+ + '# Release ? Then force OPT and don'#039't use extra opts via commandlin'+ + 'e'#010+ + 'ifndef REDIRFILE'#010+ + 'REDI','RFILE=log'#010+ + 'endif'#010+ + #010+ + 'ifdef REDIR'#010+ + 'ifndef inlinux'#010+ + 'override FPC=redir -eo $(FPC)'#010+ + 'endif'#010+ + '# set the verbosity to max'#010+ + 'override FPCOPT+=-va'#010+ + 'override REDIR:= >> $(REDIRFILE)'#010+ + 'endif'#010+ + #010+ + #010+ + '[command_begin]'#010+ + '#######################################################','#############'+ + '#'#010+ + '# Compiler Command Line'#010+ + '#####################################################################'#010+ #010+ '# Load commandline OPTDEF and add FPC_CPU define'#010+ 'override FPCOPTDEF:=-d$(CPU_TARGET)'#010+ #010+ - '# Load commandline OPT and add target and unit dir to be sure'#010+ + '# Load commandline OPT and add target and un','it dir to be sure'#010+ 'ifneq ($(OS_TARGET),$(OS_SOURCE))'#010+ - 'override FPCOPT+=-T$(OS_TA','RGET)'#010+ + 'override FPCOPT+=-T$(OS_TARGET)'#010+ 'endif'#010+ #010+ '[command_needopt]'#010+ @@ -319,13 +339,13 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ '[command_needunit]'#010+ 'ifdef NEEDUNITDIR'#010+ - 'override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))'#010+ + 'override FPCOPT+=$(addprefix -Fu,$(NEEDUNITD','IR))'#010+ 'endif'#010+ #010+ #010+ '[command_unitsdir]'#010+ 'ifdef UNITSDIR'#010+ - 'override FPCOPT+=-Fu$(UNITSDIR)',#010+ + 'override FPCOPT+=-Fu$(UNITSDIR)'#010+ 'endif'#010+ #010+ #010+ @@ -337,13 +357,13 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ '[command_needobj]'#010+ 'ifdef NEEDOBJDIR'#010+ - 'override FPCOPT+=$(addprefix -Fo,$(NEEDOBJDIR))'#010+ + 'override FPCOPT+=$(addprefi','x -Fo,$(NEEDOBJDIR))'#010+ 'endif'#010+ #010+ #010+ '[command_needinc]'#010+ 'ifdef NEEDINCDIR'#010+ - 'override FPCOP','T+=$(addprefix -Fi,$(NEEDINCDIR))'#010+ + 'override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))'#010+ 'endif'#010+ #010+ '[command_gcclib]'#010+ @@ -353,9 +373,9 @@ const fpcmakeini : array[0..109,1..240] of char=( 'endif'#010+ #010+ '[command_otherlib]'#010+ - '# Add Other dirs path if asked'#010+ + '#',' Add Other dirs path if asked'#010+ 'ifdef OTHERLIBDIR'#010+ - 'override FPCOPT+=$(addprefix -','Fl,$(OTHERLIBDIR))'#010+ + 'override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))'#010+ 'endif'#010+ #010+ '[command_target]'#010+ @@ -366,12 +386,12 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ '[command_unittarget]'#010+ 'ifdef UNITTARGETDIR'#010+ - 'override FPCOPT+=-FU$(UNITTARGETDIR)'#010+ + 'override',' FPCOPT+=-FU$(UNITTARGETDIR)'#010+ 'endif'#010+ #010+ '[command_end]'#010+ '# Smartlinking'#010+ - 'ifdef SMARTLI','NK'#010+ + 'ifdef SMARTLINK'#010+ 'override FPCOPT+=-CX'#010+ 'endif'#010+ #010+ @@ -382,11 +402,11 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ '# Release mode (strip, optimize and don'#039't load ppc386.cfg)'#010+ 'ifdef RELEASE'#010+ - 'override FPCOPT+=-Xs -OG2p3 -n'#010+ + 'override FP','COPT+=-Xs -OG2p3 -n'#010+ 'endif'#010+ #010+ '# Verbose settings (warning,note,info)'#010+ - 'ifdef VERBOS','E'#010+ + 'ifdef VERBOSE'#010+ 'override FPCOPT+=-vwni'#010+ 'endif'#010+ #010+ @@ -396,25 +416,25 @@ const fpcmakeini : array[0..109,1..240] of char=( 'endif'#010+ 'ifdef UNITDIR'#010+ 'override FPCOPT+=$(addprefix -Fu,$(UNITDIR))'#010+ - 'endif'#010+ + 'endif',#010+ 'ifdef LIBDIR'#010+ 'override FPCOPT+=$(addprefix -Fl,$(LIBDIR))'#010+ 'endif'#010+ 'ifdef OBJDIR'#010+ - 'o','verride FPCOPT+=$(addprefix -Fo,$(OBJDIR))'#010+ + 'override FPCOPT+=$(addprefix -Fo,$(OBJDIR))'#010+ 'endif'#010+ 'ifdef INCDIR'#010+ 'override FPCOPT+=$(addprefix -Fi,$(INCDIR))'#010+ 'endif'#010+ #010+ '# Add defines from FPCOPTDEF to FPCOPT'#010+ - 'ifdef FPCOPTDEF'#010+ + 'ifdef FPCO','PTDEF'#010+ 'override FPCOPT+=$(FPCOPTDEF)'#010+ 'endif'#010+ #010+ '# Error file ?'#010+ 'ifdef ERRORFILE'#010+ - 'over','ride FPCOPT+=-Fr$(ERRORFILE)'#010+ + 'override FPCOPT+=-Fr$(ERRORFILE)'#010+ 'endif'#010+ #010+ '# Was a config file specified ?'#010+ @@ -422,10 +442,10 @@ const fpcmakeini : array[0..109,1..240] of char=( 'override FPCOPT+=@$(CFGFILE)'#010+ 'endif'#010+ #010+ - '# For win32 the options are passed using the environment variable FPCE'+ - 'XTCMD'#010+ + '# For win32 the options are passed using the',' environment variable FP'+ + 'CEXTCMD'#010+ 'ifeq ($(OS_SOURCE),win32)'#010+ - 'override FPCEXTCMD:=','$(FPCOPT)'#010+ + 'override FPCEXTCMD:=$(FPCOPT)'#010+ 'override FPCOPT:=!FPCEXTCMD'#010+ 'export FPCEXTCMD'#010+ 'endif'#010+ @@ -435,10 +455,10 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ #010+ '[shelltools]'#010+ - '#####################################################################'#010+ - '# Shell tools'#010+ - '####################','################################################'+ + '##########################','##########################################'+ '#'#010+ + '# Shell tools'#010+ + '#####################################################################'#010+ #010+ '# To copy pograms'#010+ 'ifndef COPY'#010+ @@ -449,14 +469,14 @@ const fpcmakeini : array[0..109,1..240] of char=( 'ifndef COPYTREE'#010+ 'COPYTREE:=cp -rfp'#010+ 'endif'#010+ - #010+ + #010, '# To move pograms'#010+ 'ifndef MOVE'#010+ 'MOVE:=mv -f'#010+ 'endif'#010+ #010+ '# Check delete program'#010+ - 'ifndef',' DEL'#010+ + 'ifndef DEL'#010+ 'DEL:=rm -f'#010+ 'endif'#010+ #010+ @@ -469,14 +489,14 @@ const fpcmakeini : array[0..109,1..240] of char=( 'ifndef INSTALL'#010+ 'ifdef inlinux'#010+ 'INSTALL:=install -m 644'#010+ - 'else'#010+ + 'else'#010, 'INSTALL:=$(COPY)'#010+ 'endif'#010+ 'endif'#010+ #010+ '# To install programs'#010+ 'ifndef INSTALLEXE'#010+ - 'ifdef in','linux'#010+ + 'ifdef inlinux'#010+ 'INSTALLEXE:=install -m 755'#010+ 'else'#010+ 'INSTALLEXE:=$(COPY)'#010+ @@ -488,20 +508,21 @@ const fpcmakeini : array[0..109,1..240] of char=( 'ifdef inlinux'#010+ 'MKDIR:=install -m 755 -d'#010+ 'else'#010+ - 'MKDIR:=ginstall -m 755 -d'#010+ + 'MKDIR:=gins','tall -m 755 -d'#010+ 'endif'#010+ 'endif'#010+ #010+ - 'export COPY COPYTREE MOVE DEL DELTREE INSTALL INST','ALLEXE MKDIR'#010+ + 'export COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR'#010+ #010+ #010+ '[tool_default]'#010+ '#####################################################################'#010+ '# Default Tools'#010+ - '#####################################################################'#010+ + '##############################################','######################'+ + '#'#010+ #010+ '# assembler, redefine it if cross compiling'#010+ - 'ifndef AS',#010+ + 'ifndef AS'#010+ 'AS=as'#010+ 'endif'#010+ #010+ @@ -517,12 +538,12 @@ const fpcmakeini : array[0..109,1..240] of char=( 'ifdef inOS2'#010+ 'PPAS=ppas.cmd'#010+ 'else'#010+ - 'PPAS=ppas.bat'#010+ + 'PPAS=ppas','.bat'#010+ 'endif'#010+ 'endif'#010+ #010+ '# also call ppas if with command option -s'#010+ - 'ifeq (,$(findstri','ng -s ,$(COMPILER)))'#010+ + 'ifeq (,$(findstring -s ,$(COMPILER)))'#010+ 'EXECPPAS='#010+ 'else'#010+ 'EXECPPAS:=@$(PPAS)'#010+ @@ -536,9 +557,9 @@ const fpcmakeini : array[0..109,1..240] of char=( 'endif'#010+ #010+ '# echo'#010+ - 'ifndef ECHO'#010+ + 'ifndef ','ECHO'#010+ 'ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))'#010+ - 'ifeq',' ($(ECHO),)'#010+ + 'ifeq ($(ECHO),)'#010+ 'ECHO:=echo'#010+ 'else'#010+ 'ECHO:=$(firstword $(ECHO))'#010+ @@ -549,12 +570,12 @@ const fpcmakeini : array[0..109,1..240] of char=( '[tool_ppdep]'#010+ '# ppdep'#010+ 'ifndef PPDEP'#010+ - 'PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))'+ - #010+ + 'PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EX','EEXT),$(SEARCHPATH))'+ + '))'#010+ 'ifeq ($(PPDEP),)'#010+ 'PPDEP='#010+ 'else'#010+ - 'PPDEP:=$(firstword $(PPDEP','))'#010+ + 'PPDEP:=$(firstword $(PPDEP))'#010+ 'endif'#010+ 'endif'#010+ 'export PPDEP'#010+ @@ -564,7 +585,7 @@ const fpcmakeini : array[0..109,1..240] of char=( 'ifndef PPUMOVE'#010+ 'PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH'+ '))))'#010+ - 'ifeq ($(PPUMOVE),)'#010+ + 'ifeq ($(PPUMOVE),)',#010+ 'PPUMOVE='#010+ 'else'#010+ 'PPUMOVE:=$(firstword $(PPUMOVE))'#010+ @@ -572,7 +593,7 @@ const fpcmakeini : array[0..109,1..240] of char=( 'endif'#010+ 'export PPUMOVE'#010+ #010+ - '[t','ool_ppufiles]'#010+ + '[tool_ppufiles]'#010+ '# ppufiles'#010+ 'ifndef PPUFILES'#010+ 'PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPA'+ @@ -580,20 +601,20 @@ const fpcmakeini : array[0..109,1..240] of char=( 'ifeq ($(PPUFILES),)'#010+ 'PPUFILES='#010+ 'else'#010+ - 'PPUFILES:=$(firstword $(PPUFILES))'#010+ + 'PPUFILES:','=$(firstword $(PPUFILES))'#010+ 'endif'#010+ 'endif'#010+ 'export PPUFILES'#010+ #010+ '[tool_data2inc]'#010+ - '# data2','inc'#010+ + '# data2inc'#010+ 'ifndef DATA2INC'#010+ 'DATA2INC:=$(strip $(wildcard $(addsuffix /data2inc$(EXEEXT),$(SEARCHPA'+ 'TH))))'#010+ 'ifeq ($(DATA2INC),)'#010+ 'DATA2INC='#010+ 'else'#010+ - 'DATA2INC:=$(firstword $(DATA2INC))'#010+ + 'DATA2INC:=$(firstword $(DATA2I','NC))'#010+ 'endif'#010+ 'endif'#010+ 'export DATA2INC'#010+ @@ -601,8 +622,7 @@ const fpcmakeini : array[0..109,1..240] of char=( '[tool_diff]'#010+ '# diff'#010+ 'ifndef DIFF'#010+ - 'DIFF:=$(strip',' $(wildcard $(addsuffix /diff$(EXEEXT),$(SEARCHPATH))))'+ - #010+ + 'DIFF:=$(strip $(wildcard $(addsuffix /diff$(EXEEXT),$(SEARCHPATH))))'#010+ 'ifeq ($(DIFF),)'#010+ 'DIFF='#010+ 'else'#010+ @@ -613,9 +633,9 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ '[tool_cmp]'#010+ '# cmp'#010+ - 'ifndef CMP'#010+ + 'ifndef CMP',#010+ 'CMP:=$(strip $(wildcard $(addsuffix /cmp$(EXEEXT),$(SEARCHPATH))))'#010+ - 'ifeq ($(CM','P),)'#010+ + 'ifeq ($(CMP),)'#010+ 'CMP='#010+ 'else'#010+ 'CMP:=$(firstword $(CMP))'#010+ @@ -627,7 +647,7 @@ const fpcmakeini : array[0..109,1..240] of char=( '# Sed'#010+ 'ifndef SED'#010+ 'SED:=$(strip $(wildcard $(addsuffix /sed$(EXEEXT),$(SEARCHPATH))))'#010+ - 'ifeq ($(SED),)'#010+ + 'ife','q ($(SED),)'#010+ 'SED='#010+ 'else'#010+ 'SED:=$(firstword $(SED))'#010+ @@ -635,20 +655,20 @@ const fpcmakeini : array[0..109,1..240] of char=( 'endif'#010+ 'export SED'#010+ #010+ - '[tool_u','px]'#010+ + '[tool_upx]'#010+ '# Look if UPX is found for go32v2 and win32. We can'#039't use $UPX bec'+ 'uase'#010+ '# upx uses that one itself (PFV)'#010+ 'ifndef UPXPROG'#010+ 'ifeq ($(OS_TARGET),go32v2)'#010+ 'UPXPROG:=1'#010+ - 'endif'#010+ + 'e','ndif'#010+ 'ifeq ($(OS_TARGET),win32)'#010+ 'UPXPROG:=1'#010+ 'endif'#010+ 'ifdef UPXPROG'#010+ - 'UPXPROG:=$(strip',' $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))'+ - '))'#010+ + 'UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))'+ + #010+ 'ifeq ($(UPXPROG),)'#010+ 'UPXPROG='#010+ 'else'#010+ @@ -658,19 +678,18 @@ const fpcmakeini : array[0..109,1..240] of char=( 'UPXPROG='#010+ 'endif'#010+ 'endif'#010+ - 'export UPXPROG'#010+ + 'export UP','XPROG'#010+ #010+ '[tool_date]'#010+ '# gdate/date'#010+ 'ifndef DATE'#010+ - 'DATE:=$(strip $(wildcard $(addsuff','ix /date$(EXEEXT),$(SEARCHPATH))))'+ - #010+ + 'DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SEARCHPATH))))'#010+ 'ifeq ($(DATE),)'#010+ 'DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))'#010+ 'ifeq ($(DATE),)'#010+ 'DATE='#010+ 'else'#010+ - 'DATE:=$(firstword $(DATE))'#010+ + 'DATE:=$(firstwo','rd $(DATE))'#010+ 'endif'#010+ 'else'#010+ 'DATE:=$(firstword $(DATE))'#010+ @@ -678,7 +697,7 @@ const fpcmakeini : array[0..109,1..240] of char=( 'endif'#010+ 'export DATE'#010+ #010+ - 'ifd','ef DATE'#010+ + 'ifdef DATE'#010+ 'DATESTR:=$(shell $(DATE) +%Y%m%d)'#010+ 'else'#010+ 'DATESTR='#010+ @@ -687,11 +706,11 @@ const fpcmakeini : array[0..109,1..240] of char=( '[tool_zip]'#010+ '# ZipProg, you can'#039't use Zip as the var name (PFV)'#010+ 'ifndef ZIPPROG'#010+ - 'ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))'+ - #010+ + 'ZIPPROG:=$(strip $(wil','dcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))'+ + '))'#010+ 'ifeq ($(ZIPPROG),)'#010+ 'ZIPPROG='#010+ - 'e','lse'#010+ + 'else'#010+ 'ZIPPROG:=$(firstword $(ZIPPROG)) -D9 -r'#010+ 'endif'#010+ 'endif'#010+ @@ -703,10 +722,10 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ #010+ '[extensions]'#010+ - '#####################################################################'#010+ - '# Default extensions'#010+ - '##############################','######################################'+ + '###########################################','#########################'+ '#'#010+ + '# Default extensions'#010+ + '#####################################################################'#010+ #010+ '# Default needed extensions (Go32v2,Linux)'#010+ 'LOADEREXT=.as'#010+ @@ -715,14 +734,14 @@ const fpcmakeini : array[0..109,1..240] of char=( 'OEXT=.o'#010+ 'ASMEXT=.s'#010+ 'SMARTEXT=.sl'#010+ - 'STATICLIBEXT=.a'#010+ + 'STATICLIB','EXT=.a'#010+ 'SHAREDLIBEXT=.so'#010+ 'RSTEXT=.rst'#010+ 'PACKAGESUFFIX='#010+ 'FPCMADE=fpcmade'#010+ #010+ '# Go32v1'#010+ - 'i','feq ($(OS_TARGET),go32v1)'#010+ + 'ifeq ($(OS_TARGET),go32v1)'#010+ 'PPUEXT=.pp1'#010+ 'OEXT=.o1'#010+ 'ASMEXT=.s1'#010+ @@ -734,12 +753,12 @@ const fpcmakeini : array[0..109,1..240] of char=( 'endif'#010+ #010+ '# Go32v2'#010+ - 'ifeq ($(OS_TARGET),go32v2)'#010+ + 'ife','q ($(OS_TARGET),go32v2)'#010+ 'PACKAGESUFFIX=go32'#010+ 'FPCMADE=fpcmade.dos'#010+ 'endif'#010+ #010+ - '# Linux'#010, + '# Linux'#010+ 'ifeq ($(OS_TARGET),linux)'#010+ 'PACKAGESUFFIX=linux'#010+ 'FPCMADE=fpcmade.lnx'#010+ @@ -751,13 +770,13 @@ const fpcmakeini : array[0..109,1..240] of char=( 'OEXT=.ow'#010+ 'ASMEXT=.sw'#010+ 'SMARTEXT=.slw'#010+ - 'STATICLIBEXT=.aw'#010+ + 'STATICLIB','EXT=.aw'#010+ 'SHAREDLIBEXT=.dll'#010+ 'PACKAGESUFFIX=win32'#010+ 'FPCMADE=fpcmade.w32'#010+ 'endif'#010+ #010+ - '# OS/','2'#010+ + '# OS/2'#010+ 'ifeq ($(OS_TARGET),os2)'#010+ 'PPUEXT=.ppo'#010+ 'ASMEXT=.so2'#010+ @@ -769,23 +788,23 @@ const fpcmakeini : array[0..109,1..240] of char=( 'FPCMADE=fpcmade.os2'#010+ 'endif'#010+ #010+ - '# library prefix'#010+ + '# librar','y prefix'#010+ 'LIBPREFIX=lib'#010+ 'ifeq ($(OS_TARGET),go32v2)'#010+ 'LIBPREFIX='#010+ 'endif'#010+ - 'ifeq ($(OS_','TARGET),go32v1)'#010+ + 'ifeq ($(OS_TARGET),go32v1)'#010+ 'LIBPREFIX='#010+ 'endif'#010+ #010+ '# determine which .pas extension is used'#010+ 'ifndef PASEXT'#010+ 'ifdef EXEOBJECTS'#010+ - 'override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EX'+ - 'EOBJECTS)))))'#010+ + 'override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(','firstword $('+ + 'EXEOBJECTS)))))'#010+ 'else'#010+ - 'override TESTPAS:=$(strip $(wildcard $(addsuf','fix .pas,$(firstword $('+ - 'UNITOBJECTS)))))'#010+ + 'override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UN'+ + 'ITOBJECTS)))))'#010+ 'endif'#010+ 'ifeq ($(TESTPAS),)'#010+ 'PASEXT=.pp'#010+ @@ -795,35 +814,35 @@ const fpcmakeini : array[0..109,1..240] of char=( 'endif'#010+ #010+ '[standardrules]'#010+ - '#####################################################################'#010+ - '# Standard rules'#010+ - '###############################','#####################################'+ + '########################################','############################'+ '#'#010+ + '# Standard rules'#010+ + '#####################################################################'#010+ #010+ '[packagedependrules]'#010+ '#####################################################################'#010+ '# Package depends'#010+ - '#####################################################################'#010+ + '#############','#######################################################'+ + '#'#010+ #010+ '[loaderrules]'#010+ - '######','##############################################################'+ - '#'#010+ + '#####################################################################'#010+ '# Loaders'#010+ '#####################################################################'#010+ #010+ - '.PHONY: fpc_loaders'#010+ + '.PHONY: fpc_loade','rs'#010+ #010+ '%$(OEXT): %$(LOADEREXT)'#010+ ' $(AS) -o $*$(OEXT) $<'#010+ #010+ - 'override ALLTARGET+','=fpc_loaders'#010+ + 'override ALLTARGET+=fpc_loaders'#010+ 'override CLEANTARGET+=fpc_loaders_clean'#010+ 'override SHOWINSTALLTARGET+=fpc_loaders_showinstall'#010+ 'override INSTALLTARGET+=fpc_loaders_install'#010+ #010+ - 'override LOADEROFILES:=$(addsuffix $(OEXT),$(LOADEROBJECTS))'#010+ + 'override LOA','DEROFILES:=$(addsuffix $(OEXT),$(LOADEROBJECTS))'#010+ #010+ - 'fpc_loaders: $(LOADEROFILES)',#010+ + 'fpc_loaders: $(LOADEROFILES)'#010+ #010+ 'fpc_loaders_clean:'#010+ ' -$(DEL) $(LOADEROFILES)'#010+ @@ -832,40 +851,40 @@ const fpcmakeini : array[0..109,1..240] of char=( ' @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES)'+ ')'#010+ #010+ - 'fpc_loaders_install:'#010+ + 'fpc_loader','s_install:'#010+ ' $(MKDIR) $(UNITINSTALLDIR)'#010+ - ' $(INSTALL) $(LOADEROFILE','S) $(UNITINSTALLDIR)'#010+ + ' $(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)'#010+ #010+ #010+ '[unitrules]'#010+ '#####################################################################'#010+ '# Units'#010+ - '#####################################################################'#010+ + '#################################################','###################'+ + '#'#010+ #010+ '.PHONY: fpc_units'#010+ #010+ 'override ALLTARGET+=fpc_units'#010+ #010+ - 'overri','de UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))'#010+ + 'override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))'#010+ 'override INSTALLPPUFILES+=$(UNITPPUFILES)'#010+ 'override CLEANPPUFILES+=$(UNITPPUFILES)'#010+ #010+ - 'fpc_units: $(UNITPPUFILES)'#010+ + 'fpc_units: $(UNITPPUFILES',')'#010+ #010+ #010+ #010+ '[exerules]'#010+ - '##############################################################','######'+ - '#'#010+ + '#####################################################################'#010+ '# Exes'#010+ '#####################################################################'#010+ #010+ '.PHONY: fpc_exes'#010+ #010+ 'override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))'#010+ - 'override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))'#010+ + 'ove','rride EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))'#010+ #010+ - 'override ALLTARGET+=fpc_ex','es'#010+ + 'override ALLTARGET+=fpc_exes'#010+ 'override INSTALLEXEFILES+=$(EXEFILES)'#010+ 'override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)'#010+ #010+ @@ -873,10 +892,10 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ #010+ '[rstrules]'#010+ - '#####################################################################'#010+ - '# Resource strings'#010+ - '#########################','###########################################'+ + '####################################','################################'+ '#'#010+ + '# Resource strings'#010+ + '#####################################################################'#010+ #010+ 'override RSTFILES=$(addsuffix $(RSTEXT),$(RSTOBJECTS))'#010+ #010+ @@ -884,17 +903,17 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ #010+ '[examplerules]'#010+ - '#####################################################################'#010+ - '# Examples'#010+ - '####','################################################################'+ + '#######','#############################################################'+ '#'#010+ + '# Examples'#010+ + '#####################################################################'#010+ #010+ '.PHONY: fpc_examples fpc_test'#010+ #010+ - 'override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))'#010+ + 'override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))'#010, 'override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))'#010+ #010+ - 'override CLEAN','EXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)'#010+ + 'override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)'#010+ #010+ 'fpc_examples: all $(EXAMPLEFILES)'#010+ #010+ @@ -903,19 +922,19 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ #010+ '[compilerules]'#010+ - '#####################################################################'#010+ - '# General compile rules'#010+ - '##############################','######################################'+ + '##############################################','######################'+ '#'#010+ + '# General compile rules'#010+ + '#####################################################################'#010+ #010+ - '.PHONY: fpc_all fpc_debug'#010+ + '.PHONY: fpc_packages fpc_all fpc_debug'#010+ #010+ - '$(FPCMADE):'#010+ + '$(FPCMADE): $(ALLTARGET)'#010+ ' @$(ECHO) Compiled > $(FPCMADE)'#010+ #010+ - 'fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \'#010+ - ' $(addsuffix _component,$(COMPILECOMPONENTS)) \'#010+ - ' $(A','LLTARGET) $(FPCMADE)'#010+ + 'fpc_packages: $(','addsuffix _package,$(COMPILEPACKAGES))'#010+ + #010+ + 'fpc_all: fpc_packages $(FPCMADE)'#010+ #010+ 'fpc_debug:'#010+ ' $(MAKE) all DEBUG=1'#010+ @@ -924,9 +943,9 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ '.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp'#010+ #010+ - '%$(PPUEXT): %.pp'#010+ + '%$(PPUEXT): %.pp',#010+ ' $(COMPILER) $< $(REDIR)'#010+ - ' $(EXECPASS)',#010+ + ' $(EXECPASS)'#010+ #010+ '%$(PPUEXT): %.pas'#010+ ' $(COMPILER) $< $(REDIR)'#010+ @@ -937,20 +956,19 @@ const fpcmakeini : array[0..109,1..240] of char=( ' $(EXECPASS)'#010+ #010+ '%$(EXEEXT): %.pas'#010+ - ' $(COMPILER) $< $(REDIR)'#010+ + ' $(COMPILER) $< $(RE','DIR)'#010+ ' $(EXECPASS)'#010+ #010+ #010+ '[libraryrules]'#010+ - '##########','##########################################################'+ - '#'#010+ + '#####################################################################'#010+ '# Library'#010+ '#####################################################################'#010+ #010+ '.PHONY: fpc_smart fpc_shared'#010+ #010+ - '# Default sharedlib units are all unit objects'#010+ - 'ifndef SHAREDLIBUNITOB','JECTS'#010+ + '# Default sharedl','ib units are all unit objects'#010+ + 'ifndef SHAREDLIBUNITOBJECTS'#010+ 'SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)'#010+ 'endif'#010+ #010+ @@ -962,8 +980,8 @@ const fpcmakeini : array[0..109,1..240] of char=( 'ifndef LIBNAME'#010+ ' @$(ECHO) "LIBNAME not set"'#010+ 'else'#010+ - ' $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)'#010+ - 'endif',#010+ + ' $','(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)'#010+ + 'endif'#010+ 'else'#010+ ' @$(ECHO) "Shared Libraries not supported"'#010+ 'endif'#010+ @@ -972,9 +990,10 @@ const fpcmakeini : array[0..109,1..240] of char=( '[installrules]'#010+ '#####################################################################'#010+ '# Install rules'#010+ - '#####################################################################'#010+ + '#######################','#############################################'+ + '#'#010+ #010+ - '.PHO','NY: fpc_showinstall fpc_install'#010+ + '.PHONY: fpc_showinstall fpc_install'#010+ #010+ 'ifdef EXTRAINSTALLUNITS'#010+ 'override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))'#010+ @@ -983,16 +1002,16 @@ const fpcmakeini : array[0..109,1..240] of char=( 'ifdef INSTALLPPUFILES'#010+ 'ifdef PPUFILES'#010+ 'ifdef inlinux'#010+ - 'INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTAL','LPPUFILES))'#010+ + 'INS','TALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))'#010+ 'INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))'#010+ 'else'#010+ 'INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))'#010+ 'endif'#010+ 'else'#010+ - 'INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPU'+ - 'FILES)))'#010+ + 'INSTALLPPULINKFILES:=$(wildcard $(su','bst $(PPUEXT),$(OEXT),$(INSTALLP'+ + 'PUFILES)))'#010+ + 'endif'#010+ 'endif'#010+ - 'end','if'#010+ #010+ 'fpc_showinstall: $(SHOWINSTALLTARGET)'#010+ 'ifdef INSTALLEXEFILES'#010+ @@ -1000,18 +1019,18 @@ const fpcmakeini : array[0..109,1..240] of char=( 'S))'#010+ 'endif'#010+ 'ifdef INSTALLPPUFILES'#010+ - ' @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFIL'+ - 'ES))',#010+ + ' @$(ECHO) -e $(','addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUF'+ + 'ILES))'#010+ 'ifneq ($(INSTALLPPULINKFILES),)'#010+ ' @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULIN'+ 'KFILES))'#010+ 'endif'#010+ 'ifneq ($(INSTALLPPULIBFILES),)'#010+ - ' @$(ECHO) -e $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBF'+ - 'ILES))'#010+ + ' @$(ECHO) -e $(addprefix "\n"$(L','IBINSTALLDIR)/,$(INSTALLPPULI'+ + 'BFILES))'#010+ 'endif'#010+ 'endif'#010+ - 'if','def EXTRAINSTALLFILES'#010+ + 'ifdef EXTRAINSTALLFILES'#010+ ' @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLF'+ 'ILES))'#010+ 'endif'#010+ @@ -1019,24 +1038,24 @@ const fpcmakeini : array[0..109,1..240] of char=( 'fpc_install: $(INSTALLTARGET)'#010+ '# Create UnitInstallFiles'#010+ 'ifdef INSTALLEXEFILES'#010+ - ' $(MKDIR) $(BININSTALLDIR)'#010+ - '# Compress the exes if',' upx is defined'#010+ + ' ',' $(MKDIR) $(BININSTALLDIR)'#010+ + '# Compress the exes if upx is defined'#010+ 'ifdef UPXPROG'#010+ ' -$(UPXPROG) $(INSTALLEXEFILES)'#010+ 'endif'#010+ ' $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)'#010+ 'endif'#010+ 'ifdef INSTALLPPUFILES'#010+ - ' $(MKDIR) $(UNITINSTALLDIR)'#010+ - ' $(INSTALL) $(INSTALLPPUFILES) $(UNIT','INSTALLDIR)'#010+ + ' $(MKDIR) $(UNITINST','ALLDIR)'#010+ + ' $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)'#010+ 'ifneq ($(INSTALLPPULINKFILES),)'#010+ ' $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)'#010+ 'endif'#010+ 'ifneq ($(INSTALLPPULIBFILES),)'#010+ ' $(MKDIR) $(LIBINSTALLDIR)'#010+ - ' $(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)'#010+ + ' $(INS','TALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)'#010+ + 'endif'#010+ 'endif'#010+ - 'e','ndif'#010+ 'ifdef EXTRAINSTALLFILES'#010+ ' $(MKDIR) $(DATAINSTALLDIR)'#010+ ' $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)'#010+ @@ -1044,27 +1063,27 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ #010+ '[sourceinstallrules]'#010+ - '#####################################################################'#010+ - '# Source install ru','les'#010+ + '#####################################','###############################'+ + '#'#010+ + '# Source install rules'#010+ '#####################################################################'#010+ #010+ '.PHONY: fpc_sourceinstall'#010+ #010+ 'fpc_sourceinstall: clean'#010+ ' $(MKDIR) $(SOURCEINSTALLDIR)'#010+ - ' $(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)'#010+ + ' $(COPYTREE) $(BA','SEDIR) $(SOURCEINSTALLDIR)'#010+ #010+ '[zipinstallrules]'#010+ - '######','##############################################################'+ - '#'#010+ + '#####################################################################'#010+ '# Zip'#010+ '#####################################################################'#010+ #010+ '.PHONY: fpc_zipinstall fpc_zipinstalladd'#010+ #010+ - '# Temporary path to pack a file'#010+ + '# Tem','porary path to pack a file'#010+ 'ifndef PACKDIR'#010+ - 'ifndef inl','inux'#010+ + 'ifndef inlinux'#010+ 'PACKDIR=pack_tmp'#010+ 'else'#010+ 'PACKDIR=/tmp/fpc-pack'#010+ @@ -1078,9 +1097,9 @@ const fpcmakeini : array[0..109,1..240] of char=( #010+ '# Add .zip/.tar.gz extension'#010+ 'ifdef ZIPNAME'#010+ - 'ifndef inlinux'#010+ + 'ifndef',' inlinux'#010+ 'override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)'#010+ - 'endif',#010+ + 'endif'#010+ 'endif'#010+ #010+ '# Note: This will not remove the zipfile first'#010+ @@ -1089,15 +1108,15 @@ const fpcmakeini : array[0..109,1..240] of char=( ' @$(ECHO) "Please specify ZIPNAME!"'#010+ ' @exit 1'#010+ 'else'#010+ - ' $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)'#010+ + ' $(MAKE) $(ZIPTARGET) PREFIX','INSTALLDIR=$(PACKDIR)'#010+ 'ifdef inlinux'#010+ - ' gzip -d ','$(DESTZIPDIR)/$(ZIPNAME).tar.gz'#010+ + ' gzip -d $(DESTZIPDIR)/$(ZIPNAME).tar.gz'#010+ ' cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ;'+ ' cd $(BASEDIR)'#010+ ' gzip $(DESTZIPDIR)/$(ZIPNAME).tar'#010+ 'else'#010+ - ' cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(B'+ - 'ASEDIR',')'#010+ + ' cd $(PACKDIR) ; ','$(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $'+ + '(BASEDIR)'#010+ 'endif'#010+ ' $(DELTREE) $(PACKDIR)'#010+ 'endif'#010+ @@ -1108,27 +1127,28 @@ const fpcmakeini : array[0..109,1..240] of char=( ' @$(ECHO) "Please specify ZIPNAME!"'#010+ ' @exit 1'#010+ 'else'#010+ - ' $(DEL) $(DESTZIPDIR)/$(ZIPNAME)'#010+ - ' $(MAKE) $(ZI','PTARGET) PREFIXINSTALLDIR=$(PACKDIR)'#010+ + ' ','$(DEL) $(DESTZIPDIR)/$(ZIPNAME)'#010+ + ' $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)'#010+ 'ifdef inlinux'#010+ ' cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz'+ ' * ; cd $(BASEDIR)'#010+ 'else'#010+ - ' cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(B'+ - 'ASEDIR)'#010+ + ' cd $(PACKDIR) ; $(ZIPPROG) $(DESTZI','PDIR)/$(ZIPNAME) * ; cd $'+ + '(BASEDIR)'#010+ 'endif'#010+ - ' $(D','ELTREE) $(PACKDIR)'#010+ + ' $(DELTREE) $(PACKDIR)'#010+ 'endif'#010+ #010+ #010+ '[cleanrules]'#010+ '#####################################################################'#010+ '# Clean rules'#010+ - '#####################################################################'#010+ + '################################################################','####'+ + '#'#010+ #010+ '.PHONY: fpc_clean fpc_cleanall'#010+ #010+ - 'ifdef EXTRACL','EANUNITS'#010+ + 'ifdef EXTRACLEANUNITS'#010+ 'override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))'#010+ 'endif'#010+ #010+ @@ -1136,7 +1156,7 @@ const fpcmakeini : array[0..109,1..240] of char=( 'ifdef PPUFILES'#010+ 'CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))'#010+ 'else'#010+ - 'CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLE','ANPPUFI'+ + 'CLEANPPUL','INKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFI'+ 'LES)))'#010+ 'endif'#010+ 'endif'#010+ @@ -1148,9 +1168,9 @@ const fpcmakeini : array[0..109,1..240] of char=( 'ifdef CLEANPPUFILES'#010+ ' -$(DEL) $(CLEANPPUFILES)'#010+ 'endif'#010+ - 'ifneq ($(CLEANPPULINKFILES),)'#010+ + 'ifneq ($(CLEANPPU','LINKFILES),)'#010+ ' -$(DEL) $(CLEANPPULINKFILES)'#010+ - 'en','dif'#010+ + 'endif'#010+ 'ifdef CLEANRSTFILES'#010+ ' -$(DEL) $(CLEANRSTFILES)'#010+ 'endif'#010+ @@ -1159,36 +1179,35 @@ const fpcmakeini : array[0..109,1..240] of char=( 'endif'#010+ ' -$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)'#010+ #010+ - 'fpc_cleanall: $(CLEANTARGET)'#010+ + 'fpc_','cleanall: $(CLEANTARGET)'#010+ 'ifdef CLEANEXEFILES'#010+ - ' ',' -$(DEL) $(CLEANEXEFILES)'#010+ + ' -$(DEL) $(CLEANEXEFILES)'#010+ 'endif'#010+ ' -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIB'+ 'EXT) *$(SHAREDLIBEXT) *$(PPLEXT)'#010+ ' -$(DELTREE) *$(SMARTEXT)'#010+ - ' -$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)'#010+ + ' -$(DEL) $(FP','CMADE) $(PPAS) link.res $(REDIRFILE)'#010+ #010+ #010+ - '[dependrules]',#010+ + '[dependrules]'#010+ '#####################################################################'#010+ '# Depend rules'#010+ '#####################################################################'#010+ #010+ '.PHONY: fpc_depend'#010+ #010+ - 'fpc_depend:'#010+ + 'fpc_depend:',#010+ ' $(PPDEP) $(UNITOBJECTS)'#010+ #010+ #010+ '[inforules]'#010+ - '#####','###############################################################'+ - '#'#010+ + '#####################################################################'#010+ '# Info rules'#010+ '#####################################################################'#010+ #010+ - '.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installi'+ - 'nfo \'#010+ - ' fpc_dir','info'#010+ + '.PHONY: fpc_info fpc_cfginfo fpc_object','info fpc_toolsinfo fpc_instal'+ + 'linfo \'#010+ + ' fpc_dirinfo'#010+ #010+ 'fpc_info: $(INFOTARGET)'#010+ #010+ @@ -1198,8 +1217,8 @@ const fpcmakeini : array[0..109,1..240] of char=( ' @$(ECHO) == Configuration info =='#010+ ' @$(ECHO)'#010+ ' @$(ECHO) FPC....... $(FPC)'#010+ - ' @$(ECHO) Version... $(FPC_VERSION)'#010+ - ' @$(ECHO) CPU.......',' $(CPU_TARGET)'#010+ + ' @$(ECHO) Ve','rsion... $(FPC_VERSION)'#010+ + ' @$(ECHO) CPU....... $(CPU_TARGET)'#010+ ' @$(ECHO) Source.... $(OS_SOURCE)'#010+ ' @$(ECHO) Target.... $(OS_TARGET)'#010+ ' @$(ECHO)'#010+ @@ -1208,9 +1227,9 @@ const fpcmakeini : array[0..109,1..240] of char=( 'fpc_infodirs:'#010+ 'ifdef inlinux'#010+ ' @$(ECHO)'#010+ - ' @$(ECHO) == Directory info =='#010+ + ' @$(ECH','O) == Directory info =='#010+ ' @$(ECHO)'#010+ - 'ifdef NEED','GCCLIB'#010+ + 'ifdef NEEDGCCLIB'#010+ ' @$(ECHO) GCC library is needed.'#010+ 'endif'#010+ 'ifdef NEEDOTHERLIB'#010+ @@ -1218,8 +1237,8 @@ const fpcmakeini : array[0..109,1..240] of char=( 'endif'#010+ ' @$(ECHO) Basedir......... $(BASEDIR)'#010+ ' @$(ECHO)'#010+ - ' @$(ECHO) GCC library..... $(GCCLIBDIR)'#010+ - ' ',' @$(ECHO) Other library... $(OTHERLIBDIR)'#010+ + ' ',' @$(ECHO) GCC library..... $(GCCLIBDIR)'#010+ + ' @$(ECHO) Other library... $(OTHERLIBDIR)'#010+ ' @$(ECHO)'#010+ 'endif'#010+ #010+ @@ -1228,9 +1247,9 @@ const fpcmakeini : array[0..109,1..240] of char=( ' @$(ECHO)'#010+ ' @$(ECHO) == Tools info =='#010+ ' @$(ECHO)'#010+ - ' @$(ECHO) Pwd....... $(PWD)'#010+ + ' @$(ECHO) Pwd...','.... $(PWD)'#010+ ' @$(ECHO) Echo...... $(ECHO)'#010+ - 'ifd','ef PPDEP'#010+ + 'ifdef PPDEP'#010+ ' @$(ECHO) PPDep..... $(PPDEP)'#010+ 'endif'#010+ 'ifdef PPUMOVE'#010+ @@ -1239,10 +1258,10 @@ const fpcmakeini : array[0..109,1..240] of char=( 'ifdef PPUFILES'#010+ ' @$(ECHO) PPUFiles.. $(PPUFILES)'#010+ 'endif'#010+ - 'ifdef DATA2INC'#010+ + 'ifdef DATA2IN','C'#010+ ' @$(ECHO) Data2Inc.. $(DATA2INC)'#010+ 'endif'#010+ - 'ifd','ef SED'#010+ + 'ifdef SED'#010+ ' @$(ECHO) Sed....... $(SED)'#010+ 'endif'#010+ 'ifdef DATE'#010+ @@ -1252,10 +1271,10 @@ const fpcmakeini : array[0..109,1..240] of char=( ' @$(ECHO) Diff...... $(DIFF)'#010+ 'endif'#010+ 'ifdef CMP'#010+ - ' @$(ECHO) Cmp....... $(CMP)'#010+ + ' @$(ECHO) Cmp','....... $(CMP)'#010+ 'endif'#010+ 'ifdef UPXPROG'#010+ - ' @$(ECHO) ',' Upx....... $(UPXPROG)'#010+ + ' @$(ECHO) Upx....... $(UPXPROG)'#010+ 'endif'#010+ 'ifdef ZIPPROG'#010+ ' @$(ECHO) Zip....... $(ZIPPROG)'#010+ @@ -1265,43 +1284,54 @@ const fpcmakeini : array[0..109,1..240] of char=( '[info_objects]'#010+ 'fpc_infoobjects:'#010+ ' @$(ECHO)'#010+ - ' @$(ECHO) == Object info =='#010+ + ' @$(ECHO) == Object info',' =='#010+ ' @$(ECHO)'#010+ - ' @$(ECHO) LoaderObjects','..... $(LOADEROBJECTS)'#010+ + ' @$(ECHO) LoaderObjects..... $(LOADEROBJECTS)'#010+ ' @$(ECHO) UnitObjects....... $(UNITOBJECTS)'#010+ ' @$(ECHO) ExeObjects........ $(EXEOBJECTS)'#010+ ' @$(ECHO)'#010+ - ' @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)'#010+ - ' @$(ECHO) ExtraCleanFiles... $(EX','TRACLEANFILES)'#010+ + ' @$(ECHO) ExtraCleanUnits... $(EXTRAC','LEANUNITS)'#010+ + ' @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)'#010+ ' @$(ECHO)'#010+ ' @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)'#010+ ' @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)'#010+ ' @$(ECHO)'#010+ #010+ '[info_install]'#010+ - 'fpc_infoinstall:'#010+ + 'fpc_inf','oinstall:'#010+ ' @$(ECHO)'#010+ - ' @$(ECHO) == Inst','all info =='#010+ + ' @$(ECHO) == Install info =='#010+ ' @$(ECHO)'#010+ 'ifdef DATE'#010+ ' @$(ECHO) DateStr.............. $(DATESTR)'#010+ 'endif'#010+ ' @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)'#010+ ' @$(ECHO)'#010+ - ' @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)'#010+ - ' @$(','ECHO) BinInstallDir........ $(BININSTALLDIR)'#010+ + ' @$(ECHO) ',' BaseInstallDir....... $(BASEINSTALLDIR)'#010+ + ' @$(ECHO) BinInstallDir........ $(BININSTALLDIR)'#010+ ' @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)'#010+ ' @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)'#010+ - ' @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)'#010+ - ' @$(ECHO) D','ocInstallDir........ $(DOCINSTALLDIR)'#010+ + ' @$(ECHO) SourceIns','tallDir..... $(SOURCEINSTALLDIR)'#010+ + ' @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)'#010+ ' @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR)'#010+ ' @$(ECHO)'#010+ #010+ - '[userrules]'#010+ - '#####################################################################'#010+ - '# Users rules'#010+ - '##############################','######################################'+ + '[localmakefile]'#010+ + '##########################################################','##########'+ '#'#010+ + '# Local Makefile'#010+ + '#####################################################################'#010+ + #010+ + 'ifneq ($(wildcard fpcmake.loc),)'#010+ + 'include fpcmake.loc'#010+ + 'endif'#010+ + #010+ + '[userrules]'#010+ + '####################################################################','#'+ + #010+ + '# Users rules'#010+ + '#####################################################################'#010+ + #010+ #010+ '[end]'#010 ); diff --git a/utils/fpcmake.ini b/utils/fpcmake.ini index 51286006dd..f80c209fdf 100644 --- a/utils/fpcmake.ini +++ b/utils/fpcmake.ini @@ -111,6 +111,10 @@ export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION [fpcdircheckenv] +##################################################################### +# FPCDIR Setting +##################################################################### + # Test FPCDIR to look if the RTL dir exists ifdef FPCDIR override FPCDIR:=$(subst \,/,$(FPCDIR)) @@ -137,10 +141,14 @@ ifneq ($(FPCDIR),.) UNITSDIR=$(FPCDIR)/units/$(OS_TARGET) endif +[checkfpcdirsubs] # Check if the dirs really exists, else turn it off ifeq ($(wildcard $(UNITSDIR)),) UNITSDIR= endif +ifeq ($(wildcard $(TOOLKITDIR)),) +TOOLKITDIR= +endif ifeq ($(wildcard $(PACKAGEDIR)),) PACKAGEDIR= endif @@ -149,31 +157,21 @@ COMPONENTDIR= endif -[defaultsettings] +[presettings] ##################################################################### -# Default Settings +# Pre Settings ##################################################################### -# Release ? Then force OPT and don't use extra opts via commandline -ifndef REDIRFILE -REDIRFILE=log -endif - -ifdef REDIR -ifndef inlinux -override FPC=redir -eo $(FPC) -endif -# set the verbosity to max -override OPT+=-va -override REDIR:= >> $(REDIRFILE) -endif - - [usersettings] ##################################################################### # User Settings ##################################################################### +[postsettings] +##################################################################### +# Post Settings +##################################################################### + [dir_default] ##################################################################### @@ -282,6 +280,26 @@ endif export OTHERLIBDIR +[redir] +##################################################################### +# Redirection +##################################################################### + +# Release ? Then force OPT and don't use extra opts via commandline +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 + + [command_begin] ##################################################################### # Compiler Command Line @@ -871,14 +889,14 @@ fpc_test: examples # General compile rules ##################################################################### -.PHONY: fpc_all fpc_debug +.PHONY: fpc_packages fpc_all fpc_debug -$(FPCMADE): +$(FPCMADE): $(ALLTARGET) @$(ECHO) Compiled > $(FPCMADE) -fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \ - $(addsuffix _component,$(COMPILECOMPONENTS)) \ - $(ALLTARGET) $(FPCMADE) +fpc_packages: $(addsuffix _package,$(COMPILEPACKAGES)) + +fpc_all: fpc_packages $(FPCMADE) fpc_debug: $(MAKE) all DEBUG=1 @@ -1244,9 +1262,19 @@ endif @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR) @$(ECHO) +[localmakefile] +##################################################################### +# Local Makefile +##################################################################### + +ifneq ($(wildcard fpcmake.loc),) +include fpcmake.loc +endif + [userrules] ##################################################################### # Users rules ##################################################################### + [end] diff --git a/utils/fpcmake.pp b/utils/fpcmake.pp index f4f6cbdcbd..73a7bb88de 100644 --- a/utils/fpcmake.pp +++ b/utils/fpcmake.pp @@ -150,6 +150,7 @@ type DefaultCPU : string; DirFpc, DirPackage, + DirToolkit, DirComponent, DirUnit, DirLib, @@ -160,6 +161,7 @@ type DirInc : string; RequireRTL : boolean; RequireOptions : string; + RequireToolkits, RequirePackages, RequireComponents : TTargetsString; LibName, @@ -330,8 +332,9 @@ begin { require } RequireRTL:=ReadBool(ini_require,'rtl',true); RequireOptions:=ReadString(ini_require,'options',''); - ReadTargetsString(requireComponents,ini_require,'components',''); + ReadTargetsString(requireToolkits,ini_require,'toolkit',''); ReadTargetsString(requirePackages,ini_require,'packages',''); + ReadTargetsString(requireComponents,ini_require,'components',''); if userini.RequireRTL then begin if userini.Requirepackages[0]<>'' then @@ -342,7 +345,8 @@ begin { dirs } DirFpc:=ReadString(ini_dirs,'fpcdir',''); DirPackage:=ReadString(ini_dirs,'packagedir','$(FPCDIR)/packages'); - DirComponent:=ReadString(ini_dirs,'componentdir','$(FPCDIR)/components'); + DirToolkit:=ReadString(ini_dirs,'toolkitdir',''); + DirComponent:=ReadString(ini_dirs,'componentdir',''); DirUnit:=ReadString(ini_dirs,'unitdir',''); DirLib:=ReadString(ini_dirs,'libdir',''); DirObj:=ReadString(ini_dirs,'objdir',''); @@ -450,6 +454,27 @@ end; Makefile writing *****************************************************************************} +function VarName(const s:string):string; +var + i : longint; +begin + i:=0; + result:=s; + while i'' then + begin + mf.Add('.PHONY: '+Phony); + mf.Add(''); + end; + end; + var hs : string; i : integer; @@ -736,6 +787,13 @@ begin { fpc detection } AddSection(true,'fpcdetect'); + { Pre Settings } + if userini.PreSettings.count>0 then + begin + AddSection(true,'presettings'); + AddStrings(userini.PreSettings); + end; + { fpc dir } AddSection(true,'fpcdircheckenv'); if userini.dirfpc<>'' then @@ -755,22 +813,17 @@ begin Add('ifndef PACKAGEDIR'); Add('PACKAGEDIR='+userini.dirpackage); Add('endif'); + Add('ifndef TOOLKITDIR'); + Add('TOOLKITDIR='+userini.dirtoolkit); + Add('endif'); Add('ifndef COMPONENTDIR'); Add('COMPONENTDIR='+userini.dircomponent); Add('endif'); AddSection(userini.requirertl,'fpcdirsubs'); { write the default & user settings } - AddSection(true,'defaultsettings'); AddSection(true,'usersettings'); - { Pre Settings } - if userini.PreSettings.count>0 then - begin - AddHead('Pre Settings'); - AddStrings(userini.PreSettings); - end; - { Targets } AddHead('Targets'); AddTargets('DIROBJECTS',userini.targetdirs,true); @@ -837,9 +890,8 @@ begin { Packages } AddHead('Packages'); AddTargets('PACKAGES',userini.Requirepackages,false); + AddTargets('TOOLKITS',userini.Requiretoolkits,false); AddTargets('COMPONENTS',userini.Requirecomponents,false); - AddTargetsUnitDir('$(PACKAGEDIR)',userini.Requirepackages); - AddTargetsUnitDir('$(COMPONENTDIR)',userini.Requirecomponents); { Libs } AddHead('Libraries'); @@ -869,13 +921,22 @@ begin hs:=hs+'fpc_infoinstall '; Add('INFOTARGET='+hs); end; + Add(''); { Post Settings } if userini.PostSettings.count>0 then begin - AddHead('Post Settings'); + AddSection(true,'postsettings'); AddStrings(userini.PostSettings); + Add(''); end; + + { package/component dirs } + AddHead('Package/component dirs'); + AddSection(userini.requirertl,'checkfpcdirsubs'); + AddTargetsUnitDir('$(TOOLKITDIR)',userini.Requiretoolkits); + AddTargetsUnitDir('$(PACKAGEDIR)',userini.Requirepackages); + AddTargetsUnitDir('$(COMPONENTDIR)',userini.Requirecomponents); Add(''); { write dirs } @@ -887,6 +948,9 @@ begin AddSection(true,'dir_install'); end; + { redirection } + AddSection(true,'redir'); + { commandline } if userini.section[sec_command] then begin @@ -894,6 +958,7 @@ begin AddSection(true,'command_begin'); AddSection((userini.Requireoptions<>''),'command_needopt'); AddSection((userini.dirunit<>'') or + (not TargetStringEmpty(userini.Requiretoolkits)) or (not TargetStringEmpty(userini.Requirepackages)) or (not TargetStringEmpty(userini.Requirecomponents)) ,'command_needunit'); @@ -944,41 +1009,9 @@ begin { Package requirements, must be before the other rules so it's done first } AddSection(true,'packagerequirerules'); Phony:=''; - if userini.RequireRTL then - AddPackageDep('rtl'); - Add(''); - if not TargetStringEmpty(userini.RequirePackages) then - begin - hs:=AddTargetDefines(userini.RequirePackages,'PACKAGE'); - repeat - i:=pos(' ',hs); - if i=0 then - i:=length(hs)+1; - AddPackageDep(Copy(hs,1,i-1)); - system.delete(hs,1,i); - until hs=''; - Add(''); - end; - if Phony<>'' then - begin - Add('.PHONY: '+Phony); - Add(''); - end; - - { Components } - Phony:=''; - if not TargetStringEmpty(userini.RequireComponents) then - begin - hs:=AddTargetDefines(userini.RequireComponents,'COMPONENT'); - repeat - i:=pos(' ',hs); - if i=0 then - i:=length(hs)+1; - AddPackageDep(Copy(hs,1,i-1)); - system.delete(hs,1,i); - until hs=''; - Add(''); - end; + AddTargetsPackageDep(userini.RequireToolkits); + AddTargetsPackageDep(userini.RequirePackages); + AddTargetsPackageDep(userini.RequireComponents); if Phony<>'' then begin Add('.PHONY: '+Phony); @@ -1025,6 +1058,9 @@ begin Add(''); end; + { local makefile } + AddSection(true,'localmakefile'); + { insert users rules } if userini.rules.count>0 then begin @@ -1093,7 +1129,12 @@ begin end. { $Log$ - Revision 1.20 2000-01-07 16:46:02 daniel + Revision 1.21 2000-01-08 16:31:04 peter + * support variable in packagenames + * fpcmake.loc support + * fixed place of presettings which must be before FPCDIR is set + + Revision 1.20 2000/01/07 16:46:02 daniel * copyright 2000 Revision 1.19 2000/01/06 15:49:23 peter