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)
Tue, Nov 12, 4:11 AM
Unknown Object (File)
Mon, Nov 11, 2:09 PM
Unknown Object (File)
Mon, Nov 11, 12:56 PM
Unknown Object (File)
Mon, Nov 11, 12:17 PM
Unknown Object (File)
Mon, Nov 11, 10:51 AM
Unknown Object (File)
Sep 30 2024, 3:07 PM
Unknown Object (File)
Sep 27 2024, 12:55 PM
Unknown Object (File)
Sep 21 2024, 6:20 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.