OS-5604: improve tools mandoc Makefile fix

Details

Issue Type:Bug
Priority:4 - Normal
Status:Resolved
Created at:2016-08-18T19:26:53.000Z
Updated at:2017-11-04T18:33:10.224Z

People

Created by:Former user
Reported by:Former user
Assigned to:Former user

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2016-08-22T21:52:06.000Z)

Fix Versions

2016-09-01 Weadnick (Release Date: 2016-09-01)

Description

The fix for OS-5603 can be improved

Comments

Comment by Former user
Created at 2016-08-18T19:35:38.000Z
Updated at 2016-08-19T22:11:19.000Z

It would appear that mandoc now uses zlib. The copy built in usr/src/cmd/mandoc for shipping to the target machine will be built correctly against the proto/ area bits.

The copy built as part of the usr/src/tools build, for use on the build machine, is not currently built correctly. This build assumes that zlib will be shipped in the standard include (and presumably lib) directories, which it is not on SmartOS.

Fortunately, this is (as I understand it) what the NATIVE_ADJUNCT macro exists to solve. We should follow the lead of the Makefiles in tools/ctf. In particular, as per ctf/Makefile.ctf, we should reset the include path:

CPPFLAGS += \
    -_gcc=-nostdinc \
    -I/usr/include \
    -I$(NATIVE_ADJUNCT)/include

We should also, as per ctf/cvt/Makefile.com, add to the LDFLAGS:

LDFLAGS += -L$(NATIVE_ADJUNCT)/lib

Comment by Former user
Created at 2016-08-22T21:48:25.000Z

illumos-joyent commit 407b427 (branch master, by Jerry Jelinek)

OS-5604 improve tools mandoc Makefile fix
Reviewed by: Joshua M. Clulow <jmc@joyent.com>
Approved by: Joshua M. Clulow <jmc@joyent.com>