Browse Source

more descriptive log

pierre 25 years ago
parent
commit
269ba41fe1
2 changed files with 64 additions and 121 deletions
  1. 45 116
      tests/Makefile
  2. 19 5
      tests/Makefile.fpc

+ 45 - 116
tests/Makefile

@@ -1,5 +1,5 @@
 #
-# Makefile generated by fpcmake v0.99.13 [2000/02/24]
+# Makefile generated by fpcmake v0.99.13 [2000/03/22]
 #
 
 defaultrule: info
@@ -14,9 +14,9 @@ defaultrule: info
 override PATH:=$(subst \,/,$(PATH))
 
 # Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
+PWD=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
 ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
+PWD=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
 ifeq ($(PWD),)
 nopwd:
 	@echo You need the GNU utils package to use this Makefile!
@@ -52,105 +52,47 @@ else
 EXEEXT=.exe
 endif
 
-# The path which is searched separated by spaces
+# The path which is search 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
+export FPC=ppos2$(EXEEXT)
 else
-FPC=ppc386
+export FPC=ppc386$(EXEEXT)
 endif
 endif
-endif
-override FPC:=$(subst $(EXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(EXEEXT)
 
 # Target OS
 ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
+export 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)
+export OS_SOURCE=$(shell $(FPC) -iSO)
 endif
 
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
+# FPC_CPU
+ifndef FPC_CPU
+export FPC_CPU=$(shell $(FPC) -iTP)
 endif
 
 # FPC version
 ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
+export FPC_VERSION=$(shell $(FPC) -iV)
 endif
 
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
 
-#####################################################################
-# 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
@@ -192,8 +134,7 @@ ASMEXT=.s
 SMARTEXT=.sl
 STATICLIBEXT=.a
 SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
+PACKAGESUFFIX=
 
 # Go32v1
 ifeq ($(OS_TARGET),go32v1)
@@ -203,17 +144,17 @@ ASMEXT=.s1
 SMARTEXT=.sl1
 STATICLIBEXT=.a1
 SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
+PACKAGESUFFIX=v1
 endif
 
 # Go32v2
 ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
+PACKAGESUFFIX=go32
 endif
 
 # Linux
 ifeq ($(OS_TARGET),linux)
-FPCMADE=fpcmade.lnx
+PACKAGESUFFIX=linux
 endif
 
 # Win32
@@ -224,7 +165,7 @@ ASMEXT=.sw
 SMARTEXT=.slw
 STATICLIBEXT=.aw
 SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
+PACKAGESUFFIX=win32
 endif
 
 # OS/2
@@ -235,7 +176,7 @@ OEXT=.oo2
 SMARTEXT=.so
 STATICLIBEXT=.ao2
 SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
+PACKAGESUFFIX=os2
 endif
 
 # library prefix
@@ -267,55 +208,30 @@ endif
 # Default Directories
 #####################################################################
 
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
 # set the prefix directory where to install everything
 ifndef PREFIXINSTALLDIR
 ifdef inlinux
-PREFIXINSTALLDIR=/usr
+export PREFIXINSTALLDIR=/usr
 else
-PREFIXINSTALLDIR=/pp
+export PREFIXINSTALLDIR=/pp
 endif
 endif
-export PREFIXINSTALLDIR
 
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
 
-#####################################################################
-# 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
-#####################################################################
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
 
 #####################################################################
 # Users rules
 #####################################################################
 
+
 # For linux by default no graph tests
 ifdef inlinux
 NOGRAPH=1
@@ -338,6 +254,13 @@ tests : clean all_compilations
 
 cont_tests : all_compilations
 
+setdate :
+	$(FPC) setdate.pp
+	setdate$(EXEEXT)
+	call setdate.bat
+
+.PHONY : setdate
+
 getret$(EXEEXT) : getret.pp
 	$(FPC) getret
 
@@ -374,7 +297,7 @@ testsuccess:
 else
 testsuccess:
 	@echo "Test for $(FILE) fails (does not compile) error $(RETVAL)"
-	@echo "Test for $(FILE) fails (does not compile) error $(RETVAL)" >>$(LOG)
+	@echo "Test for $(FILE) fails (does not compile) error $(RETVAL)" >> $(LOG)
 ifdef LONGLOG
 	@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" >> $(LONGLOG)
 	@echo "Test for $(FILE) fails (does not compile) error $(RETVAL)" >> $(LONGLOG)
@@ -382,8 +305,8 @@ ifdef LONGLOG
 	cat $(FILE).log >> $(LONGLOG)
 	@echo "" >> $(LONGLOG)
 endif
-	@echo $(FILE) >> ts_fail
-	@echo $(FILE) >> faillist
+	@echo $(FILE) does not compile >> ts_fail
+	@echo $(FILE) does not compile error $(RETVAL) >> faillist
 endif
 
 ifdef EXCFILE
@@ -404,6 +327,7 @@ else
 testexecsuccess:
 	@echo "Test for exec $(FILE) fails exec error $(EXERETVAL)"
 	@echo "Test for exec $(FILE) fails exec error $(EXERETVAL)" >> $(LOG)
+	@echo "Running $(FILE) fails with error $(EXERETVAL)" >> faillist
 ifdef LONGLOG
 	@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" >> $(LONGLOG)
 	@echo "Test for exec $(FILE) fails exec error $(EXERETVAL)" >> $(LONGLOG)
@@ -432,6 +356,10 @@ testexec:
 ifeq ($(wildcard $(FILE)$(PPUEXT)),$(FILE)$(PPUEXT))
 	@echo "file is a unit $(FILE)$(PPUEXT)"
 	@echo "unit" > $(FILE).elg
+else
+ifeq ($(wildcard $(FILE).dll),$(FILE).dll)
+	@echo "file is a DLL $(FILE)$(PPUEXT)"
+	@echo "DLL" > $(FILE).elg
 else
 	@echo "No exefile $(FILE)$(EXEEXT)"
 	@echo $(FILE) >> faillist
@@ -440,6 +368,7 @@ ifdef LONGLOG
 endif
 endif
 endif
+endif
 
 test_exc :
 	@echo $(wildcard $(FILE).exc*)
@@ -458,7 +387,7 @@ ifdef LONGLOG
 	@echo "Test for $(FILE) fails (does compile and should not)" >> $(LONGLOG)
 endif
 	@echo $(FILE) >> tf_fail
-	@echo $(FILE) >> faillist
+	@echo $(FILE) compiles >> faillist
 endif
 
 ifndef LONGLOG

+ 19 - 5
tests/Makefile.fpc

@@ -32,6 +32,13 @@ tests : clean all_compilations
 
 cont_tests : all_compilations
 
+setdate :
+	$(FPC) setdate.pp
+	setdate$(EXEEXT)
+	call setdate.bat
+
+.PHONY : setdate
+
 getret$(EXEEXT) : getret.pp
         $(FPC) getret
 
@@ -68,7 +75,7 @@ testsuccess:
 else
 testsuccess:
         @echo "Test for $(FILE) fails (does not compile) error $(RETVAL)"
-        @echo "Test for $(FILE) fails (does not compile) error $(RETVAL)" >>$(LOG)
+        @echo "Test for $(FILE) fails (does not compile) error $(RETVAL)" >> $(LOG)
 ifdef LONGLOG
         @echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" >> $(LONGLOG)
         @echo "Test for $(FILE) fails (does not compile) error $(RETVAL)" >> $(LONGLOG)
@@ -76,8 +83,8 @@ ifdef LONGLOG
         cat $(FILE).log >> $(LONGLOG)
         @echo "" >> $(LONGLOG)
 endif
-        @echo $(FILE) >> ts_fail
-        @echo $(FILE) >> faillist
+        @echo $(FILE) does not compile >> ts_fail
+        @echo $(FILE) does not compile error $(RETVAL) >> faillist
 endif
 
 ifdef EXCFILE
@@ -98,6 +105,7 @@ else
 testexecsuccess:
         @echo "Test for exec $(FILE) fails exec error $(EXERETVAL)"
         @echo "Test for exec $(FILE) fails exec error $(EXERETVAL)" >> $(LOG)
+        @echo "Running $(FILE) fails with error $(EXERETVAL)" >> faillist
 ifdef LONGLOG
         @echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" >> $(LONGLOG)
         @echo "Test for exec $(FILE) fails exec error $(EXERETVAL)" >> $(LONGLOG)
@@ -126,6 +134,10 @@ testexec:
 ifeq ($(wildcard $(FILE)$(PPUEXT)),$(FILE)$(PPUEXT))
         @echo "file is a unit $(FILE)$(PPUEXT)"
         @echo "unit" > $(FILE).elg
+else
+ifeq ($(wildcard $(FILE).dll),$(FILE).dll)
+        @echo "file is a DLL $(FILE)$(PPUEXT)"
+        @echo "DLL" > $(FILE).elg
 else
         @echo "No exefile $(FILE)$(EXEEXT)"
         @echo $(FILE) >> faillist
@@ -134,6 +146,7 @@ ifdef LONGLOG
 endif
 endif
 endif
+endif
 
 test_exc :
         @echo $(wildcard $(FILE).exc*)
@@ -151,8 +164,8 @@ testfail:
 ifdef LONGLOG
         @echo "Test for $(FILE) fails (does compile and should not)" >> $(LONGLOG)
 endif
-        @echo $(FILE) >> tf_fail
-        @echo $(FILE) >> faillist
+	@echo $(FILE) >> tf_fail
+        @echo $(FILE) compiles >> faillist
 endif
 
 ifndef LONGLOG
@@ -315,3 +328,4 @@ info :
         @echo created behave like the should
         @echo run \'make tesiexec\' to test executables
         @echo that require interactive mode
+