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 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
Unknown Object (File)
Jan 7 2024, 12:25 AM
Unknown Object (File)
Jan 7 2024, 12:25 AM
Unknown Object (File)
Jan 4 2024, 6:58 AM
Unknown Object (File)
Dec 25 2023, 9:42 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19096
Build 18724: arc lint + arc unit

Event Timeline

lib/ncurses/ncurses/Makefile
353–354

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–354

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.