Hello, On Mon, Apr 10, 2006 at 07:54:14PM +0000, Daniel Kraft wrote: > Stepan Kasal wrote: > >You need to create a phony target that does both; builds `test', creates > >`myfile', and perhaps runs it. > > > >What about something like: > > > >TESTS = my-test > >.PHONY: my-test > >check_PROGRAMS = test > >test_SOURCES = test.cpp > > > >my-test: test$(EXEEXT) myfile > > ./test -f myfile > > This gives me > ./my-test: command not found > as automake seems to prepend every test with ./ (to make it be run by > the shell).
Oops, I apologize for my mistake. So it seems you need a wrapper script: TESTS = my-test check_PROGRAMS = test test_SOURCES = test.cpp my-test: test$(EXEEXT) ...commands to create myfile and create/touch my-test wrapper (Actually, the above example contains a redundancy, because all check_PROGRAMS are built before the TESTS are run. So either the prerequisite test$(EXEEXT) can be deleted, or check_PROGRAMS can be changed to EXTRA_PROGRAMS.) Hope my advices help you to find the solution, though they contain errors. ;-) Have a nice day, Stepan