123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- #
- # Makefile.fpc for Free Pascal Tests directory
- #
- [defaults]
- defaultrule=alltests
- [rules]
- # Unix like OS ?
- ifeq ($(OS_TARGET),linux)
- INUNIX=1
- endif
- ifeq ($(OS_TARGET),freebsd)
- INUNIX=1
- endif
- # For linux by default no graph tests
- ifdef INUNIX
- NOGRAPH=1
- endif
- #
- # Tools
- #
- ifndef FAILLIST
- export FAILLIST:=faillist
- endif
- ifndef LONGLOG
- export LONGLOG:=longlog
- endif
- ifndef LOG
- export LOG:=log
- endif
- units : units/$(FPCMADE)
- units/$(FPCMADE):
- $(MAKE) -C units
- DOTEST=dotest$(EXEEXT)
- $(DOTEST) : units utils/dotest.pp utils/redir.pp
- $(FPC) -Fuunits -FE. utils/dotest
- testcheck: units $(DOTEST)
- #
- # Dotest options
- #
- ifneq ($(FPC),ppc386$(EXEEXT))
- override DOTESTOPT+=-c$(FPC)
- endif
- ifdef GRAPH
- override DOTESTOPT+=-g
- endif
- ifdef INTERACTIVE
- override DOTESTOPT+=-i
- endif
- #
- # Test run targets
- #
- DIRS=webtbs webtbf tbs tbf test testopt
- %.log : %.pp
- $(DOTEST) $(DOTESTOPT) $<
- %.elg : %.pp
- $(DOTEST) $(DOTESTOPT) -e $<
- #
- # Compile tests
- #
- .PHONY: alltbs alltbf allwebtbs allwebtbf alltest alltestopt alltests
- alltbs : testcheck $(patsubst %.pp,%.log,$(wildcard tbs/t*.pp))
- alltbf : testcheck $(patsubst %.pp,%.log,$(wildcard tbf/t*.pp))
- allwebtbs : testcheck $(patsubst %.pp,%.log,$(wildcard webtbs/t*.pp))
- allwebtbf : testcheck $(patsubst %.pp,%.log,$(wildcard webtbf/t*.pp))
- alltest : testcheck $(patsubst %.pp,%.log,$(wildcard test/t*.pp))
- alltestopt : testcheck $(patsubst %.pp,%.log,$(wildcard testopt/t*.pp))
- alltests: alltest alltbs alltbf allwebtbs allwebtbf
- #
- # Compile and Run tests
- #
- .PHONY: allexectbs allexectbf allexecwebtbs allexecwebtbf allexectest allexectestopt allexectests
- allexectbs : testcheck $(patsubst %.pp,%.elg,$(wildcard tbs/t*.pp))
- allexectbf : testcheck $(patsubst %.pp,%.elg,$(wildcard tbf/t*.pp))
- allexecwebtbs : testcheck $(patsubst %.pp,%.elg,$(wildcard webtbs/t*.pp))
- allexecwebtbf : testcheck $(patsubst %.pp,%.elg,$(wildcard webtbf/t*.pp))
- allexectest : testcheck $(patsubst %.pp,%.elg,$(wildcard test/t*.pp))
- allexectestopt : testcheck $(patsubst %.pp,%.elg,$(wildcard testopt/t*.pp))
- allexectests: allexectest allexectbs allexectbf allexecwebtbs allexecwebtbf
- #
- # Clean
- #
- .PHONY: clean distclean
- clean:
- -rm -f $(addsuffix /*$(PPUEXT),$(DIRS))
- -rm -f $(addsuffix /*$(OEXT),$(DIRS))
- -rm -f $(addsuffix /*.rst,$(DIRS))
- -rm -f $(addsuffix /*$(SHAREDLIBEXT),$(DIRS))
- -rm -f $(addsuffix /*.log,$(DIRS))
- -rm -f $(addsuffix /*.elg,$(DIRS))
- ifdef INUNIX
- -rm -f $(wildcard $(patsubst %.pp,%$(EXEEXT),$(wildcard $(addsuffix /t*.pp,$(DIRS)))))
- else
- -rm -f $(addsuffix /*$(EXEEXT),$(DIRS))
- endif
- -rm -f *.tmp core
- -rm -f $(LOG) $(LONGLOG) $(FAILLIST)
- -rm -f ppas.sh ppas.bat gmon.out
- distclean: clean
- -rm -f dotest$(EXEEXT) dotest$(OEXT) redir$(PPUEXT) redir$(OEXT)
- $(MAKE) -C units clean
- #
- # Main rules
- #
- .PHONY: all full
- all : allexectests
- full : clean allexectests
- info :
- @echo This Makefile allows to test the compiler
- @echo
- @echo Targets:
- @echo all - continue all tests
- @echo full - clean and run all tests
- @echo
|