-
- tex_file = '%s.tex' % base
- eps_file = '%s.eps' % base
- system_file = '%s-systems.tex' % base
- ly_file = '%s.ly' % base
- ok = os.path.exists (ly_file) \
- and os.path.exists (system_file)\
- and os.stat (system_file)[stat.ST_SIZE] \
- and re.match ('% eof', open (system_file).readlines ()[-1])
- if ok and (not global_options.use_hash or FILENAME in self.option_dict):
- ok = (self.full_ly () == open (ly_file).read ())
- if ok:
- # TODO: Do something smart with target formats
- # (ps, png) and m/ctimes.
+ ly_file = base + '.ly'
+ tex_file = base + '.tex'
+ eps_file = base + '.eps'
+ systems_file = base + '-systems.tex'
+
+ if (os.path.exists (ly_file)
+ and os.path.exists (systems_file)
+ and os.stat (systems_file)[stat.ST_SIZE]
+ and re.match ('% eof', open (systems_file).readlines ()[-1])
+ and (global_options.use_hash or FILENAME in self.option_dict)
+ and (self.relevant_contents (self.full_ly ())
+ == self.relevant_contents (open (ly_file).read ()))):