[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make distcheck not finding custom code generation script
From: |
Andreas Ntaflos |
Subject: |
make distcheck not finding custom code generation script |
Date: |
Sat, 13 May 2006 08:59:12 +0200 |
User-agent: |
KMail/1.9.1 |
Hello list,
this is my first post here, and it is regarding `make distcheck'. What I
have to do is a bit tricky to explain but hopefully I can make myself
clear enough to get some input from more experienced automake users
than me (I am basically a newbie). I would really appreciate it.
Background:
To build successfully, my package needs two files (foo.cc and foo.hh)
that are generated during build time from another file (foo.ice) using
a special program, let's call it `foo2cpp'. This program's path is
machine/installation dependent and is determined during configure time
and set correctly by the m4 macro that checks for it. This m4 makro
creates a Makefile variable $(ICE_FOO2CPP) which looks like this:
`../tools/wrapper.sh /correct/path/to/foo2cpp'.
You see, in the topmost directory of my package there is a directory
`tools' which contains a `wrapper.sh' script. This is needed to set
various paths (like LD_LIBRARY_PATH) in order for foo2cpp to run
correctly on all test machines. So to translate foo.ice to foo.cc and
foo.hh I need to run (in my $(topdir)/src subdirectory)
../tools/wrapper.sh /path/to/foo2cpp foo.ice
In src/Makefile.am there is a target that does just that:
foo.cc foo.hh: foo.ice
$(ICE_FOO2CPP) foo.ice
It does so very nicely. Remember $(ICE_FOO2CPP) is set during configure
after the m4 macro checked for it.
These generated files are of course not part of the distribution but are
nodist_foo_SOURCES and set in BUILT_SOURCES, accoring to the automake
info section on built sources. This part is working fine.
I of course included the tools/wrapper.sh script in EXTRA_DIST in the
top level Makefile.am. I am also including foo.ice in EXTRA_DIST of
src/Makefile.am.
What works:
configuring and making the package is no problem at all, everything is
set correctly and compiling fine. Making a distribution with `make
dist' and then unpacking and building this distribution is also no
problem.
What doesn't work:
The problem is that `make distcheck' fails right at the beginning of the
build process, after configuring. It complains about not finding the
tools/wrapper.sh script:
make[1]: Entering directory `/path/to/foo_project/foo-1.0/_build'
make all-recursive
make[2]: Entering directory `/path/to/foo_project/foo-1.0/_build'
Making all in src
make[3]: Entering directory `/path/to/foo_project/foo-1.0/_build/src'
../tools/wrapper.sh /usr/bin/foo2cpp foo.ice
make[3]: ../tools/wrapper.sh: Command not found
Which is correct, there is no wrapper.sh script from where make
distcheck is looking (i.e. from
inside /path/to/foo_project/foo-1.0/_build/src). Also there are no
other files in foo-1.0/_build/src, so even if the wrapper.sh script
could be found it would choke on not finding foo.ice.
The wrapper.sh script is in foo-1.0/tools where it belongs and where it
is found fine when building a readily distributed package of foo (make
dist).
Question:
The question is: what do I have to do to satisfy make distcheck about
the location of the script? Or am I doing something wrong here? Did I
forget to set a special variable that lets make distcheck know that
there are files that need to be built from other files before being
able to `make' anyting? Do I have to define the path to the script
otherwise? Please note that I encountered the same problem when the
wrapper.sh script was placed directly in the src/ subdirectory (and
distributed correctly).
Or did I hit a limitation of automake? Is it not able to deal with such
things?
To reiterate: building a `make dist'ed package works fine and so does
building the package in it's root directory. It's just make distcheck
that fails.
Sorry for this much too long post, I hope I explained my problem well
enough for somebody (who was brave enough to read it all) to be able to
help me.
Any help is appreciated! Especially RTFM answers that contain links to
TFM and the relevant sections :)
Thanks in advance!
Andreas
--
Andreas "daff" Ntaflos
daff AT dword DOT org
Vienna, Austria
GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC 7E65 397C E2A8 090C A9B4
GPG Public Key ID: 090CA9B4
GPG Public Key: http://daffit.meownz.info/publickey/andreas_ntaflos.asc
- make distcheck not finding custom code generation script,
Andreas Ntaflos <=