fpc/utils/Makefile.fpc
pierre 9e0530caa8 Group merge of changes to fpmake.pp for pacakges and utils
with fpmkunit change.

------------------------------------------------------------------------
r40365 | pierre | 2018-11-24 15:14:57 +0000 (Sat, 24 Nov 2018) | 4 lines

  + Add Debug message when resource file is found, but not registered.
  + Add missing "T.ResourceStrings:=True;" for all source units
    that generate the new debug message above.

------------------------------------------------------------------------
--- Merging r40365 into '.':
U    packages/mysql/fpmake.pp
U    packages/fcl-base/fpmake.pp
U    packages/fcl-web/fpmake.pp
U    packages/fcl-db/fpmake.pp
U    packages/fcl-pdf/fpmake.pp
U    packages/fcl-image/fpmake.pp
U    packages/pastojs/fpmake.pp
U    packages/fcl-passrc/fpmake.pp
U    packages/rtl-objpas/fpmake.pp
U    packages/openssl/fpmake.pp
U    packages/winunits-base/fpmake.pp
U    packages/fpmkunit/src/fpmkunit.pp
--- Recording mergeinfo for merge of r40365 into '.':
 U   .
------------------------------------------------------------------------
r40391 | pierre | 2018-11-28 23:45:35 +0000 (Wed, 28 Nov 2018) | 1 line

 Add several missing unit references in fpmake files
------------------------------------------------------------------------
--- Merging r40391 into '.':
U    utils/pas2ut/fpmake.pp
U    utils/fpdoc/fpmake.pp
U    utils/pas2js/fpmake.pp
U    utils/fppkg/fpmake.pp
U    utils/fpcmkcfg/fpmake.pp
U    utils/fpmake.pp
U    utils/unicode/fpmake.pp
--- Recording mergeinfo for merge of r40391 into '.':
 G   .
------------------------------------------------------------------------
r40899 | pierre | 2019-01-19 10:26:51 +0000 (Sat, 19 Jan 2019) | 1 line

 Activate fpc-web package for android OS, except for jvm compiler
------------------------------------------------------------------------
--- Merging r40899 into '.':
G    packages/fcl-web/fpmake.pp
--- Recording mergeinfo for merge of r40899 into '.':
 G   .
------------------------------------------------------------------------
r41069 | pierre | 2019-01-25 12:58:21 +0000 (Fri, 25 Jan 2019) | 1 line

 Disable targets that do not support fcl-base for utils packages that need fcl-base
------------------------------------------------------------------------
--- Merging r41069 into '.':
G    utils/pas2ut/fpmake.pp
G    utils/fpdoc/fpmake.pp
U    utils/json2pas/fpmake.pp
U    utils/fpcreslipo/fpmake.pp
G    utils/fpcmkcfg/fpmake.pp
G    utils/fpmake.pp
U    utils/fpcres/fpmake.pp
U    utils/fpcm/fpmake.pp
G    utils/unicode/fpmake.pp
U    utils/pas2fpm/fpmake.pp
U    utils/instantfpc/fpmake.pp
U    utils/importtl/fpmake.pp
--- Recording mergeinfo for merge of r41069 into '.':
 G   .
------------------------------------------------------------------------
r41070 | pierre | 2019-01-25 14:39:12 +0000 (Fri, 25 Jan 2019) | 1 line

 Enable paszlib package and disable utils/fpcm and utils/fpcmkcfg for nativent OS
------------------------------------------------------------------------
--- Merging r41070 into '.':
U    packages/paszlib/fpmake.pp
G    utils/fpcmkcfg/fpmake.pp
G    utils/fpcm/fpmake.pp
--- Recording mergeinfo for merge of r41070 into '.':
 G   .
------------------------------------------------------------------------
r41076 | pierre | 2019-01-26 10:17:58 +0000 (Sat, 26 Jan 2019) | 1 line

 Also use installed ppudump for ppu testing in utils directory
------------------------------------------------------------------------
--- Merging r41076 into '.':
U    utils/Makefile.fpc
U    utils/Makefile
--- Recording mergeinfo for merge of r41076 into '.':
 G   .
------------------------------------------------------------------------
r41104 | pierre | 2019-01-28 17:43:15 +0000 (Mon, 28 Jan 2019) | 1 line

 -Xr is also supported for systems_android
------------------------------------------------------------------------
--- Merging r41104 into '.':
U    compiler/options.pas
--- Recording mergeinfo for merge of r41104 into '.':
 G   .
------------------------------------------------------------------------
r41106 | pierre | 2019-01-29 09:01:42 +0000 (Tue, 29 Jan 2019) | 1 line

 Disable jvm-android and jvm-java targets for fprcp, h2pas and tply packages because they use memory allocation or fpc_get_output
------------------------------------------------------------------------
--- Merging r41106 into '.':
U    utils/fprcp/fpmake.pp
U    utils/h2pas/fpmake.pp
U    utils/tply/fpmake.pp
--- Recording mergeinfo for merge of r41106 into '.':
 G   .
------------------------------------------------------------------------
r41119 | pierre | 2019-01-29 13:46:43 +0000 (Tue, 29 Jan 2019) | 1 line

 Disable palmos in fprcp, h2pas and tply packages
------------------------------------------------------------------------
--- Merging r41119 into '.':
G    utils/fprcp/fpmake.pp
G    utils/h2pas/fpmake.pp
G    utils/tply/fpmake.pp
--- Recording mergeinfo for merge of r41119 into '.':
 G   .
------------------------------------------------------------------------
r41120 | pierre | 2019-01-29 14:08:03 +0000 (Tue, 29 Jan 2019) | 1 line

 Disable fprcp, h2pas and tply pacakges for msdos and win16 because the programs are too big
------------------------------------------------------------------------
--- Merging r41120 into '.':
G    utils/fprcp/fpmake.pp
G    utils/h2pas/fpmake.pp
G    utils/tply/fpmake.pp
--- Recording mergeinfo for merge of r41120 into '.':
 G   .
------------------------------------------------------------------------
r41121 | pierre | 2019-01-29 14:17:53 +0000 (Tue, 29 Jan 2019) | 1 line

 Disable atari target for fpcm and fpcmkcfg because it depends on unsupported fpmkunit package
------------------------------------------------------------------------
--- Merging r41121 into '.':
G    utils/fpcmkcfg/fpmake.pp
G    utils/fpcm/fpmake.pp
--- Recording mergeinfo for merge of r41121 into '.':
 G   .
------------------------------------------------------------------------
r41122 | pierre | 2019-01-29 14:32:28 +0000 (Tue, 29 Jan 2019) | 1 line

 Disable some packages for avr-embedded and i8086-embedded targets
------------------------------------------------------------------------
--- Merging r41122 into '.':
G    utils/fprcp/fpmake.pp
G    utils/h2pas/fpmake.pp
G    utils/tply/fpmake.pp
--- Recording mergeinfo for merge of r41122 into '.':
 G   .
------------------------------------------------------------------------
r41142 | pierre | 2019-01-30 12:55:04 +0000 (Wed, 30 Jan 2019) | 1 line

 Disable jvm-android as fcl-json is not supported for this target
------------------------------------------------------------------------
--- Merging r41142 into '.':
G    utils/pas2js/fpmake.pp
--- Recording mergeinfo for merge of r41142 into '.':
 G   .
------------------------------------------------------------------------
r41150 | pierre | 2019-01-31 11:20:34 +0000 (Thu, 31 Jan 2019) | 1 line

 Disable pas2js for jvm compiler
------------------------------------------------------------------------
--- Merging r41150 into '.':
G    utils/pas2js/fpmake.pp
--- Recording mergeinfo for merge of r41150 into '.':
 G   .

git-svn-id: branches/fixes_3_2@41193 -
2019-02-03 16:51:17 +00:00

156 lines
5.2 KiB
Makefile

#
# Makefile.fpc for running fpmake
#
[require]
packages=rtl fpmkunit fcl-json
[install]
fpcpackage=y
fpcsubdir=utils
[default]
fpcdir=..
[prerules]
# Translate INSTALL_UNITDIR to fpmake's --unitinstalldir parameter
ifdef INSTALL_UNITDIR
FPMAKE_INSTALL_OPT+=--unitinstalldir=$(INSTALL_UNITDIR)
endif
ifdef INSTALL_BINDIR
FPMAKE_INSTALL_OPT+=--bininstalldir=$(INSTALL_BINDIR)
endif
# Translate OS_TARGET and CPU_TARGET to fpmake's --os and --cpu parameters
ifdef OS_TARGET
FPC_TARGETOPT+=--os=$(OS_TARGET)
endif
ifdef CPU_TARGET
FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
endif
FPMAKE_BIN_CLEAN=$(wildcard ./fpmake$(SRCEXEEXT))
LOCALFPMAKE=./fpmake$(SRCEXEEXT)
SUB_FPMAKE_SRCS=$(wildcard */fpmake.pp)
[rules]
# Do not pass the Makefile's unit and binary target locations. Fpmake uses it's own.
override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
# Do not pass the package-unitdirectories. Fpmake adds those and this way they don't apear in the .fpm
override FPCOPT:=$(filter-out $(addprefix -Fu,$(COMPILER_UNITDIR)),$(FPCOPT))# Compose general fpmake-parameters
# Compose general fpmake-parameters
ifdef FPMAKEOPT
FPMAKE_OPT+=$(FPMAKEOPT)
endif
FPMAKE_OPT+=--localunitdir=..
FPMAKE_OPT+=--globalunitdir=../packages
FPMAKE_OPT+=$(FPC_TARGETOPT)
FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
FPMAKE_OPT+=--compiler=$(FPC)
FPMAKE_OPT+=-bu
ifndef BUILDFULLNATIVE
FPMAKE_OPT+=-scp
endif
.NOTPARALLEL:
fpmake$(SRCEXEEXT): fpmake.pp $(SUB_FPMAKE_SRCS) fpmake_add.inc fpmake_proc.inc
$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
all: fpmake$(SRCEXEEXT)
$(LOCALFPMAKE) compile $(FPMAKE_OPT)
smart: fpmake$(SRCEXEEXT)
$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
release: fpmake$(SRCEXEEXT)
$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
debug: fpmake$(SRCEXEEXT)
$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
# most often fail because the dependencies are cleared.
# In case of a clean, simply do nothing
ifeq ($(FPMAKE_BIN_CLEAN),)
clean:
else
clean:
$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
endif
CLEAN_TARGET_DIRS=$(subst /Makefile.fpc, ,$(wildcard */Makefile.fpc))
%_distclean:
$(MAKE) -C $* distclean
# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
# when the package is compiled using fpcmake prior to running this clean using fpmake
ifeq ($(FPMAKE_BIN_CLEAN),)
distclean: fpc_cleanall $(addsuffix _distclean,$(CLEAN_TARGET_DIRS))
else
distclean:
ifdef inUnix
{ $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi; }
else
$(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
endif
-$(DEL) $(LOCALFPMAKE)
-$(DEL) fpmake.o
-$(DEL) fpmake.dbg
endif
cleanall: distclean
install: fpmake$(SRCEXEEXT)
ifdef UNIXHier
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) $(FPMAKE_INSTALL_OPT)
else
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --baseinstalldir=$(INSTALL_BASEDIR) $(FPMAKE_INSTALL_OPT)
endif
# distinstall also installs the example-sources and omits the location of the source-
# files from the fpunits.cfg files.
distinstall: fpmake$(SRCEXEEXT)
ifdef UNIXHier
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) $(FPMAKE_INSTALL_OPT) -ie -fsp 0
else
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --baseinstalldir=$(INSTALL_BASEDIR) $(FPMAKE_INSTALL_OPT) -ie -fsp 0
endif
zipinstall: fpmake$(SRCEXEEXT)
$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
zipdistinstall: fpmake$(SRCEXEEXT)
$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie -fsp 0
zipsourceinstall: fpmake$(SRCEXEEXT)
ifdef UNIXHier
$(LOCALFPMAKE) archive $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) --prefix=share/src/fpc-\$$\(PACKAGEVERSION\)/$(INSTALL_FPCSUBDIR)/\$$\(PACKAGEDIRECTORY\)
else
$(LOCALFPMAKE) archive $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) --prefix=source\\$(INSTALL_FPCSUBDIR)\\\$$\(PACKAGEDIRECTORY\)
endif
#####################################################################
# PPU testing targets
#####################################################################
PPULIST:=$(wildcard */units/*/*.ppu) $(wildcard units/*/*.ppu)
PPULOGLIST:=$(subst .ppu,.log-ppu,$(PPULIST))
RMPPULOGLIST:=$(subst .ppu,.rm-log-ppu,$(PPULIST))
.PHONY : ppulogs cleanppulogs testppudump $(RMPPULOGLIST)
ppulogs : $(PPULOGLIST)
vpath %.ppu $(ALLPPUDIRS)
vpath %.log-ppu $(ALLPPUDIRS)
vpath %.rm-log-ppu $(ALLPPUDIRS)
# Do not try to recompile ppudump, as this does not work if trying to test cross-compiled units
%.log-ppu : %.ppu
ppudump -VA -M $< > $@
%.rm-log-ppu : %.ppu ../compiler/utils/ppudump$(EXEEXT)
-$(RMPROG) $<
../compiler/utils/ppudump$(EXEEXT):
$(MAKE) -C $(COMPILERDIR)/utils ppudump$(EXEEXT)
ppuinfo :
echo PPU list is "$(PPULIST)"
echo PPULOG list is "$(PPULOGLIST)"
cleanppulogs : $(RMPPULOGLIST)
testppudump :
$(MAKE) cleanppulogs ppulogs