]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix issue #1852: manuals needs more explicit dependencies.
authorJulien Rioux <jrioux@physics.utoronto.ca>
Fri, 2 Sep 2011 19:26:20 +0000 (15:26 -0400)
committerGraham Percival <graham@percival-music.ca>
Fri, 16 Sep 2011 14:10:32 +0000 (15:10 +0100)
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.

scripts/lilypond-book.py

index b1256529fd247ae6193b906f7e7e7ce8ab15b6cc..0814739b47b890d3278ea66a5d8dc0442fd3fbe4 100644 (file)
@@ -674,6 +674,7 @@ def main ():
     else:
         global_options.lily_output_dir = os.path.abspath(global_options.output_dir)
 
+    relative_output_dir = global_options.output_dir
 
     identify ()
     try:
@@ -686,9 +687,8 @@ def main ():
 
     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'