Index: src/tests/.gitignore
===================================================================
--- src/tests/.gitignore	(revision 934d2006d8199ffd68cfdd4b51cc5153f436d6a9)
+++ src/tests/.gitignore	(revision d35e796665a4986536d9b811a82031f9eb52bc46)
@@ -1,2 +1,3 @@
 .out/
 .err/
+.type
Index: src/tests/preempt_longrun/Makefile.am
===================================================================
--- src/tests/preempt_longrun/Makefile.am	(revision 934d2006d8199ffd68cfdd4b51cc5153f436d6a9)
+++ src/tests/preempt_longrun/Makefile.am	(revision d35e796665a4986536d9b811a82031f9eb52bc46)
@@ -25,5 +25,10 @@
 TIME = /usr/bin/time -f "%E"
 
-BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -I.. -I. -DTEST_$(shell echo $(type) | tr a-z A-Z)
+# $(shell ./update-type $(type))
+# ./update-type $(type)
+
+UPDATED_TYPE = $(shell ./update-type $(type))
+
+BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -I.. -I. -DTEST_$(shell cat .type | tr a-z A-Z)
 CFLAGS = ${BUILD_FLAGS}
 CC = @CFA_BINDIR@/@CFA_NAME@
@@ -45,7 +50,7 @@
 
 clean-local:
-	rm -f ${TESTS} core* out.log
+	rm -f ${TESTS} core* out.log .type
 
-% : %.c ${CC}
+% : %.c ${CC} ${UPDATED_TYPE}
 	${AM_V_GEN}${CC} ${CFLAGS} ${<} $(debug) -o ${@}
 
Index: src/tests/preempt_longrun/Makefile.in
===================================================================
--- src/tests/preempt_longrun/Makefile.in	(revision 934d2006d8199ffd68cfdd4b51cc5153f436d6a9)
+++ src/tests/preempt_longrun/Makefile.in	(revision d35e796665a4986536d9b811a82031f9eb52bc46)
@@ -456,5 +456,9 @@
 WATCHDOG = ${abs_top_srcdir}/tools/watchdog
 TIME = /usr/bin/time -f "%E"
-BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -I.. -I. -DTEST_$(shell echo $(type) | tr a-z A-Z)
+
+# $(shell ./update-type $(type))
+# ./update-type $(type)
+UPDATED_TYPE = $(shell ./update-type $(type))
+BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -I.. -I. -DTEST_$(shell cat .type | tr a-z A-Z)
 TESTS = block coroutine create disjoint enter enter3 processor stack wait yield
 all: all-am
@@ -889,7 +893,7 @@
 
 clean-local:
-	rm -f ${TESTS} core* out.log
-
-% : %.c ${CC}
+	rm -f ${TESTS} core* out.log .type
+
+% : %.c ${CC} ${UPDATED_TYPE}
 	${AM_V_GEN}${CC} ${CFLAGS} ${<} $(debug) -o ${@}
 
Index: src/tests/preempt_longrun/update-type
===================================================================
--- src/tests/preempt_longrun/update-type	(revision d35e796665a4986536d9b811a82031f9eb52bc46)
+++ src/tests/preempt_longrun/update-type	(revision d35e796665a4986536d9b811a82031f9eb52bc46)
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+if [ "$#" -ne 1 ]
+then
+	echo "illegal number of parameters, must be 1 was $#"
+	exit
+fi
+
+NEW="$(echo $1 | tr a-z A-Z)"
+TYPE_FILE=".type"
+if [ -f "$TYPE_FILE" ]
+then
+	OLD="$(cat $TYPE_FILE | tr a-z A-Z)"
+	if [ $OLD == $NEW ]
+	then
+		echo > /dev/null
+		# echo "$TYPE_FILE stayed unchanged"
+	else
+		echo "$NEW" > "$TYPE_FILE"
+		# echo "$TYPE_FILE changed from '$OLD' to '$NEW'"
+	fi
+else
+	echo "$NEW" > "$TYPE_FILE"
+fi
+echo "$TYPE_FILE"
