score:1

according http://www.gnu.org/software/make/manual/make.html you can use old-fashioned suffix rules:

source_xyz_files = a.xyz b.xyz
.xyz.cpp: $(source_xyz_files)
    if test "`dirname $@`" != "."; then mkdir -p "`dirname $@`"; fi
    tool_to_create_cpp_and_h_from_xyz $< $@ $(patsubst %.cpp,%.h,$@)
local_src_files += $(patsubst %.xyz,%.cpp,$(source_xyz_files))

or patter rules:

generated_cpp_files = a.cpp b.cpp
$(generated_cpp_files) : %.cpp : %.xyz
    if test "`dirname $@`" != "."; then mkdir -p "`dirname $@`"; fi
    tool_to_create_cpp_and_h_from_xyz $< $@ $(patsubst %.cpp,%.h,$@)
local_src_files += $(generated_cpp_files)

Related Query

More Query from same tag