Debug your makefile

make -d | egrep --color -i '(considering|older|newer|remake)'
Say your dependencies specified in your Makefile (or dates on your source files) is causing 'make' to skip some source-files (that it should not) or on the other other end, if it is causing make to always build some source-files regardless of dates of target, then above command is handy to find out what 'make' thinks of your date v/s target date-wise or what dependencies are in make's view-point. The egrep part removes the extra noise, that you might want to avoid.
Sample Output
$ make -d | egrep --color -i '(considering|older|newer|remake)'
 Considering target file `Makefile'.
 No need to remake target `Makefile'.
Considering target file `hffcmprss'.
  Considering target file `hffcmprss.o'.
    Considering target file `common/common_types.h'.
    No need to remake target `common/common_types.h'.
    Considering target file `gnrcheap/gnrcheap.o'.
      Considering target file `gnrcheap/gnrcheap.c'.
      No need to remake target `gnrcheap/gnrcheap.c'.
      Considering target file `gnrcheap/gnrcheap.h'.
      No need to remake target `gnrcheap/gnrcheap.h'.
     Prerequisite `gnrcheap/gnrcheap.c' is older than target `gnrcheap/gnrcheap.o'.
     Prerequisite `gnrcheap/gnrcheap.h' is older than target `gnrcheap/gnrcheap.o'.
     Prerequisite `Makefile' is older than target `gnrcheap/gnrcheap.o'.
    No need to remake target `gnrcheap/gnrcheap.o'.
    Considering target file `gnrcqueue/gnrcqueue.o'.
      Considering target file `gnrcqueue/gnrcqueue.c'.
      No need to remake target `gnrcqueue/gnrcqueue.c'.
      Considering target file `gnrcqueue/gnrcqueue.h'.
      No need to remake target `gnrcqueue/gnrcqueue.h'.
     Prerequisite `gnrcqueue/gnrcqueue.c' is older than target `gnrcqueue/gnrcqueue.o'.
     Prerequisite `gnrcqueue/gnrcqueue.h' is older than target `gnrcqueue/gnrcqueue.o'.
     Prerequisite `Makefile' is older than target `gnrcqueue/gnrcqueue.o'.
    No need to remake target `gnrcqueue/gnrcqueue.o'.
    Considering target file `gnrclist/gnrclist.o'.
      Considering target file `gnrclist/gnrclist.c'.
      No need to remake target `gnrclist/gnrclist.c'.
      Considering target file `gnrclist/gnrclist.h'.
      No need to remake target `gnrclist/gnrclist.h'.
     Prerequisite `gnrclist/gnrclist.c' is older than target `gnrclist/gnrclist.o'.
     Prerequisite `gnrclist/gnrclist.h' is older than target `gnrclist/gnrclist.o'.
     Prerequisite `Makefile' is older than target `gnrclist/gnrclist.o'.
    No need to remake target `gnrclist/gnrclist.o'.
    Considering target file `gnrctree/gnrctree.o'.
      Considering target file `gnrctree/gnrctree.c'.
      No need to remake target `gnrctree/gnrctree.c'.
      Considering target file `gnrctree/gnrctree.h'.
      No need to remake target `gnrctree/gnrctree.h'.
     Prerequisite `gnrctree/gnrctree.c' is newer than target `gnrctree/gnrctree.o'.
     Prerequisite `gnrctree/gnrctree.h' is older than target `gnrctree/gnrctree.o'.
     Prerequisite `Makefile' is older than target `gnrctree/gnrctree.o'.
    Must remake target `gnrctree/gnrctree.o'.
gnrctree/gnrctree.c: In function ?gnrctree_bfs?:
gnrctree/gnrctree.c:99: warning: suggest parentheses around assignment used as truth value
    Considering target file `hfftypes.h'.
    No need to remake target `hfftypes.h'.
    Considering target file `hffcmprss.h'.
    No need to remake target `hffcmprss.h'.
    Considering target file `hffcmprss.c'.
    No need to remake target `hffcmprss.c'.
   Prerequisite `common/common_types.h' is older than target `hffcmprss.o'.
   Prerequisite `gnrcheap/gnrcheap.o' is older than target `hffcmprss.o'.
   Prerequisite `gnrcqueue/gnrcqueue.o' is older than target `hffcmprss.o'.
   Prerequisite `gnrclist/gnrclist.o' is older than target `hffcmprss.o'.
   Prerequisite `gnrctree/gnrctree.o' is newer than target `hffcmprss.o'.
   Prerequisite `hfftypes.h' is older than target `hffcmprss.o'.
   Prerequisite `hffcmprss.h' is newer than target `hffcmprss.o'.
   Prerequisite `hffcmprss.c' is older than target `hffcmprss.o'.
   Prerequisite `Makefile' is older than target `hffcmprss.o'.
  Must remake target `hffcmprss.o'.
 Prerequisite `hffcmprss.o' is newer than target `hffcmprss'.
 Prerequisite `Makefile' is older than target `hffcmprss'.
Must remake target `hffcmprss'.

1
By: b_t
2011-06-03 01:55:08

What Others Think

Brilliant. Simple and effective. If you want to look at all of make's output, you can add "|$" to the end of the grep clause. This will syntax-highlight the words and leave the rest of the text intact. make -d | egrep --color -i '(considering|older|newer|remake|$)'
flatcap · 530 weeks and 3 days ago
If you are guys ever need help with your academic work, then you guys should check the platform of the academized reviews out. They have outstanding services for you to use and you will seriously love it for sure.
WalkerNolan · 58 weeks and 3 days ago
Pretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon! ??????
KayGasaway · 26 weeks and 1 day ago
Incredible articles and awesome design. Your blog entry merits the greater part of the positive input it"s been getting. https://gamebnat.net/mtsite09/
KayGasaway · 26 weeks ago
This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again. ?????
KayGasaway · 25 weeks and 5 days ago
I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information. https://first-11.net/
KayGasaway · 25 weeks and 2 days ago
I have recently started a blog, the info you provide on this site has helped me greatly. Thanks for all of your time & work. grapefruit & mint reed diffuser
KayGasaway · 25 weeks and 2 days ago
It is a fantastic post – immense clear and easy to understand. I am also holding out for the sharks too that made me laugh. Dank Vapes
KayGasaway · 25 weeks and 2 days ago
Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. pharmaceutical sales rep education
KayGasaway · 25 weeks and 1 day ago
I was impressed with the site that you created, so memotipasi many people to be more advanced, there also kunjugi me, as a comparison www
KayGasaway · 25 weeks ago
Persons appreciate shopping for amazing, appealing, fascinating and from time to time attractive aromas for them selves and pertaining to others. This can be executed conveniently along with inexpensively in an on-line perfume shop. local facility
KayGasaway · 25 weeks ago
I have added and shared your site to my social media accounts to send people back to your site because I am sure they will find it extremely helpful too. ??????
KayGasaway · 24 weeks ago
Incredible articles and awesome design. Your blog entry merits the greater part of the positive input it"s been getting. ????????? ???????????
ayesha · 24 weeks ago
I want to say thanks for beautiful blog sharing with us. Your blog really great resource to update my knowledge. nowe mieszkania kielce
KayGasaway · 23 weeks and 3 days ago
I have a hard time describing my thoughts on content, but I really felt I should here. Your article is really great. I like the way you wrote this information. ????
KayGasaway · 22 weeks and 6 days ago
For a long time me & my friend were searching for informative blogs, but now I am on the right place guys, you have made a room in my heart! http://circlehealthcaregroup.com/about">Full Circle Health
KayGasaway · 22 weeks and 1 day ago
Thanks for the blog filled with so many information. Stopping by your blog helped me to get what I was looking for. Now my task has become as easy as ABC. Monica Manson
KayGasaway · 14 weeks and 2 days ago
Make your dream villa a reality with Construction Bali. We are the best contractor in Bali and we are focus in villa construction in Bali. Jalan Patih Jelantik, Kuta Istana Galeria, Ring 11, Kuta, 80361, Badung, Bali, Indonesia Phone Number : +62818108808 bali construction
KayGasaway · 14 weeks and 1 day ago
I know your aptitude on this. I should say we ought to have an online discourse on this. Composing just remarks will close the talk straight away! What's more, will confine the advantages from this data. Personal Trainer San Diego
KayGasaway · 12 weeks and 1 day ago
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Video footage for sale
KayGasaway · 12 weeks and 1 day ago
I really like your blog. Great article. It's most evident, people should learn before they are able to sms notifications
KayGasaway · 12 weeks ago
Our service technicians can be with you in less than 15-25 minutes and open closed, locked and defective doors, safes and car doors. Locksmith close by! schlüsseldienst freising
KayGasaway · 11 weeks and 6 days ago
If someone week i really ashen-haired not actually pretty, whether you will lite grope a present, thought to follow us to displays bursting with ends of the earth considerably? Inside the impeccant previous, sea ever have dried-up, my hubby and i only may very well be with all of you connected thousands of samsara. geboortefotografie
KayGasaway · 11 weeks and 5 days ago
The first phase the preparation should, theoretically, be uninfluenced by the intended intensity and duration of the sound which is subsequently produced. In fact, however, so quickly are the three phases accomplished that the pianist rarely has capacity to think, in performance, of each phase separately. ????? ???
KayGasaway · 11 weeks and 4 days ago
Intriguing post. I Have Been pondering about this issue, so much obliged for posting. Really cool post.It "s truly extremely pleasant and Useful post.Thanks ??? ??? ???
KayGasaway · 11 weeks and 4 days ago
Dubai Fix Appliance is a team of experts that provide Home Appliance Repair in Dubai, Abu Dhabi & Sharjah. Contact 24/7, +971 525 859817. Call Your Service Now! appliance repair near me
KayGasaway · 6 weeks and 4 days ago
pleasant post, stay aware of this fascinating work. It truly regards realize that this subject is being secured likewise on this site so cheers for setting aside time to talk about this! N95 Face Mask
jackson2321 · 6 weeks and 2 days ago
https://pacificsandsrecovery.com At Pacific Sands Recovery Center, we treat our patients like people—not numbers. Our small setting allows us to offer personalized care and attention that is hard to achieve at larger facilities. Alcohol rehab PSRC
KayGasaway · 5 weeks and 5 days ago
https://mhcsandiego.com We carefully outline each treatment plan to successfully meet the unique needs of our clients. suicide prevention hotline
KayGasaway · 5 weeks and 5 days ago
Skissr is an international escort directory and adult social media platform. Find male, female, gay & trans escorts advertising here. escorts
KayGasaway · 3 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: