Monday, October 31, 2022

Re: Makefile: line continuation before empty line?

On 2022/10/31 16:18, Christian Weisgerber wrote:
> 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.)

I would be happy to remove them

No comments:

Post a Comment