Dependencies are already being tracker by lilypond-book.py,
which produces .dep files containing make rules. The file
stepmake/stepmake/generic-targets.make includes them into
the build.
The problem is that the .dep files contain errors.
We fix the .dep files produced by lilypond-book.py by
1) using the relative path to the target file,
2) using the correct file extension for the target file.
else:
global_options.lily_output_dir = os.path.abspath(global_options.output_dir)
+ relative_output_dir = global_options.output_dir
identify ()
try:
base_file_name = os.path.splitext (os.path.basename (files[0]))[0]
dep_file = os.path.join (global_options.output_dir, base_file_name + '.dep')
- final_output_file = os.path.join (global_options.output_dir,
- base_file_name
- + '.%s' % global_options.format)
+ final_output_file = os.path.join (relative_output_dir,
+ base_file_name + global_options.formatter.default_extension)
os.chdir (original_dir)
file (dep_file, 'w').write ('%s: %s'