POV-Ray : Newsgroups : povray.off-topic : Make it : Re: Make it Server Time
28 Jul 2024 04:28:32 EDT (-0400)
  Re: Make it  
From: Orchid Win7 v1
Date: 27 May 2016 13:59:34
Message: <57488b06$1@news.povray.org>
On 27/05/2016 04:36 PM, Le_Forgeron wrote:

> Actually you can ask gcc/g++ to output the dependencies on sources files. Then you
can have them read back by "make".

Yes, this is the main thing I did.

Originally, the Makefile had one entry for every source file in the 
entire project, some (but not all) listing the header files they depend 
on. (Hey, at least the exact compilation command was a variable!)

I replaced that with a rule that says how to build any object file from 
a source file. That crunched the file size down to a fraction of its 
former self. I also made G++ spit out dependency information that then 
gets included back into the Makefile. Our CI server probably won't care, 
but it'll help the next poor sod who tries to build it by hand.

Finally, I wrote some crazy Make macro [yes, Make has macros] that 
generates a list of all the object files in a folder. Before they exist. 
So that I can depend on them.

...and then I did it all over again, since apparently SO files have to 
be built with -fPIC, whatever that does...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.