[ci skip] update generated files
[scons.git] / test / Java / Java-fixture / myjavac.py
blobc2a2602a9f0eb594074ec9d429f71c697192d456
1 # SPDX-License-Identifier: MIT
3 # Copyright The SCons Foundation
5 import sys
7 args = sys.argv[1:]
8 while args:
9 arg = args[0]
10 if arg == '-d':
11 args = args[1:]
12 elif arg == '-sourcepath':
13 args = args[1:]
14 else:
15 break
16 args = args[1:]
18 for file in args:
19 out = file.lower().replace('.java', '.class')
20 with open(file, 'rb') as infile, open(out, 'wb') as outfile:
21 for line in infile:
22 if not line.startswith(b'/*javac*/'):
23 outfile.write(line)
25 sys.exit(0)