Ticket #4460 (closed defect: fixed)

Opened 18 months ago

Last modified 18 months ago

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

0001-Fix-unportable-in-Makefiles.patch (2.3 KB) - added by karlson2k 18 months ago.
Simplified fix

Change History

Changed 18 months ago by karlson2k

Simplified fix

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

comment:6 Changed 18 months ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.