LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 06-05-2018, 07:18 AM   #1
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 102
Blog Entries: 1

Rep: Reputation: Disabled
Question How to make an incremental build ?


Hi All,

I have a makefile(Clearmake Makefile) and I have a target processor compiler for cross-compiling. One of the problems here is that I can not use GCC because I do not want to introduce another tool. So, in order to implement an incremental build, I had to use target processor option to generate the dependency file which will capture all the dependent file information to build the .o file and I was able to generate the same(i.e., a .d file). Now, I want to use this file(i.e., .d) to do my incremental build.

Tried referring GCC makefile options -MD and -MP and I was able to successfully understand the process. But, I was not able to implement the same using Clearlake with a dependent file generated by a target processor compiler.
 
Old 06-06-2018, 06:09 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
clearmake can do it by itself and much better than gcc will ever be able. These are called derived objects (and also you may check about wink-in). These are not the depend files (which are generated by gcc) and which are not really required if you use the full power of clearmake.
If you use a pure clearmake environment (= a view) clearmake will automatically handle it and you do not need to take care about it at all (= you do not need those depend files or anything similar).
 
Old 06-06-2018, 06:33 AM   #3
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 102

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
pan64, that is true. But, my files are view private files in a snapshot view.
 
Old 06-06-2018, 08:30 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
ok. So the best solution would be to create derived objects (instead of view private files).
But if you don't want to do that you have still several possibilities:
1. go with gcc (gcc is not a make, but a c compiler). You need to use a compiler anyway (by the way which one do you use?)
2. use cpp instead of gcc, but probably it is just the same issue.
3. analyse c files as text files and process includes. You need to implement a script to collect the dependencies (although you may try to find it on the net).
4. use strace or similar low level tool to collect and produce that list. This solution may work with other targets too. Also requires a new script.
 
Old 06-06-2018, 08:59 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by rpittala View Post
pan64, that is true. But, my files are view private files in a snapshot view.
Hm. This sounds familiar:
https://www.linuxquestions.org/quest...ry-4175605788/
 
Old 06-07-2018, 06:12 AM   #6
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 102

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
The problem is that I do not want to create derived objects because I have few files which are completely view private files. I am using the Windriver compiler option to generate the .d files. Now, how can I make use of these .d files to do an incremental build?

Last edited by rpittala; 06-07-2018 at 06:15 AM.
 
Old 06-07-2018, 06:24 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by rpittala View Post
The problem is that I do not want to create derived objects because I have few files which are completely view private files. I am using the Windriver compiler option to generate the .d files. Now, how can I make use of these .d files to do an incremental build?
You modify your makefile accordingly. After working with this setup for over a year now, you should be familiar with how to make those modifications.
 
Old 06-07-2018, 06:37 AM   #8
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 102

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
https://www.linuxquestions.org/quest...ry-4175605788/

You were referring to the above link which was of a different concept and purpose of using it. I think both the questions are different.
 
Old 06-07-2018, 06:51 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by rpittala View Post
https://www.linuxquestions.org/quest...ry-4175605788/

You were referring to the above link which was of a different concept and purpose of using it. I think both the questions are different.
Yet the answer remains the same; modify your makefile to use/output/read/whatever you'd like in whatever location.
 
Old 06-07-2018, 07:23 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
you can use the .d files as it was generated by gcc, exactly the same way (if I know it well).
 
Old 06-07-2018, 07:34 AM   #11
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 102

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Awesome !! ..I did not realize that modifying a makefile will really resolve my problem?
 
Old 07-26-2018, 03:03 AM   #12
beahuan
LQ Newbie
 
Registered: Jul 2018
Posts: 5

Rep: Reputation: 0
great answers
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to make remote incremental backup of LUKS-encrypted disk/partition LXer Syndicated Linux News 0 02-16-2015 12:50 PM
[SOLVED] i can't perfome make install commond while build binutils-build LFS plzzz help me Carl_cj Linux From Scratch 19 09-04-2014 11:52 AM
remove the gcc-build, binutils-build, etc after make @d4M Linux From Scratch 6 01-26-2009 04:29 AM
duplicity won't make incremental backups niehls Linux - Software 1 11-03-2007 06:55 AM
How to make an incremental patch from two diffs ojbyer@usa.net Linux - Software 0 06-18-2006 09:37 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 01:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration