Hello Justin, * Too, Justin A. wrote on Wed, Apr 06, 2011 at 10:45:06PM CEST: > An executable is generated during 'make' in a directory called > scripts/test/install/bin. This executable is used during the > "check-local" rules in all of the Makefile.am's. In the top-level > Makefile.am, how can I accomplish something like "export > PATH=`pwd`/scripts/test/install/bin:$PATH" so the executable will be > available to the "check-local" rules (where would I include this)? Or > is there a better way to accomplish this?
There are several possible answers to this. If your project requires GNU make, you can probably just write export PATH := $(shell echo `pwd`/scripts/test/install/bin:${PATH}) or export PATH := ${PWD}/scripts/test/install/bin:${PATH} in the toplevel Makefile.am (untested). But that won't work with other makes. With make 3.81 or newer, you can even limit that to the check target by putting the above as a target-specific flag if that is really necessary. If all your tests use one of the Automake test drivers, you can use TESTS_ENVIRONMENT = PATH=$(top_builddir)/scripts/test/install/bin:$$PATH; export PATH; but that won't help for check-local rules that invoke other test drivers. (Autotest has a similar feature, see 'info Autoconf --index AUTOTEST_PATH' or the description for the atlocal file.) It is also possible to change macros during the make recursion step by messing with AM_MAKEFLAGS. E.g., your toplevel Makefile.am could have AM_MAKEFLAGS = PATH=`pwd`/scripts/test/install/bin:${PATH} Hope that helps. Cheers, Ralf