error with LuaLaTeX, lstinputlisting and an extension-less file

The problem has been mentioned on the luatex mailing list: http://tug.org/mailman/htdig/luatex/2013-February/004042.html

The problem is that LaTeX is using \openin and \ifeof to test for the existence of a file and this test fails for files without extensions (despite the fact that the (primitive) \input itself would work).

The problem is not confined to luatex: In miktex your example fails with pdflatex too.

With luatex there is a work around: \openin accepts arguments with braces and this seems to protect the file name. So you can use \lstinputlisting{{Makefile}}.