Using .PHONY to suppress rebuilds of included makefile fragments

2010-05-25 Thread J.T. Conklin
performance. I've never seen .PHONY used in this way, but from the gmake -d output I see it indeed does what he claims. Are there any reason why not to use .PHONY this way? Is there a better idiom to use to avoid rebuilds of Makefile fragments. Thanks in advance, --jtc -- J.T. Co

Re: Using .PHONY to suppress rebuilds of included makefile fragments

2010-05-25 Thread J.T. Conklin
j...@acorntoolworks.com (J.T. Conklin) writes: > I've never seen .PHONY used in this way, but from the gmake -d output > I see it indeed does what he claims. Are there any reason why not to > use .PHONY this way? Is there a better idiom to use to avoid rebuilds > of Makefi

Iterating through multi-line variable

2010-06-28 Thread J.T. Conklin
Suppose you have a multi-line variable where each line may have spaces. define FOO foo abc bar xyz quux endef Is there a way to iterate through the variable line-by-line instead of word-by-word (as with $(foreach ...)) ? --jtc -- J.T. Conklin

Does "whitespace" have an explicit definition?

2010-06-29 Thread J.T. Conklin
d didn't find a gmake specific definition. As such, my expectation was that the common definition of whitespace: space, horizontal tab, carriage return, newline, form feed, and vertical tab characters would be used, at least as far as variable expansion for function ar

Re: Iterating through multi-line variable

2010-06-30 Thread J.T. Conklin
e lines, but hadn't quite got there. Your recipe showed me the way. --jtc -- J.T. Conklin ___ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/listinfo/help-make

Re: Using foreach to define variables

2010-07-02 Thread J.T. Conklin
an this be made to work? Use $(eval ...), like: $(foreach i,a b c,$(eval $i = 1)) all: echo $a $b $c Hope this helps, --jtc -- J.T. Conklin ___ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/listinfo/help-make

Is there any value in a lisp-like $(cond ...) function?

2010-12-16 Thread J.T. Conklin
If so, I'll gladly contribute my func_cond implementation (even though there is nothing special about it -- almost all of it was taken from func_if and func_or). --jtc PS: And if I've totally missed a better idiom for this task, please let me know. -- J.T. Conklin __

Re: Is there any value in a lisp-like $(cond ...) function?

2010-12-16 Thread J.T. Conklin
Sam Ravnborg writes: > On Wed, Dec 15, 2010 at 10:47:14PM -0800, J.T. Conklin wrote: >> PS: And if I've totally missed a better idiom for this task, please >> let me know. > > I have used the following method in several cases: > > do-foo := ${RESULTS1}

Re: How does $@ work in a make conditional?

2011-01-14 Thread J.T. Conklin
echo current target is $@ echo $(if $(call eq,$@,sms),yep they are equal,nope they're not equal) --jtc -- J.T. Conklin ___ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/listinfo/help-make

Re: .VARIABLES in 3.81

2011-04-12 Thread J.T. Conklin
ali hagigat writes: > e12: > @echo insidee12 > @echo $(.VARIABLES) > > insidee12 > /bin/sh: D: No such file or directory > make: *** [e12] Error 1 > -- > Why the error is generated? Some variables will be interpreted by the shell. In this case, it's $(http

Re: Two Level Assignment

2011-12-08 Thread J.T. Conklin
done by using echo $LOG_LEVEL (which evaluates to INFO. > > 2. When I need to update CFLAGS, I need to give CFLAGS+=-DLOG_LEVEL=4. I > fail to do this. I tried using eval etc. but could not achieve. Can > somebody suggest? Use: CFLAGS+=-DLOGLEVEL=$(

directory order-only dependencies with trailing slash

2016-06-15 Thread J.T. Conklin
One of my developers reported that our product's build fails with GNU make >= 3.82. I discovered the root cause of the issue was that we had order only prerequisites of directories with trailing slashes, but the targets used to create those directories did not. In our framework, these differenc

Re: help on simple makefile

2017-04-05 Thread J.T. Conklin
"jarod...@libero.it" writes: > Could you please help me on translate on working example. > > What I want to obtain is execute the python script on file present on > my folder and output on RESHAPE2. thanks in advance for any help How about something like this: INDIR=indir INFIL