Using empty $(else) variable for readability

2015-10-17 Thread Tony Theodore
Hi, I’m looking at tidying up some existing makefile logic and noticed there isn’t a lot of consistency in the format of conditionals - especially from myself over the years. We use make for build automation, not directly for compilation, and don’t use any pre-processor conditionals in this con

Re: Using empty $(else) variable for readability

2015-10-19 Thread Tony Theodore
> On 18 Oct 2015, at 01:12, Rakesh Sharma wrote: > > Tony Theodore me.com> writes: > >> >> Is this a reasonable idea and is there any chance $(else) will have some >> defined value in the future? >> > > This is not at all a good idea, since i

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-20 Thread Tony Theodore
> On 20 Oct 2015, at 20:47, Mark Galeck wrote: > > Dan Kegel wrote: > You may need this commit, which was after 4.1, if I read git history > correctly: > > commit 292da6f6867b75a5af7ddbb639a1feae022f438f > Author: Paul Smith > Date: Mon Oct 20 01:54:56 2014 -0400 > >* main.c (main): [SV

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-20 Thread Tony Theodore
> On 20 Oct 2015, at 20:47, Mark Galeck wrote: > > Well, if I persist and try > >> autoreconf -i > again, it gives the warning as above but no more error. (??) I can then do > ./configure , but then > >> make > > fails to build. There’s a ‘make update’ there that you may have missed. It

Re: can't always get make to auto create build directory

2016-06-29 Thread Tony Theodore
> On 30 Jun 2016, at 04:50, Paul Smith wrote: > > However, you should generally not have targets depend on directories, > because make treats them just like any other file when it checks > modification times; however directories do not act like normal files > when it comes to modification times.

Re: How to resolve implicit dependencies

2016-07-14 Thread Tony Theodore
> On 15 Jul 2016, at 01:46, Adrian Muresan wrote: > […] > > What I need is an OS utility that will detect every read/write action my > build performs AND the ability to attribute > > those filesystem-level operations to the makefile target that performs them. Not exactly an OS utility, but G

Re: when executing the command "make", there is a mistake?!

2016-08-23 Thread Tony Theodore
> On Wed, 2016-08-17 at 06:26 +, zhi zunbao wrote: >> i wanna build a linux according to the lfs 7.7. >> >> >> afte i execute the code below: >> >> chroot "$LFS" /tools/bin/env -i \ >> HOME=/root \ >> TERM="$TERM"\ >> PS1='\u:\w\$ '

Using named variables in canned recipes

2017-03-11 Thread Tony Theodore
Hi, Looking at an example of a canned recipe in: https://www.gnu.org/software/make/manual/make.html#Eval-Function define PROGRAM_template = $(1): $$($(1)_OBJS) $$($(1)_LIBS:%=-l%) ALL_OBJS += $$($(1)_OBJS) endef $(foreach prog,$(PROGRAMS),$(eval $(call PROGRAM_template,$

Re: Using named variables in canned recipes

2017-03-13 Thread Tony Theodore
> On 13 Mar 2017, at 02:10, Paul Smith wrote: > > Yes, absolutely. The point of the foreach function is that the loop > variable is visible in the scope of the loop body... otherwise foreach > is almost useless. Thanks, I just realised I don’t need to use `call` at all in the case where the po

Re: Using named variables in canned recipes

2017-03-13 Thread Tony Theodore
> On 13 Mar 2017, at 02:02, LeJacq, Jean Pierre > wrote: > > Tony Theodore wrote: > >> It seems the variable `prog` is in scope from the calling loop and >> can be referenced in the template: >> >>define PROGRAM_template = >> $

Re: variable reassign value in same makefile

2024-04-03 Thread Tony Theodore
> On 3 Apr 2024, at 20:52, anand akhare wrote: > > My idea is that intermediate values of variable should be used until changed > for target and recipe. Same behavior is seen with non-recursive variables. > (like VAR:=abc) You probably want target-specific variables to achieve that behaviour

Re: variable reassign value in same makefile

2024-04-05 Thread Tony Theodore
> On 4 Apr 2024, at 18:10, anand akhare wrote: > > Hello Tony > I am looking for confirmation if this is expected behavior. Target > specific variables will not have visibility outside of its recipe. I am using > VAR variable across makefile. I’m out of my depth. Five years ago I could

Re: GMAKE 3.81 vs GMAKE 4.2

2019-09-28 Thread Tony Theodore via Help-make
> On 28 Sep 2019, at 16:21, nikhil jain wrote: > > Do you mean to not use -j ? > > That means a single rule execution at a time. It takes 2 hours to build. > With -j4 it takes 1 hour. > > I have -j kind of unlimited. So it usually takes around just 5 minutes to > build. Less than that sometim