The change to the "am__pep3147_tweak" variable included in causes the generated Makefile files not to work on systems (such as macOS) where "sed" interprets "\n" in the substitution text as the letter "n" instead of as a newline. For example, if I run "make distcheck" in the package created with the attached files, I see that in the uninstall phase it attempts to remove rm -f foo.*.pycnfoo.*.pyo which results in the following error: ERROR: files left after uninstall: ./lib/python3.6/site-packages/automake_python_test/__pycache__/foo.cpython-36.opt-1.pyc ./lib/python3.6/site-packages/automake_python_test/__pycache__/foo.cpython-36.pyc A log file containing the output of running configure and make distcheck is attached. Versions of OS and software: macOS High Sierra 10.13.4 autoconf (GNU Autoconf) 2.69 automake (GNU automake) 1.16.1 Thanks, -Mark