diff options
author | devzero2000 <devzero2000> | 2010-06-30 15:27:16 +0000 |
---|---|---|
committer | devzero2000 <devzero2000> | 2010-06-30 15:27:16 +0000 |
commit | 226d320387e4b78163ae9df66c8baf10760ba3b8 (patch) | |
tree | 814188aec26306d6a260d5394c4c082e437931e9 | |
parent | 4d28f2e36ea29bca5016ff319897935fb384e9fa (diff) | |
download | libpopt-226d320387e4b78163ae9df66c8baf10760ba3b8.tar.gz |
Fixed VPATH building with arbitrary directory structure
make distcheck worked before just for luck.
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | auto/Makefile.am | 2 | ||||
-rw-r--r-- | test1.c | 9 |
3 files changed, 11 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 4afa610..e6e989d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,7 +26,7 @@ test1_LDADD = $(top_builddir)/$(usrlib_LTLIBRARIES) test2_LDADD = $(top_builddir)/$(usrlib_LTLIBRARIES) tdict_LDADD = $(top_builddir)/$(usrlib_LTLIBRARIES) -TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=.:../src:$$PATH \ +TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) testpoptrc="$(top_srcdir)/test-poptrc" PATH=.:../src:$$PATH \ $(SHELL) TESTS = $(top_builddir)/testit.sh diff --git a/auto/Makefile.am b/auto/Makefile.am index 97a86ab..87aa601 100644 --- a/auto/Makefile.am +++ b/auto/Makefile.am @@ -8,5 +8,5 @@ clean-local: if HAVE_API_SANITY_AUTOTEST check-local: -[ -d tests ] && ${API_SANITY_AUTOTEST} -l popt -d desc -clean - -${API_SANITY_AUTOTEST} -l popt -d desc -st types -gen -build -run + -${API_SANITY_AUTOTEST} -l popt -d desc -st $(top_srcdir)/auto/types -gen -build -run endif HAVE_API_SANITY_AUTOTEST @@ -270,8 +270,17 @@ int main(int argc, const char ** argv) optCon = poptGetContext("test1", argc, argv, options, 0); /*@=temptrans@*/ (void) poptReadConfigFile(optCon, "./test-poptrc"); +#ifdef HAVE_STDLIB_H + char * testpoptrc; + testpoptrc = getenv ("testpoptrc"); + if (testpoptrc != NULL ) + (void) poptReadConfigFile(optCon, testpoptrc); + else + printf("something go wrong\n"); +#else /* XXXX: make distcheck succed : test1 is in popt-<version>/_build */ (void) poptReadConfigFile(optCon, "../../test-poptrc"); +#endif (void) poptReadDefaultConfig(optCon, 1); poptSetExecPath(optCon, ".", 1); |