[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to specify additional dependencies of files
From: |
Stepan Kasal |
Subject: |
Re: How to specify additional dependencies of files |
Date: |
Mon, 10 Apr 2006 20:34:35 +0200 |
User-agent: |
Mutt/1.4.1i |
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