+# Unless cleaning, deps should be generated for each source file
+ifeq (,$(filter clean,$(MAKECMDGOALS)))
+cGENDEP = $(if $(wildcard $1),$(subst $(dir $1),,$(filter-out $1 \ %:,$(shell $(CC) -MM -MG $1))),\
+$(info [<$1>: no deps - file not found]))
+endif
+
+# Construct the S2S function for generating source files during prerequisite
+# expansion:
+# If we are cleaning, stop. Else print the result of calling '1'. Then, unless
+# we are in -n mode, invoke the result of calling '1' in the shell
+$(if $(filter clean,$(MAKECMDGOALS)),,$(eval S2S += $$(info $$(call $$1,$$2,$$3)))\
+$(if $(filter n,$(MAKEFLAGS)),,$(eval S2S += $$(shell $$(call $$1,$$2,$$3)))))
+