tech-toolchain archive

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

Re: make: dependfile preference list

Sorry, I missed this.

On: 2012-04-19 15:18:59 Joerg Sonnenberger wrote:
>> The patch below, adds:
>I think this is the wrong approach. The same behavior could be
>implemented by adding explicit syntax for getting the .depend behavior.
>That would also be more generic, since it would allow ditching the
>depend phase completely.

Not sure I follow - I haven't done a make depend in over 10 years.

But anyway, I found it unnecessary for make itself to know about
.MAKE.DEPENDFILE_PREFERENCE as it can be implemented in a level
makefile (which is now in mk-files):

# $Id:,v 1.3 2012/04/25 15:45:04 sjg Exp $
#       @(#) Copyright (c) 2012, Simon J. Gerraty
#       This file is provided in the hope that it will
#       be of use.  There is absolutely NO WARRANTY.
#       Permission to copy, redistribute or otherwise
#       use this file is hereby granted provided that 
#       the above copyright notice and this notice are
#       left intact. 
#       Please send copies of changes and bug-fixes to:

# This only makes sense in meta mode.
# This allows a mixture of auto generated as well as manually edited
# dependency files, which can be differentiated by their names.
# As per we only require:
# 1. a common prefix
# 2. that machine specific files end in .${MACHINE}
# The .MAKE.DEPENDFILE_PREFERENCE below is an example.

# All depend file names should start with this
.MAKE.DEPENDFILE_PREFIX ?= Makefile.depend

# The order of preference: we will use the first one of these we find
# otherwise the 1st entry will be used by default.

_e := ${.MAKE.DEPENDFILE_PREFERENCE:@m@${exists($m):?$m:}@}
.if !empty(_e)
.MAKE.DEPENDFILE := ${_e:[1]}

Home | Main Index | Thread Index | Old Index