Re: Is it possible to include variables for installation paths in atconfig? [installcheck target]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As there was no feedback / best-practices I hereby declare the answer to
be "no" and the following solution as best practice instead:

0. if not added already: add a pre-inst-env script, created by
AC_CONFIG_FILES like automake does [1], providing an option to run the
non-installed binaries
1. duplicate it using the target directories this time, creating a
script post-inst-env which sets environment and an exported variable
$package_ENV_SETUP=1
2. as outlined below: add an installcheck-local target in
tests/Makefile.am calling the testsuite after using the post-inst-env script

simplified diff:

 check-local: $(TESTSUITE)
 	@$(TESTSUITE) $(TESTSUITEFLAGS)
+
+installcheck-local: $(abs_top_builddir)/post-inst-env $(TESTSUITE)
+	$(abs_top_builddir)/post-inst-env  @$(TESTSUITE) $(TESTSUITEFLAGS)

3. adjust tests/atlocal.in to check $package_ENV_SETUP and skip whatever
the options that would conflict with post-inst-env


I'd still appreciate feedback if this should be handled different.


[1]: https://git.savannah.gnu.org/cgit/automake.git/tree/pre-inst-env.in

Am 22.03.2019 um 21:50 schrieb Simon Sobisch:
> Background:
> I'm on the way to add the installcheck target to GnuCOBOL which uses
> autotools. The testsuite generated by autoconf does source atconfig
> (directly generated from config.status) and atlocal (from atlocal.in).
> 
> The generated testsuite uses variables which are setup in atlocal,
> therefore I'd just run the testsuite in the installcheck-local target
> but prefix it with a variable, check this variable in atlocal and adjust
> the variables that are setup for the testsuite to not use
> {abs_top_builddir} and {abs_top_srcdir} (both from atconfig) but a
> variant that points to the destination directories.
> [as make installcheck should also work if ]
> 
> Question: Is there an option to extend the entries in atconfig?
> If not -D o you see a better option of passing the installation
> options[1] to atlocal then to AC_SUBST them?
> 
> 
> Thank you for your feedback (and response to this mail in addition to
> the mailing list),
> Simon
> 
> [1]: relevant installation options needed to be passed (all other
> installation paths / options are hard-wired into the
> not-yet-relocatable, not-yet-reproducible binaries)
> 
>   --bindir=DIR            user executables [EPREFIX/bin]
>   --libdir=DIR            object code libraries [EPREFIX/lib]
>   --program-prefix=PREFIX      prepend PREFIX to installed program names
>   --program-suffix=SUFFIX      append SUFFIX to installed program names
>   --program-transform-name=PROGRAM   run sed PROGRAM on installed
> program name
> 
> Coming to think of this - actually I'd only need the final name of the
> installed binaries (2-3) [but would have no idea how to get those
> directly] and libdir (to setup LD_LIBRARY_PATH).
> 

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux