generate .x files for template too