[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Compiling

From: David MENTRE
Subject: Re: [Axiom-developer] Compiling
Date: 26 Apr 2003 18:45:11 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

root <address@hidden> writes:

> The reason the Makefiles are so verbose is that Make is unable to to
> automatically handle dependencies if the files are not in the same
> directory. The underlying assumption of make is that you build your
> code in the directory containing the source code.

I think this is plain wrong. :)

*Multiple* Makefiles are unable to handle multiple directories, but a
*unique* Makefile handles multiple directories quite well.

You just need to prefix your targets and sources with the correct
relative path.

For example:

dir1/target1: dir1/src1.lsp dir1/src2.c dir2/src3.lsp

dir2/src3.lsp: dir2/src3.pamphlet

The only issue with this approach is the relative verbosity of the
resulting Makefile. But using some makefile variables should help.

On that subject, you should consider to have a look at:
"Recursive Make Considered Harmful "

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]