Ticket #4460 (closed defect: fixed)
Failed to build on Solaris due to unportable Makefile features usage
Reported by: | karlson2k | Owned by: | andrew_b |
---|---|---|---|
Priority: | major | Milestone: | 4.8.30 |
Component: | compilation | Version: | master |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description
In a few places Makefile macro $< is used for target rules.
This is not portable, as POSIX allow $< only for "inference" rules (like general rules '.c.o:' for building any .o file from the .c file with the same name).
GNU make and a few other make implementations support $< for targets, but this is not portable behaviour.
The fix is very simple and obvious.
POSIX specification for makefile syntax: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
Look for "$<"
The suggested fix: https://github.com/MidnightCommander/mc/pull/185
Attachments
Change History
Changed 18 months ago by karlson2k
- Attachment 0001-Fix-unportable-in-Makefiles.patch added
comment:1 Changed 18 months ago by andrew_b
- Component changed from mc-core to compilation
- Milestone changed from Future Releases to 4.8.30
comment:2 Changed 18 months ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
comment:3 Changed 18 months ago by andrew_b
- Branch state changed from no branch to on review
Thanks for the patch!
Branch: 4460_makefile
changeset:8cd913a28aaa97e9724edffa00ba137b00e0abb5
comment:4 Changed 18 months ago by andrew_b
- Votes for changeset set to andrew_b
- Branch state changed from on review to approved
comment:5 Changed 18 months ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to master: [08be8094ca86c93074bb617ea2db64a1e80f2428].
Simplified fix