+ test -L $D/last || ln -s $F $D/last )
+
+
+# Automatic rebuilding when flags or commands changes
+######################################################
+
+# Re-compile C files if one of this variables changes
+COMPILE.c.FLAGS += $(CC) ~ $(CPPFLAGS) ~ $(CFLAGS) ~ $(TARGET_ARCH)
+
+# Re-compile C++ files if one of this variables changes
+COMPILE.cpp.FLAGS += $(CXX) ~ $(CPPFLAGS) ~ $(CXXFLAGS) ~ $(TARGET_ARCH)
+
+# Re-link binaries and libraries if one of this variables changes
+LINK.o.FLAGS += $(LD) ~ $(LDFLAGS) ~ $(TARGET_ARCH)
+
+# Create a file with flags used to trigger rebuilding when they change. The
+# first argument is the name of the file where to store the flags, the second
+# are the flags and the third argument is a text to be displayed if the flags
+# have changed. This should be used as a rule action or something where
+# a shell script is expected.
+gen_rebuild_flags = if test x"$2" != x"`cat $1 2>/dev/null`"; then \
+ test -f $1 && echo "$3"; \
+ echo "$2" > $1 ; fi
+
+# Create files containing the current flags to trigger a rebuild if they change
+setup_flag_files__ := $(shell \