Use smerl to compile template