From: Geoffrey F. <fu...@ga...> - 2002-02-26 19:29:48
|
Hello all, Driven by desperation, I've begun to implement automatic dependency generation for PLplot. I've just committed some files, and I figure I should give people a heads up. I hope my changes today don't mess anyone up. If anyone sees builds failing as a result of these changes, please let me know ASAP so I can work on repairing things. The way it works is that I've redefined the implicit rules for building .o's from .c's. It used to just directly invoke the CC macro, with flags. Now it "calls" a macro named compile-c-and-emit-deps. This is only on Linux however. All other platforms, should, I believe, be completely unchanged by todays commits. The purpose of this macro is to do just what it's name says. It is to compile a C file, and emit dependency info for it. Then comes the tricky part. I've implemented an attempt to autodetect gcc version 3. That's because with GCC version 3, they introduced some very nice flags for dependency genration, which are very convenient, way nicer than what you had to do before. So, /if/ you have gcc version 3, then we use the new flags, otherwise we just do what we did before (which was just to compile the file, wtihout actually emitting dependencies), in which case we also don't claim to have automatic dependencies implemented yet. I'll go back and fix the gcc 2 vintage code to do dependencies later. But for now, it is supposed to just work. Please let me know if you see otherwise. That is to say, those of you using gcc 2.x.y, are supposed to see no change, either good or bad, from today's commits. And anyone using gcc 3, on Linux, is supposed to be seeing new super cool, auto morphing dependencies. There is one bizardom. Somehow, when I I try to test this with "gcc 2.96", it seems to somehow think it has a gcc 3 even though it doesn't, so it uses the new flags, but also, somehow mysteriously, this "gcc 2.96" seems to implement the new flags in gcc 3. I dunno, its too strange, maybe I need a break to clear the cobwebs. So, this is like a 50% confidence commit. Works for me, hope it doesn't screw anybody else up, let me know if it does. I figure that's okay in the post release era, and I'll try to manage quick fixes for ahyone who complains. Let me know. -- Geoffrey Furnish fu...@ga... |