help-make
[Top][All Lists]
Advanced

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

Re: (un)expected make behavior while using VPATH


From: adrian ilarion Ciobanu
Subject: Re: (un)expected make behavior while using VPATH
Date: Tue, 13 Nov 2012 23:56:43 +0200

the second rule makes a lot of sense and it's so simple that you just
never think about it, someone has to point it out for you. or maybe
it's useful to ignore it sometimes. if not, why missing from the
manual? or is MBP needed? (Perl has PBP)

second rule violation seems to be the starting point of other various,
apparently inexplicable errors and results, not only VPATH usage, it's
the "I can do it" feeling :-)

unfortunately, 'make' wouldn't warn the user with a
    "non-.PHONY target build reported successful but I can't see it"
typeof-message, so the EVERYONE user could figure out by himself he's
about to do something wrong.

the page at http://make.mad-scientist.net/multi-arch.html contains
very useful information on the subject as well.

thank you for your answer, mad scientist.


On Tue, Nov 13, 2012 at 6:56 PM, Paul Smith <address@hidden> wrote:
> On Tue, 2012-11-13 at 18:01 +0200, adrian ilarion Ciobanu wrote:
>>     %.o: %.c
>>             $(CC) $(INC) $(CFLAGS) -DSFHASH -o $(OBJDIR)/$@ -c $<
>
> This is an invalid rule.  It violates one of my "rules of makefiles":
>
> http://make.mad-scientist.net/rules.html
>
>> using it for the first time: make does not rewrite gcc's input file paths:
>
>> using it second time in a row, it does:
>
> Classic.  Don't feel bad, that's what EVERYONE does at first.  That may
> well point out that VPATH is mis-designed (or that some other facility
> is needed).  However, that's another conversation.  This might help:
>
> http://make.mad-scientist.net/vpath.html
>
> Cheers!
>



reply via email to

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