changeset 80:72fa445c2fbb

minor makefile cleanup
author thomask
date Fri, 29 Oct 2004 05:50:25 +0000
parents 2ef833a82afe
children 257449adcae3
files Makefile complex/command_line/complex.mak
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Fri Oct 29 05:49:41 2004 +0000
+++ b/Makefile	Fri Oct 29 05:50:25 2004 +0000
@@ -89,10 +89,10 @@
 #
 # the tools
 #
-return__ : return__.c
+$(return__) : return__.c
 	$(CC) $(CFLAGS) $< -o $@
 
-ifeq__ : ifeq__.c
+$(ifeq__) : ifeq__.c
 	$(CC) $(CFLAGS) $< -o $@
 
 basic_tools : Makefile $(ifeq__) $(return__)
@@ -165,10 +165,15 @@
 
 define analyse_run
 	@if $(ifeq__) $(z_return) 0 ; then \
-		if ./$@ $(to_log); then \
+		$(eval z_return2 = $(shell $(return__) "./$@ $(to_log)")) \
+		if $(ifeq__) $(z_return2) 0 ; then \
 			$(ECHO) "PASS:  $(z_name)"; \
 		else \
-			$(ECHO) "FAIL:  $(z_name)"; $(RM) $@; \
+			if $(ifeq__) $(z_return2) 256 ; then \
+				$(ECHO) "FAIL:  $(z_name)"; $(RM) $@; \
+			else \
+				$(ECHO) "ERROR: $(z_name) [run: $(z_return2)]"; $(RM) $@; \
+			fi \
 		fi \
 	else \
 		if $(ifeq__) $(z_return) 256 ; then \
--- a/complex/command_line/complex.mak	Fri Oct 29 05:49:41 2004 +0000
+++ b/complex/command_line/complex.mak	Fri Oct 29 05:50:25 2004 +0000
@@ -87,5 +87,5 @@
 	
 # this will be called by root's "clean" target
 complex/command_line/clean :
-	$(RM) complex/command_line/*.done complex/command_line/*.xxxx complex/command_line/*.$(ext_compile) complex/command_line/.?*$(ext_compile) complex/command_line/?*.cmdnullfail
+	$(RM) complex/command_line/*.done complex/command_line/*.xxxx complex/command_line/*.$(ext_compile) complex/command_line/.?*$(ext_compile) complex/command_line/?*.cmdnullfail complex/command_line/a.out