OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Jan 19, 2018 7:54 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: tup vs make
PostPosted: Sun May 14, 2017 10:40 pm 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7184
Location: Germany
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.)

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re: tup vs make
PostPosted: Mon May 15, 2017 12:53 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 21, 2011 9:47 pm
Posts: 261
Location: Tustin, CA USA
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.

_________________
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber


Top
 Profile  
 
 Post subject: Re: tup vs make
PostPosted: Mon May 15, 2017 2:21 pm 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7184
Location: Germany
It's all in the wiki. ;-)

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re: tup vs make
PostPosted: Mon May 15, 2017 4:29 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 21, 2011 9:47 pm
Posts: 261
Location: Tustin, CA USA
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

_________________
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber


Top
 Profile  
 
 Post subject: Re: tup vs make
PostPosted: Mon May 15, 2017 11:37 pm 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7184
Location: Germany
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? ;-)

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re: tup vs make
PostPosted: Wed May 17, 2017 9:33 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 21, 2011 9:47 pm
Posts: 261
Location: Tustin, CA USA
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!

_________________
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber


Top
 Profile  
 
 Post subject: Re: tup vs make
PostPosted: Wed Aug 09, 2017 2:03 pm 
Offline
Member
Member
User avatar

Joined: Mon Feb 22, 2016 4:40 am
Posts: 56
Location: United Kingdom
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.

_________________
Current developing Tupai, a monolithic x86 operating system
http://zesterer.homenet.org/projects.shtml


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group