[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mixing BUILT_SOURCES, double quote include and separation of source and
Mixing BUILT_SOURCES, double quote include and separation of source and binary directory
Wed, 30 Mar 2005 09:13:23 -0500
I have a problem which I figure must be fairly common, although I found no
reference to it anywhere. I think it must be common because the SCons manual
says they fixed it.  Anyway...
Let's say I have two directories, "src" and "include". I place main.c in src
and inc.h in include. main.c includes inc.h this way:
and inc.h includes built.h this way:
Now, my src/Makefile.am contains something like this:
BUILT_SOURCES = ../include/built.h
mkdir -p $(@D)
Everything works fine as long as I am building in the source directory. If I
make a build directory and invoke configure and make from that directory,
inc.h can't find built.h. And that's normal, since built.h is in
build/include instead of include. Because it is not in the same directory as
inc.h, including it using double quotes can't work.
The quick fix is to add the location of inc.h, prefixed with $(top_builddir).
However, in my real project I have hundreds of such files with hundreds of
such locations. I would quickly hit the limit on command-line arguments.
How should I fix this problem?
- Mixing BUILT_SOURCES, double quote include and separation of source and binary directory,
Simon Perreault <=