Hi Jim,
Gary V. Vaughan wrote:I was wondering why 'make stable' would always use a stale version unless
I manually updated my .version file first. It turns out that if you use
a non-standard build-aux location, you have to tell GNUmakefile by setting
_build-aux to get the .version dist-hook machinery, and that you also have
to set build_aux in order for maint.mk to work properly.
Before this patch, my cfg.mk needed:
build_aux = $(srcdir)/libltdl/build-aux
_build-aux = libltdl/build-aux
I would leave them for now, but factor out the duplication: _build-aux = libltdl/build-aux build_aux = $(srcdir)/$(_build-aux)
To what advantage over factoring out the duplication entirely at the source of the problem with the patch I submitted?
Alternatively, we could change maint.mk to read:
build-aux = $(srcdir)/$(_build-aux)
...but that leaves open the possibility of users like me only setting one
or the other variable in cfg.mk and wondering why things almost work, but
not quite. I think this is the cleaner, safer solution.
Wouldn't that break things for those who customize build_aux?
Yes, and that's the problem I encountered that inspired me to send a patch to fix it.
How about merely ensuring that they're consistent, for now, i.e., by adding something like this:
ifneq ($(build_aux),$(_build-aux)) $(error ...) endif
Do you mean:
ifneq ($(srcdir)/$(_build-aux), $(build_aux)) $(error ...) endif
in GNUmakefile? or in maint.mk? or in cfg.mk?
Again, what's the advantage of kludging it instead of just making GNUmakefile and maint.mk use the same variable name for the same directory - that need only be set once in cfg.mk, like I showed with the patch I submitted earlier?
This patch combines the two so that I declare my build-aux directory
with just:
_build-aux = libltdl/build-aux
Cheers, -- Gary V. Vaughan (gary AT gnu DOT org) |