Broken makefile dependencies?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Broken makefile dependencies?

Chris Lattner-2
I am seeing a very strange situation where doing:

   make -C dir all

does not rebuild anything in dir, even though stuff is stale.  This  
command is what the recursive makefile uses to walk the directory  
structure.

The really strange thing is that:

   cd dir; make all

does rebuild stuff.

Does anyone have any idea what is going on here?  I thought they were  
identical.

-Chris
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Broken makefile dependencies?

Holger Schurig-2
>    make -d -C dir all >run1
>    cd dir; make -d all >../run2

cd ..
diff -udb run1 run2 | less


But maybe you don't have GNU make, but some Apple (BSD-derived)
make which doesn't have the "-d" switch ...
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Broken makefile dependencies?

dag-7
On Tuesday 18 December 2007 03:11, Holger Schurig wrote:
> >    make -d -C dir all >run1
> >    cd dir; make -d all >../run2
>
> cd ..
> diff -udb run1 run2 | less
>
>
> But maybe you don't have GNU make, but some Apple (BSD-derived)
> make which doesn't have the "-d" switch ...

An even better way to track down these kinds of problem is to use remake:

http://bashdb.sourceforge.net/remake/

                                        -Dave
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Broken makefile dependencies?

Mike Stump
In reply to this post by Holger Schurig-2
On Dec 18, 2007, at 1:11 AM, Holger Schurig wrote:
> But maybe you don't have GNU make, but some Apple (BSD-derived) make  
> which doesn't have the "-d" switch ...

$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.

:-)  At least it claims to be a GNU make...
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev