help-make
[Top][All Lists]
Advanced

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

Re: Copied sourcefiles, automatic dependencies


From: Torsten Mohr
Subject: Re: Copied sourcefiles, automatic dependencies
Date: Wed, 1 Aug 2007 13:18:27 +0200
User-agent: KMail/1.9.1

Hi,

> This is unnecessarily complex; you can just use:
>
>   BASENAMES := $(basename $(notdir $(SRC)))
>
> Or, if you really do want to only strip the .c and leave any other
> suffixes alone, you can use:
>
>   BASENAMES := $(patsubst %.c,%,$(notdir $(SRC)))

thanks.

> Using underscores you'll definitely have this problem, because your
> target name and prerequisite name don't match each other.  However, if
> you use a deep directory then it works fine, just write:
>
>   dep_dir/%.d : %.d
>               $(MAKEDEPEND) ...
>
> Make will match the "%" as if they were strings (to make that's all they
> are) so they can be deep if you want (as long as they are identical).

thanks a lot for those hints.  I'll try the solution with the deep directory
structure then.


Best regards,
Torsten.




reply via email to

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