Monday, October 31, 2022

Makefile: line continuation before empty line?

There are 76 or so port Makefiles that have a trailing backslash
for line continuation before an empty line, e.g. like this in
cmake/Makefile:

77 perl -e 's,/usr/include,${LOCALBASE}/include,' \
78 ${WRKSRC}/Modules/FindDCMTK.cmake \
79

Now, this _is_ harmless. The parser will just gobble up the next line
and since that one's empty, there's no effect.

That said, I think they are accidental leftovers when subsequent
content lines were deleted and somebody forgot to remove that
trailing backslash on the new last line of an assignment.

Should I remove them? Should I not bother?
Does anybody actually use this style intentionally?


(I have already grepped for instances where the next line is not
empty and repaired those that were in error.)

--
Christian "naddy" Weisgerber naddy@mips.inka.de

No comments:

Post a Comment