[elisp] fix circular dep in template makefiles