Page MenuHomeFreeBSD

Fix ncurses fallback.c build with a strict build shell
ClosedPublic

Authored by arichardson on Aug 23 2018, 2:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 22, 11:07 PM
Unknown Object (File)
Fri, Mar 22, 11:06 PM
Unknown Object (File)
Fri, Mar 22, 11:06 PM
Unknown Object (File)
Fri, Mar 22, 11:06 PM
Unknown Object (File)
Fri, Mar 8, 7:34 AM
Unknown Object (File)
Jan 14 2024, 9:18 AM
Unknown Object (File)
Jan 7 2024, 12:26 AM
Unknown Object (File)
Jan 7 2024, 12:26 AM
Subscribers

Details

Summary

The script uses shift three times and when building with a strict /bin/sh
shifting without any arguments will cause the script to fail. In this case
the target will fail and we write an empty output file. When doing a
NO_CLEAN build after this will mean fallback.c is up to date and clang
will happily compile the empty input file which leads to strange build
errors later.

Fixed by passing three empty arguments to MkFallback.sh and only creating
fallback.c if MKfallback.sh succeeds.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/ncurses/ncurses/Makefile
353 ↗(On Diff #47171)

I think you want to add fallback.c.tmp to CLEANFILES so it's removed by make clean if a failure occurs.

lib/ncurses/ncurses/Makefile
353 ↗(On Diff #47171)

It is removed by make clean. However, if the make rule fails there will be an empty (up-to-date) output file so it won't be rebuilt.

This revision is now accepted and ready to land.Aug 23 2018, 8:43 PM
This revision was automatically updated to reflect the committed changes.