diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index 13e13553b8..e070b6b5e2 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -107,7 +107,7 @@ COMPILE_MSA = $(call COMPILE,CC,MSAFLAGS)
 %.c %.h %.pc %.ver %.version: TAG = GEN
 
 # Dummy rule to stop make trying to rebuild removed or renamed headers
-%.h:
+%.h %_template.c:
 	@:
 
 # Disable suffix rules.  Most of the builtin rules are suffix rules,