+# Backup the CVS password and CVSROOT environment vars in case we change them
+$(if $(wildcard ~/.cvspass),\
+$(eval CVSPASS_BAK := $(file <~/.cvspass)))
+$(if $(CVSROOT),\
+$(eval CVSROOT_BAK := $(CVSROOT)))
+
+# The following awk program reverses the order of a list while also removing
+# duplicate entries. The effect of this when run on the dependency tree is that
+# it will remove duplicates occurring in reverse order, allowing the most deeply
+# nested libraries to be built, and linked, first.
+define AWK_REVERSE_SQUASH =
+awk \
+'
+{ for(i=NF;i>0;i--)
+ printf (!a[$$i]++) ? $$i FS : "";
+ i=split("",a);
+ print ""
+}
+'
+endef
+