Patches item #1844492, was opened at 2007-12-05 01:00 Message generated for change (Comment added) made by zmoelnig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1844492...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: bugfix
Status: Open Resolution: None
Priority: 5 Private: No Submitted By: Hans-Christoph Steiner (eighthave) Assigned to: Miller Puckette (millerpuckette) Summary: improved makefile.dependencies generation
Initial Comment:
This patch started with a bug in the MinGW build and then a suggestion from Russell Bryant. In addition to adding this patch, "pd/src/makefile.dependencies" should be removed from CVS.
Basically, this patch monitors $(SRC) and the newly created $(HEADERS) for changes, and if any of those files change, then makefile.dependencies is regenerated (this is still leaving out the portaudio headers).
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2007-12-17 21:16
Message: Logged In: YES user_id=564396 Originator: NO
(oops, incidentally closed...)
make can handle dependencies pretty well, even if there is no makefile.dependencies yet for inclusion. the secret is, that make will iterate several times over a makefile in order to get dependencies right.
that is: when running make it will try to "-include makefile.dependencies" (the "-" is there to prevent a fatal error because of the missing makefile), and fail (because of the missing makefile), than it will find a rule to build the makefile and run it (generating the makefile.dependencies); then it will re-run itself, include the makefile.dependencies and thus get the dependencies right.
this is almost the canonical way to use dependencies with make. the gnu make manual suggest to split the dependencies into several files (one per c-file)
----------------------------------------------------------------------
Comment By: Miller Puckette (millerpuckette) Date: 2007-12-17 17:54
Message: Logged In: YES user_id=313747 Originator: NO
How does this not break the line, "include makefile.dependencies" in makefile? That's the reason the empty makefile.dependencies file is in CVS. Of course, I'd prefer something better than what's there now.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1844492...