Extract suffix rules into bsd.suffixes[-posix].mk.
ClosedPublic

Authored by jonathan on Jun 11 2016, 1:28 AM.

Details

Summary

Refactor make suffix rules into separate files (one for POSIX and one not),
and rationalise the rules so that bsd.lib.mk can contain only those rules
that are library-specific (.c.po and .c.So).

This can be accomplished by adding ${STATIC_CFLAGS} to the .c.o rule
unconditionally. STATIC_CFLAGS are only defined for use by sys.mk rules in
lib/libpam/Makefile.inc (see r227797), so it should (should?) be safe to
include them unconditionally in sys.mk's .c.o rule.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jonathan retitled this revision from to Extract suffix rules into bsd.suffixes[-posix].mk..Jun 11 2016, 1:28 AM
jonathan updated this object.
jonathan edited the test plan for this revision. (Show Details)
jonathan added reviewers: sjg, brooks, des, bdrewery, rwatson.
sjg added inline comments.Jun 11 2016, 1:55 AM
share/mk/bsd.lib.mk
93 ↗(On Diff #17502)

This is insufficient.
You need to either remove the clearing of .SUFFIXES, or re-include the appropriate suffix.mk

jonathan added inline comments.Jun 11 2016, 2:18 AM
share/mk/bsd.lib.mk
93 ↗(On Diff #17502)

Ah, yes. I've tried removing the clear .SUFFIXES: line and have kicked off a universe build to see what the overall fallout of this change is. Hopefully there will be results in the morning. :)

bdrewery requested changes to this revision.Jun 13 2016, 4:36 PM

Please also get a ports exp-run before committing this

share/mk/sys.mk
261 ↗(On Diff #17502)

This too needs to be added to share/mk/Makefile.

266 ↗(On Diff #17502)

You need to add this file to share/mk/Makefile so it is installed to /usr/share/mk.

This revision now requires changes to proceed.Jun 13 2016, 4:36 PM
jonathan updated this revision to Diff 17641.Jun 16 2016, 6:14 PM
  • Add bsd.suffixes[-posix].mk to share/mk/Makefile.
jonathan marked 2 inline comments as done.Jun 16 2016, 6:14 PM

Thanks, I've added those to share/mk/Makefile and will request an exp-run.

jonathan updated this revision to Diff 17649.Jun 16 2016, 11:09 PM
  • Move .SUFFIXES definitions into suffix rule files, too.
jonathan updated this revision to Diff 17650.Jun 17 2016, 12:40 AM
  • Extract suffix rules into bsd.suffixes[-posix].mk.
  • Add bsd.suffixes[-posix].mk to share/mk/Makefile.
  • Don't clear suffix rules in bsd.lib.mk.

Ping!

Not that we're well clear of code freezes on -CURRENT (and I think that I've addressed @bdrewery's comments), are folks ok with me committing this?

sjg added a comment.Oct 6 2016, 1:10 AM

I've no objection.
Bryan had asked for exp-run ?

Indeed, I did have that exp-run done:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210331

The result was "0 new failure, looks fine."

jonathan updated this revision to Diff 21270.Oct 11 2016, 7:34 PM
  • Merge 'origin/master' into arcpatch-D6805
This revision was automatically updated to reflect the committed changes.