[xmlsec] ABS_%DIR vs abs_%dir

Aleksey Sanin aleksey at aleksey.com
Sun Oct 25 10:29:29 PST 2009


Hi Roumen,

Let me ask a question about the problem you are trying to solve.
As far as I can understand, the issue is that one can't run
tests when build != src dir. Correct?

I feel that the proposed change is too big for this problem.
Do you think it would be possible to minimize the changes and
fix just that problem?

Thanks,
Aleksey



Roumen Petrov wrote:
> Hi All,
> 
> the current version adds some makefile macros(variables). It seems to 
> that implementation is incorrect.
> 
> Lets see following makefile:
> =============================================
> ABS_BUILDDIR=$(shell echo ABS_BUILDDIR)
> ABS_SRCDIR=$(shell echo ABS_SRCDIR)
> 
> all:
>     @echo all
>     @ABS_BUILDDIR=XX$(ABS_BUILDDIR); echo $$ABS_BUILDDIR; echo 
> $(ABS_BUILDDIR)
>     @echo $(ABS_SRCDIR)
> =============================================
> The difference is that make macro is evaluated in the target commands.
> 
> The issue for xmlsec is that tests fail to run if build and source 
> directory differ. Simple solutions is to use variables in targers, i.e. 
> $$ABS_BUILDDIR. I guess this will resolve issue but see below ...
> 
> 
> Another issue is portability. As I know $(shell ...) is specific to GNU 
> make and may is not implemented in other make implementations.
> 
> 
> What about to use abs_%dirs as in attached file xmlsec-abs_dir.patch. 
> Note this is not complete patch !
> 
> The idea is to replease ABS_%DIR macros with values substituted from 
> configure script.
> 
> According autoconf change log "2001-12-13  Peter Eisentraut 
> <peter_e at gmx.net>" adds abs_%dir and for first time version 2.52g 
> substitute them in files.
> So abs%dir support require configure.in to be changed : AC_PREREQ(2.2) 
> -> AC_PREREQ([2.52g])
> 
> 
> Next is automake. I could not found first automake version that adds 
> paths like abs_%dir to generated file. According my knowledge and test 
> it is 1.10. This is not problem as in Makefile.am we can just add as 
> example "abs_top_builddir = @abs_top_builddir@" and this will work with 
> 1.10+ and earlier.
> So abs%dir support don't require changes in configure.in 
> (AM_INIT_AUTOMAKE([1.7])) .  It require only to add abs_XXX variables to 
> Makefile.am for backward compatibility with pre 1.10 versions of automake.
> 
> 
> Also instead abs_top_%dir makefile could use abs_%dir.
> 
> 
> Regards,
> Roumen
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec


More information about the xmlsec mailing list