tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: organized system prefix



On Wed, Apr 03, 2013 at 09:39:43PM +0900, OBATA Akio wrote:
> Hi,
> 
> Please review attached patch.
> (related to PR pkg/47084)
> 
> Currently, there are many hard-coded /usr/include and /usr/lib
> in mk/buildlink/bsd.buildlink3.mk.
> 
> It is not correct for Haiku.
>  * system header files are in /boot/develop/headers
>  * system library files are in /boot/system/lib
>  * additional header and libraries are in /boot/common/{include,lib}
> It may also not correct for some optional development toolkit on other 
> platforms.

In general, we should be looking to be OS-agnostic via abstractions
like this, and so I'm all for it...
 
> Attached patch introduce following variables:
> 
> In mk/platform/*.mk:
> _OPSYS_INCLUDE_DIRS
>  list of system default include directories
> _OPSYS_LIB_DIRS
>  list of system default library directories
> 
> In mk/bsd.prefs.mk (may be defined in mk/compiler/*.mk):
> SYSTEM_DEFAULT_RPATH
>  colon separated list of system default rpath directories
>  (default value is _OPSYS_SYSTEM_RPATH, or /usr/lib)
> COMPILER_INCLUDE_DIRS
>  list of compiler default include directories
>  (default value is _OPSYS_INCLUDE_DIRS, or /usr/include)
> COMPILER_INCLUDE_DIRS
>  list of compiler default library directories
>  (default value is _OPSYS_LIB_DIRS, or /usr/lib)
> 
> Additionally, allow empty BUILDLINK_PREFIX.${_pkg_},
> because as said above, Haiku's system header and library location
> is not match such model.

Your patch only includes a diff for Haiku.mk - we usually put these
fields in every platform .mk file, so that it's easier to compare and
contrast between platforms, and so that we can use the files as
templates.  Whilst it may seem like redundancy in some of the other
platform .mk files (or even a duh-like stating of the obvious), it's
much easier if each file contains the information.
 
Thanks, this looks great!

Alistair




Home | Main Index | Thread Index | Old Index