--- lilypond-book 2005/04/02 22:49:45 1.1.1.3 +++ lilypond-book 2005/04/02 22:50:31 1.1.1.4 @@ -147,6 +147,7 @@ TEXINFO = 'texinfo' VERBATIM = 'verbatim' FONTLOAD = 'fontload' +FILENAME = 'filename' # NOTIME has no opposite so it isn't part of this dictionary. @@ -384,7 +385,8 @@ PRINTFILENAME, TEXIDOC, VERBATIM, - FONTLOAD + FONTLOAD, + FILENAME ] ly_options = { @@ -862,6 +864,8 @@ return self.hash def basename (self): + if FILENAME in self.option_dict: + return self.option_dict[FILENAME] if use_hash_p: return 'lily-%d' % self.get_hash () raise 'to be done' @@ -883,8 +887,9 @@ 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 (use_hash_p \ - or self.ly () == open (ly_file).read ()): + if ok and (not use_hash_p 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. return None