-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Rikki Duncan on 5/14/2008 11:31 AM: | I have an autotest script that has a direct path associated with it in | order to locate my directory that contains the basefiles used for | comparison. My question is...how do I make this script run without | containing a direct path so that a build on a server will work? Here is | my code and I am referring to line 5. Thanks! | | | # Process with autom4te to create an -*- Autotest -*- test suite. | | m4_define([_getocapi], [getocapi]) | m4_define([base_url], [http://test.opendap.org:8080/dods/dts]) | m4_define([baseline_files_dir], [/home/rikki/workspace/Ocapi/Tests]) You are correct that absolute paths make the testsuite non-portable - for that matter, even relative paths that point to a directory outside the hierarchy specified in configure.ac can be problematic. My suggestion would be to use an environment variable. Anything you put in aclocal.in will be sourced before running the tests, so you could use that to prime the variable to a sane default: : ${baseline_files_dir=@baseline_files_dir@} Then, instead of using baseline_files_dir as an m4 variable, you could write this as | _AT_DAS_TEST([base_url/$1], [baseline_files_dir/das/$1.das]) _AT_DAS_TEST([base_url/$1], [$baseline_files_dir/das/$1.das]) Then calling './testsuite' will use the default AC_SUBST value learned from configure, while calling './testsuite baseline_files_dir=/my/path' will use the alternate path for your specific setup. - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@xxxxxxx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgrhS8ACgkQ84KuGfSFAYDsXQCdFNvJyU1BH7kwKTgOR8HsYme3 V74AnRUjBOOAUlDO8Q189K9ANmfdLLox =q0RS -----END PGP SIGNATURE----- _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf