X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Flilypond-book.py;h=824cbabef9f5a69cdc081ba0223eddae1d303df5;hb=91708b30fba67f8fd589980e03ff420c26473a5a;hp=23db86898596e024d27ebf73901e40ae26725240;hpb=dd41d8981e1e7c4255ae155f03822f893048c55d;p=lilypond.git diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 23db868985..824cbabef9 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -1244,20 +1244,13 @@ class Lilypond_snippet (Snippet): str = '' if PRINTFILENAME in self.option_dict: base = self.basename () - filename = self.substring ('filename') - str = output[global_options.format][PRINTFILENAME] % vars () + filename = os.path.basename (self.substring ('filename')) + str = output[format][PRINTFILENAME] % vars () return str def output_texinfo (self): - str = '' - if self.output_print_filename (TEXINFO): - str += ('@html\n' - + self.output_print_filename (HTML) - + '\n@end html\n') - str += ('@tex\n' - + self.output_print_filename (LATEX) - + '\n@end tex\n') + str = self.output_print_filename (TEXINFO) base = self.basename () if TEXIDOC in self.option_dict: texidoc = base + '.texidoc' @@ -1641,6 +1634,11 @@ def write_if_updated (file_name, lines): if oldstr == new_str: progress (_ ("%s is up to date.") % file_name) progress ('\n') + + # this prevents make from always rerunning lilypond-book: + # .texi target must be touched in order to be up to date + if global_options.format == 'texinfo': + os.utime (file_name, None) return except: pass