[EMAIL PROTECTED] wrote:
I have a problem using makedepend. By default, makedepend generate the
dependancy that the .o files are in the same directory as the src file.
But in my case, I have all the .o file in a different directory. Say, my
src files are in ./src, while obj files are in ./obj. How do I specify the
path for the obj files in makedepend? I tried -p option, but it prepends
the prefix instead of replacing the whole path.
I suspect that you are doing something like:
makedepend ./src/foo.c
which is generating a line of the form:
./src/foo.o: ./src/foo.c
When you want:
./obj/foo.o: ./src/foo.c
and you've discovered that doing
make depend ./src/foo.c -p ./obj/
gives you:
./obj/./src/foo.o: ./src/foo.c
The simplest solution is to do this instead:
cd ./src ; makedepend foo.c
You'll want to add a -f option to specify the Makefile that you are
updating with dependencies so that this works.
John.
--
John Graham-Cumming
[EMAIL PROTECTED]
Home: http://www.jgc.org/
POPFile: http://getpopfile.org/
Sign up for my Spam and Anti-spam Newsletter
at http://www.jgc.org/
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make