Menu

#5844 scripts/build/scan-mf-deps: script to generate MF dependencies

Fixed
2020-03-26
2020-03-14
No

Metafont dependency scanning uses advanced GNU Make scripting. By
putting the logic in a Python script, we have a better chance of
moving away from GNU make as a build system.

https://codereview.appspot.com/553700043

Discussion

1 2 > >> (Page 1 of 2)
  • Han-Wen Nienhuys

     
  • Anonymous

    Anonymous - 2020-03-14
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> review
    • Type: -->
     
  • Anonymous

    Anonymous - 2020-03-14

    Fails make.

    ..
    out/lexer.cc:6476:21: warning: conversion to 'int' from 'std::streamsize {aka long int}' may alter its value [-Wconversion]
       return yyin.gcount();
              ~~~~~~~~~~~^~
    ./out/parser.cc: In function 'int yyparse(Lily_parser*, scm_unused_struct**)':
    ./out/parser.cc:2917:12: warning: conversion to 'yytype_int16 {aka short int}' from 'int' may alter its value [-Wconversion]
       *yyssp = yystate;
                ^~~~~~~
    Making lily/out/lilypond 
    Making lily/out/lilypond.1 
    Making mf/out/mf2pt1.mem < mp
    Making mf/out/emmentaler-11.genpe 
    Making mf/out/emmentaler-13.genpe 
    Making mf/out/emmentaler-14.genpe 
    Making mf/out/emmentaler-16.genpe 
    Making mf/out/emmentaler-18.genpe 
    Making mf/out/feta18.pfb < mf
    Making mf/out/feta-noteheads18.pfb < mf
    Making mf/out/feta-flags18.pfb < mf
    Making mf/out/feta-alphabet18.pfb < mf
    Making mf/out/parmesan18.pfb < mf
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 49, in <module>
        print("%s: %s" % (target, ' '.join(scan_mf(args[0]))))
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 39, in scan_mf
        input_re.sub(lambda m: deps.append(m.group(1)), f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 49, in <module>
        print("%s: %s" % (target, ' '.join(scan_mf(args[0]))))
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 39, in scan_mf
        input_re.sub(lambda m: deps.append(m.group(1)), f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3337: ordinal not in range(128)
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3337: ordinal not in range(128)
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 49, in <module>
        print("%s: %s" % (target, ' '.join(scan_mf(args[0]))))
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 39, in scan_mf
        input_re.sub(lambda m: deps.append(m.group(1)), f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3337: ordinal not in range(128)
    /home/james/lilypond-git/build/.././mf/GNUmakefile:36: recipe for target 'out/feta-noteheads18.pfb' failed
    make[1]: *** [out/feta-noteheads18.pfb] Error 1
    make[1]: *** Waiting for unfinished jobs....
    /home/james/lilypond-git/build/.././mf/GNUmakefile:36: recipe for target 'out/feta-alphabet18.pfb' failed
    make[1]: *** [out/feta-alphabet18.pfb] Error 1
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 49, in <module>
        print("%s: %s" % (target, ' '.join(scan_mf(args[0]))))
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 39, in scan_mf
        input_re.sub(lambda m: deps.append(m.group(1)), f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3337: ordinal not in range(128)
    /home/james/lilypond-git/build/.././mf/GNUmakefile:36: recipe for target 'out/parmesan18.pfb' failed
    make[1]: *** [out/parmesan18.pfb] Error 1
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 49, in <module>
        print("%s: %s" % (target, ' '.join(scan_mf(args[0]))))
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 39, in scan_mf
        input_re.sub(lambda m: deps.append(m.group(1)), f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3337: ordinal not in range(128)
    /home/james/lilypond-git/build/.././mf/GNUmakefile:36: recipe for target 'out/feta18.pfb' failed
    make[1]: *** [out/feta18.pfb] Error 1
    /home/james/lilypond-git/build/.././mf/GNUmakefile:36: recipe for target 'out/feta-flags18.pfb' failed
    make[1]: *** [out/feta-flags18.pfb] Error 1
    /home/james/lilypond-git/build/../stepmake/stepmake/generic-targets.make:6: recipe for target 'all' failed
    make: *** [all] Error 2
    
     
  • Anonymous

    Anonymous - 2020-03-14
    • Patch: review --> needs_work
     
  • Anonymous

    Anonymous - 2020-03-14

    Fails make.

    ..
    out/lexer.cc:6476:21: warning: conversion to 'int' from 'std::streamsize {aka long int}' may alter its value [-Wconversion]
       return yyin.gcount();
              ~~~~~~~~~~~^~
    ./out/parser.cc: In function 'int yyparse(Lily_parser*, scm_unused_struct**)':
    ./out/parser.cc:2917:12: warning: conversion to 'yytype_int16 {aka short int}' from 'int' may alter its value [-Wconversion]
       *yyssp = yystate;
                ^~~~~~~
    Making lily/out/lilypond 
    Making lily/out/lilypond.1 
    Making mf/out/mf2pt1.mem < mp
    Making mf/out/emmentaler-11.genpe 
    Making mf/out/emmentaler-13.genpe 
    Making mf/out/emmentaler-14.genpe 
    Making mf/out/emmentaler-16.genpe 
    Making mf/out/emmentaler-18.genpe 
    Making mf/out/feta18.pfb < mf
    Making mf/out/feta-noteheads18.pfb < mf
    Making mf/out/feta-flags18.pfb < mf
    Making mf/out/feta-alphabet18.pfb < mf
    Making mf/out/parmesan18.pfb < mf
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 49, in <module>
        print("%s: %s" % (target, ' '.join(scan_mf(args[0]))))
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 39, in scan_mf
        input_re.sub(lambda m: deps.append(m.group(1)), f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 49, in <module>
        print("%s: %s" % (target, ' '.join(scan_mf(args[0]))))
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 39, in scan_mf
        input_re.sub(lambda m: deps.append(m.group(1)), f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3337: ordinal not in range(128)
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3337: ordinal not in range(128)
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 49, in <module>
        print("%s: %s" % (target, ' '.join(scan_mf(args[0]))))
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 39, in scan_mf
        input_re.sub(lambda m: deps.append(m.group(1)), f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3337: ordinal not in range(128)
    /home/james/lilypond-git/build/.././mf/GNUmakefile:36: recipe for target 'out/feta-noteheads18.pfb' failed
    make[1]: *** [out/feta-noteheads18.pfb] Error 1
    make[1]: *** Waiting for unfinished jobs....
    /home/james/lilypond-git/build/.././mf/GNUmakefile:36: recipe for target 'out/feta-alphabet18.pfb' failed
    make[1]: *** [out/feta-alphabet18.pfb] Error 1
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 49, in <module>
        print("%s: %s" % (target, ' '.join(scan_mf(args[0]))))
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 39, in scan_mf
        input_re.sub(lambda m: deps.append(m.group(1)), f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3337: ordinal not in range(128)
    /home/james/lilypond-git/build/.././mf/GNUmakefile:36: recipe for target 'out/parmesan18.pfb' failed
    make[1]: *** [out/parmesan18.pfb] Error 1
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 49, in <module>
        print("%s: %s" % (target, ' '.join(scan_mf(args[0]))))
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 45, in scan_mf
        total += scan_mf(full_path)
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 39, in scan_mf
        input_re.sub(lambda m: deps.append(m.group(1)), f.read())
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3337: ordinal not in range(128)
    /home/james/lilypond-git/build/.././mf/GNUmakefile:36: recipe for target 'out/feta18.pfb' failed
    make[1]: *** [out/feta18.pfb] Error 1
    /home/james/lilypond-git/build/.././mf/GNUmakefile:36: recipe for target 'out/feta-flags18.pfb' failed
    make[1]: *** [out/feta-flags18.pfb] Error 1
    /home/james/lilypond-git/build/../stepmake/stepmake/generic-targets.make:6: recipe for target 'all' failed
    make: *** [all] Error 2
    
     
  • Han-Wen Nienhuys

     
  • Anonymous

    Anonymous - 2020-03-15
    • Needs: -->
    • Patch: new --> review
    • Type: -->
     
  • Anonymous

    Anonymous - 2020-03-15

    Passes make, make check and a full make doc

     
  • Han-Wen Nienhuys

     
  • Han-Wen Nienhuys

     
  • Han-Wen Nienhuys

     
  • Han-Wen Nienhuys

     
  • Anonymous

    Anonymous - 2020-03-16

    Fails make check

    Processing `./ff/lily-907f83e3.ly'
    Parsing...
    Renaming input to: `/home/james/lilypond-git/input/regression/satb-template-with-men-women-and-descant.ly'
    Interpreting music...
    fatal error: cannot find `emmentaler-20.otf'
    Music font has not been installed properly.
    Search path `/home/james/lilypond-git/build/out/share/lilypond/current/ly:/home/james/lilypond-git/build/out/share/lilypond/current/ps:/home/james/lilypond-git/build/out/share/lilypond/current/scm:/home/james/lilypond-git/build/out/share/lilypond/current/fonts/otf/:/home/james/lilypond-git/build/out/share/lilypond/current/fonts/type1/:/home/james/lilypond-git/build/out/share/lilypond/current/fonts/svg/:/home/james/lilypond-git/input/regression:/home/james/lilypond-git/Documentation/included/:./:/home/james/lilypond-git/build/input/regression:/home/james/lilypond-git/input/regression:'
    Aborting
    
     
  • Anonymous

    Anonymous - 2020-03-16
    • Needs: -->
    • Patch: new --> needs_work
    • Type: -->
     
  • Han-Wen Nienhuys

    oops - restored overly zealous deletions

    https://codereview.appspot.com/553700043

     
  • Han-Wen Nienhuys

     
  • Anonymous

    Anonymous - 2020-03-17
    • Needs: -->
    • Patch: new --> needs_work
    • Type: -->
     
  • Anonymous

    Anonymous - 2020-03-17

    Fails make

    ...
    Making mf/out/emmentaler-16.genpe 
    Making mf/out/emmentaler-18.genpe 
    Making mf/out/feta18.pfb < mf
    Making mf/out/feta-noteheads18.pfb < mf
    Making mf/out/feta-flags18.pfb < mf
    Making mf/out/feta-alphabet18.pfb < mf
    Making mf/out/parmesan18.pfb < mf
    Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors.
     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
     with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
     Based on sources from 11:21 UTC 24-Sep-2017-ML-D.
     Based on source from git with hash: 
    Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors.
     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
     with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
     Based on sources from 11:21 UTC 24-Sep-2017-ML-D.
     Based on source from git with hash: 
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 9, in <module>
        input = open(log, encoding ="utf-8").read()
    TypeError: 'encoding' is an invalid keyword argument for this function
    /home/james/lilypond-git/build/.././mf/GNUmakefile:35: recipe for target 'out/feta-alphabet18.pfb' failed
    make[1]: *** [out/feta-alphabet18.pfb] Error 1
    make[1]: *** Waiting for unfinished jobs....
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 9, in <module>
        input = open(log, encoding ="utf-8").read()
    TypeError: 'encoding' is an invalid keyword argument for this function
    /home/james/lilypond-git/build/.././mf/GNUmakefile:35: recipe for target 'out/feta-flags18.pfb' failed
    make[1]: *** [out/feta-flags18.pfb] Error 1
    Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors.
     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
     with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
     Based on sources from 11:21 UTC 24-Sep-2017-ML-D.
     Based on source from git with hash: 
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 9, in <module>
        input = open(log, encoding ="utf-8").read()
    TypeError: 'encoding' is an invalid keyword argument for this function
    /home/james/lilypond-git/build/.././mf/GNUmakefile:35: recipe for target 'out/feta-noteheads18.pfb' failed
    make[1]: *** [out/feta-noteheads18.pfb] Error 1
    Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors.
     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
     with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
     Based on sources from 11:21 UTC 24-Sep-2017-ML-D.
     Based on source from git with hash: 
    Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors.
     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
     with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
     Based on sources from 11:21 UTC 24-Sep-2017-ML-D.
     Based on source from git with hash: 
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 9, in <module>
        input = open(log, encoding ="utf-8").read()
    TypeError: 'encoding' is an invalid keyword argument for this function
    /home/james/lilypond-git/build/.././mf/GNUmakefile:35: recipe for target 'out/feta18.pfb' failed
    make[1]: *** [out/feta18.pfb] Error 1
    Traceback (most recent call last):
      File "/home/james/lilypond-git/mf/scan-mf-deps.py", line 9, in <module>
        input = open(log, encoding ="utf-8").read()
    TypeError: 'encoding' is an invalid keyword argument for this function
    /home/james/lilypond-git/build/.././mf/GNUmakefile:35: recipe for target 'out/parmesan18.pfb' failed
    make[1]: *** [out/parmesan18.pfb] Error 1
    /home/james/lilypond-git/build/../stepmake/stepmake/generic-targets.make:6: recipe for target 'all' failed
    make: *** [all] Error 2
    
     
  • Han-Wen Nienhuys

     
  • Anonymous

    Anonymous - 2020-03-17
    • Needs: -->
    • Patch: new --> review
    • Type: -->
     
  • Anonymous

    Anonymous - 2020-03-17

    Still fails make (?)

    ...
    Making lily/out/lilypond.1 
    Making mf/out/mf2pt1.mem < mp
    Making mf/out/emmentaler-11.genpe 
    Making mf/out/emmentaler-13.genpe 
    Making mf/out/emmentaler-14.genpe 
    Making mf/out/emmentaler-16.genpe 
    Making mf/out/emmentaler-18.genpe 
    Making mf/out/feta18.pfb < mf
    /bin/sh: 1: /home/james/lilypond-git/mf/invoke-mf2pt.sh: not found
    /home/james/lilypond-git/build/.././mf/GNUmakefile:36: recipe for target 'out/feta18.pfb' failed
    make[1]: *** [out/feta18.pfb] Error 127
    make[1]: *** Waiting for unfinished jobs....
    /home/james/lilypond-git/build/../stepmake/stepmake/generic-targets.make:6: recipe for target 'all' failed
    make: *** [all] Error 2
    
     
  • Han-Wen Nienhuys

     
  • Han-Wen Nienhuys

     
  • Han-Wen Nienhuys

     
  • Anonymous

    Anonymous - 2020-03-17
    • Needs: -->
    • Patch: new --> review
    • Type: -->
     
1 2 > >> (Page 1 of 2)