Browse Source

Add testppudump rule in tests/tstunits directory

git-svn-id: trunk@35943 -
pierre 8 years ago
parent
commit
ca23830b56
1 changed files with 34 additions and 0 deletions
  1. 34 0
      tests/tstunits/Makefile.fpc

+ 34 - 0
tests/tstunits/Makefile.fpc

@@ -157,6 +157,40 @@ endif
 extra : erroru$(PPUEXT) ptest$(PPUEXT) popuperr$(PPUEXT)
 extra : erroru$(PPUEXT) ptest$(PPUEXT) popuperr$(PPUEXT)
 
 
 
 
+#####################################################################
+# PPU testing targets
+#####################################################################
+
+PPULIST:=$(wildcard */*.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)
+
+%.log-ppu : %.ppu ../../compiler/utils/ppudump$(EXEEXT)
+	..$(PATHSEP)..$(PATHSEP)compiler$(PATHSEP)utils$(PATHSEP)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
 
 
 #############################
 #############################
 # Main rules
 # Main rules