[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with target-specific vars and dependencies
From: |
Boris Kolpackov |
Subject: |
Re: problem with target-specific vars and dependencies |
Date: |
Fri, 20 Aug 2004 10:14:53 -0500 |
User-agent: |
Mutt/1.5.6i |
Paul D. Smith <address@hidden> writes:
> The canonical use is:
>
> prog: prog1.o prog2.o
>
> debug: prog
> debug: CFLAGS += -g
>
> >> but not for others.
>
> bk> In all cases I know the difference between those situations is not
> bk> qualitative therefore it often catches one off guard.
>
> It only has surprising consequences if a single prerequisite can be
> reached through multiple target paths where some paths have
> target-specific variables and some don't (which isn't really that common
> for most targets)...
What about `make prog1.o' in the example above? This way of building
is common to virtually any target. The really nasty thing about this case
is the inability of makefile to detect that the file was built with wrong
options; one will only find out in debugger ;-)
Conceptually, IMO, selecting -g flag should be part of configuration
process not build process. That selection should persist over builds of
particular configuration and should only be changed if explicitly asked to
reconfigure.
-boris
signature.asc
Description: Digital signature