pymake
pymake copied to clipboard
Allow complex.mk to succeed under parse_makefile
I have minimal understanding of this codebase, but it seems the complex.mk file fails to parse.
AUX = README COPYING ChangeLog Makefile.in \
makefile.pc configure configure.in \
tar.texinfo tar.info* texinfo.tex \
tar.h port.h open3.h getopt.h regex.h \
rmt.h rmt.c rtapelib.c alloca.c \
msd_dir.h msd_dir.c tcexparg.c \
level-0 level-1 backup-specs testpad.c
.PHONY: shar
shar: $(SRCS) $(AUX)
shar $(SRCS) $(AUX) | compress \
> tar-`sed -e '/version_string/!d' \
-e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
-e q \
version.c`.shar.Z
Full traceback:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/retep/repos/pymake/pymake/pymake.py", line 559, in <module>
main()
File "/Users/retep/repos/pymake/pymake/pymake.py", line 556, in main
sys.exit(_run_it(args))
^^^^^^^^^^^^^
File "/Users/retep/repos/pymake/pymake/pymake.py", line 537, in _run_it
exit_code = execute(makefile, args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/retep/repos/pymake/pymake/pymake.py", line 497, in execute
for rule in rulesdb.walk_tree(target):
File "/Users/retep/repos/pymake/pymake/rules.py", line 105, in walk_tree
yield from self.walk_tree(p)
File "/Users/retep/repos/pymake/pymake/rules.py", line 105, in walk_tree
yield from self.walk_tree(p)
File "/Users/retep/repos/pymake/pymake/rules.py", line 105, in walk_tree
yield from self.walk_tree(p)
File "/Users/retep/repos/pymake/pymake/rules.py", line 99, in walk_tree
rule = self.get(target)
^^^^^^^^^^^^^^^^
File "/Users/retep/repos/pymake/pymake/rules.py", line 78, in get
return self.rules[target]
~~~~~~~~~~^^^^^^^^
KeyError: 'regex.h'
This was just an unintuitive error message -- the parsing would have succeeded if regex.h was defined.