On Wednesday, 24 בMay 2006 16:30, Ami Chayun wrote:
> I added to my src/Makefile.am the following line:
>
> include_HEADERS = api.h
> ...
> Project structure is (assuming the project is under dir named my_project):
>
> headers - my_project/include
> sources - my_project/src
Wrong directory. The Makefile.am is in src/ and the header
is in include/
Several options:
- You may try to put $(src)/../include/api.h, instead of api.h
but even if this work (didn't test it), it's a bad idea because
it breaks many assumption about directory recursion, dependency
checking etc.
- Restructure you code so the headers are in src/ as well (if
it's only a few headers and only one is installed, than why
bother separating them?)
- Or, simply put a single line Makefile.am in include/ as well.
Generally, a "deep" project (composed of a directory tree) is done
by:
- Having a toplevel Makefile.am:
SUBDIRS = include src
- Each of the mentioned subdirectories, have its own Makefile.am
include/Makefile.am
src/Makefile.am
- If any subdirectory contains further branches, it can be continued
recursively. E.g: if in src/ you have a lib/ subdirectory, then
put inside src/Makefile.am:
SUBDIRS = lib
# all other local targets:
bin_PROGRAMS = ....
and add an src/lib/Makefile.am as well
- The top level configure.ac should declare *all* Makefiles in
all levels in its output macro, since generally, it's a bad idea
to nest configure scripts.
Bye,
--
Oron Peled Voice/Fax: +972-4-8228492
[EMAIL PROTECTED] http://www.actcom.co.il/~oron
ICQ UIN: 16527398
"From Microsoft's perspective, there's a sucker born every minute"
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]