OSDev.org
https://forum.osdev.org/

tup vs make
https://forum.osdev.org/viewtopic.php?f=13&t=31894
Page 2 of 2

Author:  Solar [ Sun May 14, 2017 10:40 pm ]
Post subject:  Re: tup vs make

eryjus wrote:
Now, I can barely spell 'CMake', but it sounds like it could have a similar situation where the build files would "clutter" up the test image depending on how it was set up.


There are a couple of CMake-generated files at the top level of the binary directory, most prominently the CMakeCache.txt holding all the stored values (so CMake doesn't have to re-run all the tests e.g. regarding system libraries), and of course the build files (Makefile, MSVC solution, ...). I am not sure what you refer to as "the test image".

Solar wrote:
I'm sure there are many other ways to do this other than what I had set up, but I also had to make sure that the .o file was dependent on the .d file...


That's the case for the Makefile as well: The (generated) .d file lists itself as a dependency for the .o file. Again, on first build you need to run the rule anyway, and on subsequent builds the (included) .d file handles the dependency.

(Not bashing on tup at all here, I just prefer that "the opposition" is represented fairly in comparisons.)

Author:  eryjus [ Mon May 15, 2017 12:53 pm ]
Post subject:  Re: tup vs make

Solar wrote:
That's the case for the Makefile as well: The (generated) .d file lists itself as a dependency for the .o file. Again, on first build you need to run the rule anyway, and on subsequent builds the (included) .d file handles the dependency.


OK, it is now painfully obvious that my makefiles were set up wrong to begin with. :oops: Can you please post an example? I think it will help more than just me.

Author:  Solar [ Mon May 15, 2017 2:21 pm ]
Post subject:  Re: tup vs make

It's all in the wiki. ;-)

Author:  eryjus [ Mon May 15, 2017 4:29 pm ]
Post subject:  Re: tup vs make

OK, so, separate step to build the .d files and having to run the output through sed to prepend the actual output directory....

You know, I went and looked at the history to see where I might have missed it. No fair that you updated it less than 2 weeks ago!!! :shock: :P

Seriously, though, I never saw this wiki. I spent all my time reading the Hard Build System, which of course had an external link to the GNU Make manual but no link to this wiki. I never thought to search for "makefile". #-o

Author:  Solar [ Mon May 15, 2017 11:37 pm ]
Post subject:  Re: tup vs make

eryjus wrote:
OK, so, separate step to build the .d files and having to run the output through sed to prepend the actual output directory....


Errr.... what? As I said, the .d files are created by GCC, by virtue of the -MMD -MP options.

eryjus wrote:
You know, I went and looked at the history to see where I might have missed it. No fair that you updated it less than 2 weeks ago!!! :shock: :P


There has not been a significant edit to that wiki page for years. I fixed an outdated link... the part about the dependency handling was in there since, uh, 2010? ;-)

Author:  eryjus [ Wed May 17, 2017 9:33 pm ]
Post subject:  Re: tup vs make

So, I realized where my mistakes came from. :oops: I thought it good to share what I did wrong.

I was using Peter Miller's paper linked from the Hard Build System wiki. In particular, section 5.4 outlines a dependency configuration that is inferior to what is outlined in the Makefile wiki.

At any rate, I did add a comment to the wiki as a call-out. Hopefully, others can learn before they make the same mistakes I did.

Solar wrote:
There has not been a significant edit to that wiki page for years. I fixed an outdated link... the part about the dependency handling was in there since, uh, 2010? ;-)


It still make me laugh!

Author:  zesterer [ Wed Aug 09, 2017 2:03 pm ]
Post subject:  Re: tup vs make

I've been using Tup for over 6 months for OS development. It's a superb and extremely capable tool, with many minor issues that let it down. The Tup language is not very expressive, it doesn't integrate as well into the rest of the unix environment as make does, and it's lack of recursive globbing is sometimes a problem. Nevertheless, it's definitely worth trying.

EDIT: I'll add now that I've finally switched to Make. Tup is very, very good. But nothing beats Make for versatility and POSIX integration.

Page 2 of 2 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/