Re: Looking for nastiest makefile that uses function calls to make the makefile in memory...

2017-03-20 Thread Duane Griffin
You want complex GNU makefiles? Alrighty then... Please find attached a small piece of our build system. It emulates local variables, essentially by saving the values of all variables prior to a makefile being included, then restoring them and clearing any new ones after. I wrote it to help us fin

Re: debugging make variables using $(SHELL)

2017-03-22 Thread Duane Griffin
Hi Russell, On Wed, Mar 22, 2017 at 5:58 PM, russ mok [Alumni] wrote: > My env relies heavily on recursive make, and my last rule is for debugging: An interesting approach I hadn't considered, thanks! That would certainly be much simpler than what we do. Unfortunately it would not work for us:

Re: Uupdate value of variable

2017-05-31 Thread Duane Griffin
Hi Ignacio, I think you are trying to assign to a make variable from a command in a recipe. You can't do that, sorry. Consider that each line in a recipe runs in a separate shell: it cannot change variables in it's parent make process or even set shell variables for other lines in the same recipe.

Re: Uupdate value of variable

2017-06-01 Thread Duane Griffin
Hi, On Thu, Jun 1, 2017 at 7:24 PM, icvallejo wrote: > Hello and thank you for your answers. > > I want to know if exists a string (!myapp) in rsyslog.conf file and if there > is not exist, check if exists another string (local?.* where ? is a number > between 0-7), and to do a printf in file so,

Re: Turning warning into errors

2019-05-02 Thread Duane Griffin
Hi Sébastien, I've not heard of that tool, but it sounds useful. Unfortunately we now use cmake internally, but a while ago I wrote some GNU makefile code to perform some checks like this for our rather complex GNU make-based build system of the time. See the attached file; it should still work a

Re: Turning warning into errors

2019-05-02 Thread Duane Griffin
On Fri, May 3, 2019 at 1:31 PM Sébastien Hinderer wrote: > Dear Duane, > > Many thanks for your response! > > You are right, the code is rather straightforward and at the same time I > find it clever! In particular, I like the fact that, because of the > options you are using, you don't need to us

Re: Turning warning into errors

2019-05-02 Thread Duane Griffin
On Fri, May 3, 2019 at 2:48 PM Kaz Kylheku (gmake) <729-670-0...@kylheku.com> wrote: > Let's try it in a project of mine: > >~/txr$ make --warn-undefined-variables --silent --dry-run clean 2>&1 > > /dev/null >Makefile:32: warning: undefined variable `CFLAGS' >Makefile:33: warning: unde