Browse Source

* added rule to recompile ctest.c if gcc is found

pierre 23 years ago
parent
commit
a94a788ea1
2 changed files with 24 additions and 1 deletions
  1. 11 1
      tests/Makefile
  2. 13 0
      tests/Makefile.fpc

+ 11 - 1
tests/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 1.1 [2002/11/18]
+# Don't edit, this file is generated by FPCMake Version 1.1 [2002/09/26]
 #
 default: allexectests
 MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx
@@ -1066,6 +1066,12 @@ endif
 ifndef LOG
 export LOG:=log
 endif
+ifndef CCOMPILER
+CCOMPILER:=$(strip $(wildcard $(addsuffix /gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CCOMPILER),)
+CCOMPILER:=$(firstword $(CCOMPILER))
+endif
+endif
 units : units/$(FPCMADE)
 units/$(FPCMADE):
 	$(MAKE) -C units
@@ -1093,6 +1099,10 @@ DIRS=webtbs webtbf tbs tbf test test/cg test/units/system test/units/dos test/un
 %.elg : %.pp
 	$(DOTEST) $(DOTESTOPT) -e $<
 .PHONY: allpreps
+ifdef CCOMPILER
+test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o : test/cg/obj/ctest.c
+	-$(CCOMPILER) -c -o test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o test/cg/obj/ctest.c
+endif
 allpreps: allpreps-stamp.$(OS_TARGET)
 allpreps-stamp.$(OS_TARGET):
 	$(FPC) -FE. -Fuunits test/cg/ptest.pp

+ 13 - 0
tests/Makefile.fpc

@@ -47,6 +47,13 @@ ifndef LOG
 export LOG:=log
 endif
 
+ifndef CCOMPILER
+CCOMPILER:=$(strip $(wildcard $(addsuffix /gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CCOMPILER),)
+CCOMPILER:=$(firstword $(CCOMPILER))
+endif
+endif
+
 units : units/$(FPCMADE)
 units/$(FPCMADE):
         $(MAKE) -C units
@@ -99,6 +106,12 @@ DIRS=webtbs webtbf tbs tbf test test/cg test/units/system test/units/dos test/un
 
 .PHONY: allpreps
 
+
+ifdef CCOMPILER
+test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o : test/cg/obj/ctest.c
+	-$(CCOMPILER) -c -o test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o test/cg/obj/ctest.c
+endif
+
 allpreps: allpreps-stamp.$(OS_TARGET)
 allpreps-stamp.$(OS_TARGET):
         $(FPC) -FE. -Fuunits test/cg/ptest.pp