%s
%s
-''' % ( _ ('Copyright (c) %s by') % '2001--2009',
+''' % ( _ ('Copyright (c) %s by') % '2001--2010',
'\n '.join (authors),
_ ("Distributed under terms of the GNU General Public License."),
_ ("It comes with NO WARRANTY.")))
default='')
p.add_option ('--latex-program',
- help=_ ("run executable PROG instead of latex"),
+ help=_ ("run executable PROG instead of latex, or in\n\
+case --pdf option is set instead of pdflatex"),
metavar=_ ("PROG"),
action='store', dest='latex_program',
default='latex')
option_list = []
for option in self.get_option_list ():
- for name in PROCESSING_INDEPENDENT_OPTIONS:
- if not option.startswith (name):
- option_list.append (option)
+ if not any (option.startswith (name)
+ for name in PROCESSING_INDEPENDENT_OPTIONS):
+ option_list.append (option)
option_string = ','.join (option_list)
-
compose_dict = {}
compose_types = [NOTES, PREAMBLE, LAYOUT, PAPER]
for a in compose_types:
hash = md5 (self.relevant_contents (self.ly ()))
for option in self.get_option_list ():
for name in PROCESSING_INDEPENDENT_OPTIONS:
- if not option.startswith (name):
- hash.update (option)
+ if option.startswith (name):
+ break
+ else:
+ hash.update (option)
## let's not create too long names.
self.checksum = hash.hexdigest ()[:10]
filename = path + '.ly'
if os.path.exists (filename):
diff_against_existing = filter_pipe (self.full_ly (), 'diff -u %s -' % filename)
- if not diff_against_existing.startswith ('\n'):
+ if diff_against_existing:
warning ("%s: duplicate filename but different contents of orginal file,\n\
printing diff against existing file." % filename)
ly.stderr_write (diff_against_existing)
global_options.process_cmd += ' --formats=eps '
if global_options.create_pdf:
global_options.process_cmd += "--pdf -dinclude-eps-fonts -dgs-load-fonts "
+ if global_options.latex_program == 'latex':
+ global_options.latex_program = 'pdflatex'
if global_options.verbose:
global_options.process_cmd += " --verbose "