|
From: | John W. Eaton |
Subject: | Re: question about defining some handy makefile targets |
Date: | Thu, 30 Jul 2015 14:00:47 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 |
On 07/30/2015 07:46 AM, Mike Miller wrote:
On Wed, Jul 29, 2015 at 16:58:17 -0400, John W. Eaton wrote:I often find myself wanting to know what the value of a variable is in Octave's Makefile.I typically do this with ad-hoc command-line inventions like $ echo -e "asdf:\n\techo \$(BUILT_DOC_IMAGES)\n-include Makefile" | make -f /dev/stdin asdf Is that simple enough to avoid having to define extra rules?Would anyone else benefit from having rules like these defined?I'd probably use them if they were there :) If you think it's worth the maintenance effort. Might I suggest putting these types of rules in a build-aux/foo.mk include file?
Sure. I intend to continue cleaning, organizing, and documenting the Makefile. Would it make sense to put most of the makefile in separate files that are included in Makefile.am? Doing that might help enforce a bit more structure and make things easier to understand. For example, we might have
include build-aux/variables.mk include build-aux/targets.mk include build-aux/rules.mketc. I'm not sure that this is the best way to break things up, but you get the idea. The argument against this approach is that then you have to look at multiple files to see what is really happening. Maybe similar clarity could be had just by being more disciplined about the way things are ordered in the main Makefile.am file.
jwe
[Prev in Thread] | Current Thread | [Next in Thread] |