+ USEENV for dotest calls to use !ENV_NAME as unique program parameter

that contians all parameters.
  + vpath %.o $(C_SUBDIR) and direct %.o from %.c or %.cc rule
    use TEST_CCOMPILER
  + test/library subdirectory added

git-svn-id: trunk@17781 -
This commit is contained in:
pierre 2011-06-21 07:23:31 +00:00
parent e3aa30f67c
commit d0b2c8c9bb
2 changed files with 56 additions and 5 deletions

View File

@ -1,5 +1,5 @@
#
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/03/23]
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/06/15]
#
default: allexectests
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@ -264,6 +264,29 @@ ifeq ($(UNITSDIR),)
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
endif
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
ifndef FPCFPMAKE
ifdef CROSSCOMPILE
ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(FPCPROG),)
FPCPROG:=$(firstword $(FPCPROG))
FPCFPMAKE:=$(shell $(FPCPROG) -PB)
ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
FPCFPMAKE:=$(firstword $(FPCPROG))
endif
else
override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
endif
else
FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
FPMAKE_SKIP_CONFIG=-n
export FPCFPMAKE
export FPMAKE_SKIP_CONFIG
endif
else
FPCFPMAKE=$(FPC)
endif
endif
override INSTALL_FPCPACKAGE=y
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
@ -1289,6 +1312,7 @@ fpc_baseinfo:
@$(ECHO) Full Target.. $(FULL_TARGET)
@$(ECHO) SourceSuffix. $(SOURCESUFFIX)
@$(ECHO) TargetSuffix. $(TARGETSUFFIX)
@$(ECHO) FPC fpmake... $(FPCFPMAKE)
@$(ECHO)
@$(ECHO) == Directory info ==
@$(ECHO)
@ -1455,6 +1479,7 @@ endif
endif
endif
TEST_OUTPUTDIR=output/$(TEST_TARGETSUFFIX)
C_SUBDIR=$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)
ifneq ($(DATE),__missing_command_DATE)
TEST_DATETIME:=$(shell $(DATE) +%Y%m%d%H%M)
endif
@ -1484,7 +1509,7 @@ endif
ifndef LOG
export LOG:=$(TEST_OUTPUTDIR)/log
endif
TESTSUBDIRS=cg cg/variants cg/cdecl opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem units/strutils
TESTSUBDIRS=cg cg/variants cg/cdecl library opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem units/strutils
TESTPACKAGESUBDIRS=packages/win-base packages/webtbs packages/hash packages/fcl-registry packages/fcl-process packages/zlib packages/fcl-db packages/fcl-base packages/fcl-xml packages/cocoaint
ifdef QUICKTEST
export QUICKTEST
@ -1525,7 +1550,7 @@ ifneq ($(TEST_CCOMPILER),)
$(MAKE) $(C_OBJECTS)
-$(COPY) $(addprefix $(C_SOURCE_DIR)/, $(CPP_SOURCES)) $(C_OBJECTS_DIR)
$(MAKE) $(CPP_OBJECTS)
-$(DEL) $(addprefix $(C_OBJECTS_DIR)/, $(C_SOURCES) $(CPP_SOURCES))
-$(DEL) $(addprefix $(C_OBJECTS_DIR)/, $(C_SOURCES) $(CPP_SOURCES))
else
$(ECHO) create_c_objects rule needs a valid C compiler in TEST_CCOMPILER variable
$(ECHO) TEST_CFLAGS variable is passed as options is used to compile the objects
@ -1621,9 +1646,14 @@ endif
ifdef EMULATOR
override DOTESTOPT+=-M$(EMULATOR)
endif
ifdef USEENV
override DOTESTENV=$(DOTESTOPT)
override DOTESTOPT=!DOTESTENV
endif
DIRS=webtbs webtbf tbs tbf $(TESTDIRS)
vpath %.log $(TEST_OUTPUTDIR)
vpath %.elg $(TEST_OUTPUTDIR)
vpath %.o $(C_SUBDIR)
%.log : %.pp
$(call QECHO," COMPILE $<")
$(Q)$(DOTEST) $(DOTESTOPT) $<
@ -1632,6 +1662,12 @@ vpath %.elg $(TEST_OUTPUTDIR)
ifdef SINGLEDOTESTRUNS
$(Q)$(DOTEST) $(DOTESTOPT) -e $<
endif
ifdef TEST_CCOMPILER
%.o : %.c
$(TEST_CCOMPILER) -c $< -o $(@D)/$(C_SUBDIR)/$(@F)
%.o : %.cc
$(TEST_CCOMPILER) -c $< -o $(@D)/$(C_SUBDIR)/$(@F)
endif
.PHONY: alltbs alltbf allwebtbs allwebtbf alltest alltests
alltbs : testprep $(patsubst %.pp,%.log,$(wildcard tbs/t*.pp))
alltbf : testprep $(patsubst %.pp,%.log,$(wildcard tbf/t*.pp))

View File

@ -85,6 +85,7 @@ endif
# Target dir where the ppu and binaries are created
TEST_OUTPUTDIR=output/$(TEST_TARGETSUFFIX)
C_SUBDIR=$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)
# Date and time the testsuite was run
ifneq ($(DATE),__missing_command_DATE)
@ -130,7 +131,7 @@ endif
# Subdirs available in the test subdir
TESTSUBDIRS=cg cg/variants cg/cdecl opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem units/strutils
TESTSUBDIRS=cg cg/variants cg/cdecl library opt units/system units/dos units/crt units/objects units/strings units/sysutils units/math units/sharemem units/strutils
TESTPACKAGESUBDIRS=packages/win-base packages/webtbs packages/hash packages/fcl-registry packages/fcl-process packages/zlib packages/fcl-db packages/fcl-base packages/fcl-xml packages/cocoaint
ifdef QUICKTEST
@ -198,7 +199,7 @@ ifneq ($(TEST_CCOMPILER),)
$(MAKE) $(C_OBJECTS)
-$(COPY) $(addprefix $(C_SOURCE_DIR)/, $(CPP_SOURCES)) $(C_OBJECTS_DIR)
$(MAKE) $(CPP_OBJECTS)
-$(DEL) $(addprefix $(C_OBJECTS_DIR)/, $(C_SOURCES) $(CPP_SOURCES))
-$(DEL) $(addprefix $(C_OBJECTS_DIR)/, $(C_SOURCES) $(CPP_SOURCES))
else
$(ECHO) create_c_objects rule needs a valid C compiler in TEST_CCOMPILER variable
$(ECHO) TEST_CFLAGS variable is passed as options is used to compile the objects
@ -325,6 +326,11 @@ override DOTESTOPT+=-M$(EMULATOR)
endif
ifdef USEENV
override DOTESTENV=$(DOTESTOPT)
override DOTESTOPT=!DOTESTENV
endif
################################
# Run tests
#
@ -333,6 +339,7 @@ DIRS=webtbs webtbf tbs tbf $(TESTDIRS)
vpath %.log $(TEST_OUTPUTDIR)
vpath %.elg $(TEST_OUTPUTDIR)
vpath %.o $(C_SUBDIR)
%.log : %.pp
$(call QECHO," COMPILE $<")
@ -344,6 +351,14 @@ ifdef SINGLEDOTESTRUNS
$(Q)$(DOTEST) $(DOTESTOPT) -e $<
endif
ifdef TEST_CCOMPILER
%.o : %.c
$(TEST_CCOMPILER) -c $< -o $(@D)/$(C_SUBDIR)/$(@F)
%.o : %.cc
$(TEST_CCOMPILER) -c $< -o $(@D)/$(C_SUBDIR)/$(@F)
endif
################################
# Compile tests
#