help-make
[Top][All Lists]
Advanced

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

Re: Environment Variable to Customize .INCLUDE_DIRS


From: Afif Elghraoui
Subject: Re: Environment Variable to Customize .INCLUDE_DIRS
Date: Wed, 25 May 2016 11:20:14 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0

Based on Paul Smith's comment in #47880 [1], there's a pretty simple solution to this problem. Adding something like the following to ~/.bashrc would do the trick:


MAKELIBS="$HOME/.local/include /other/include"
for path in $MAKELIBS
do
    MAKEFLAGS+="-I$path"
done
export MAKEFLAGS

regards
Afif

1. http://savannah.gnu.org/bugs/?47880#comment1


On 01/22/2016 08:57 AM, Afif Elghraoui wrote:
Hello,
I'm looking for a way to be able to store custom makefile rules in special folders. I see that the Makefile variable .INCLUDE_DIRS is set to "/usr/include /usr/local/include /usr/include" on my machine by default, but is there an environment variable I can set to add different directories (like $HOME/include) in the same way that can be done for CPATH, LIBRARY_PATH, and MANPATH for other things?

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.

Thanks and regards
Afif





reply via email to

[Prev in Thread] Current Thread [Next in Thread]