On 22/01/16 16:57, Afif Elghraoui wrote:
I know that i can also pass in a custom include path on the command
line, but I would like to have some files with generic rules that I
can include without any special command line invocation or hardcoding
the absolute path.
I keep a bash function in ~/.bash_aliases to transform the value of
$MAKEPATH into a series of -I switches:
function make_with_path () {
local EXTRAS
local index=1
local copy="$MAKEPATH"
local old
while [ -n "$copy" ] ; do
EXTRAS=("${EXTRAS[@]}" -I "${copy%%:*}")
old="$copy"
copy="${copy#*:}"
if [ "$old" == "$copy" ] ; then break ; fi
done
`which make` "${EXTRAS[@]}" "$@"
}
alias make=make_with_path
It has been known to break some things occasionally, for which I have to
unalias make.
_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make