- if (self.relevant_contents (self.full_ly ())
- != self.relevant_contents (file (ly_file).read ())):
- return True
-
- return False
-
- def png_is_outdated (self):
- base = self.basename ()
- eps_file = find_file (base + '.eps', raise_error=False)
- png_file = find_file (base + '.png', raise_error=False)
- if self.ly_is_outdated ():
- return True
-
- if (global_options.format in (HTML, TEXINFO)
- and os.path.exists (eps_file)):
- page_count = ps_page_count (eps_file)
+ output_dir_files is the list of files in the output directory.
+ """
+ result = set ()
+ missing = set ()
+ base = self.basename()
+ full = os.path.join (output_dir, base)
+ def consider_file (name):
+ if name in output_dir_files:
+ result.add (name)
+
+ def require_file (name):
+ if name in output_dir_files:
+ result.add (name)
+ else:
+ missing.add (name)
+
+ # UGH - junk global_options
+ skip_lily = global_options.skip_lilypond_run
+ for required in [base + '.ly',
+ base + '.txt']:
+ require_file (required)
+ if not skip_lily:
+ require_file (base + '-systems.count')
+
+ map (consider_file, [base + '.tex',
+ base + '.eps',
+ base + '.texidoc',
+ base + '-systems.texi',
+ base + '-systems.tex',
+ base + '-systems.pdftexi'])
+
+ # UGH - junk global_options
+ if (base + '.eps' in result and self.format in (HTML, TEXINFO)
+ and not global_options.skip_png_check):
+ page_count = ps_page_count (full + '.eps')