Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4535530
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:25:00+00:00 2026-05-21T14:25:00+00:00

How does GNU make decide which of the messages to emit? The Makefile I

  • 0

How does GNU make decide which of the messages to emit? The Makefile I am using causes Nothing to be done for ‘target’ messages to be emitted when the target is up do date. But I think ‘target’ is up to date would be more appropriate.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T14:25:00+00:00Added an answer on May 21, 2026 at 2:25 pm

    The chief difference is in whether gmake has a rule to build the target or not. If there is no rule for the target, but the target exists, then gmake will say, “Nothing to be done”, as in, “I don’t know how to update this thing, but it already exists, so I guess there’s nothing to be done.” If there is a rule, but the target is already up-to-date, then gmake will say, “is up to date”, as in, “I do have instructions for updating this thing, but it appears to already be up-to-date, so I’m not going to do anything.”

    Here’s a concrete example:

    $ echo "upToDate: older ; @echo done" > Makefile
    $ touch older ; sleep 2 ; touch upToDate ; touch nothingToDo
    $ ls --full-time -l older upToDate nothingToDo
    -rw-r--r-- 1 ericm ericm 0 2011-04-20 11:13:04.970243002 -0700 nothingToDo
    -rw-r--r-- 1 ericm ericm 0 2011-04-20 11:13:02.960243003 -0700 older
    -rw-r--r-- 1 ericm ericm 0 2011-04-20 11:13:04.960243001 -0700 upToDate
    $ gmake upToDate
    gmake: `upToDate' is up to date.
    $ gmake nothingToDo
    gmake: Nothing to be done for `nothingToDo'.
    

    Since gmake has no rule for “nothingToDo”, but the file already exists, you get the “nothing to be done” message. If “nothingToDo” did not exist, you would instead get the familiar, “No rule to make” message.

    In contrast, because gmake has a rule for “upToDate”, and the file appears to be up-to-date, you get the “is up to date” message.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using GNU make. In a Makefile that I got, i see the
What does $+ in a GNU makefile mean? Also, please give me some good
Is there anything that should be done to make GNU Emacs 23.2 work well
I usually have an environment setting for MAKE_MODE (Windows XP, using GNU make, both
My makefile fails with error: Makefile:34: *** multiple target patterns. Stop. What does it
I use CMake with GNU Make and would like to see all commands exactly
Could you explain me, why Makefile rule: clean: rm -f foo.{bar1,bar2,bar3} does not result
In Emacs, how does one emulate mouse button presses and the like using a
I'd like to define a GNU make pattern rule with the dependencies in a
I find it difficult sometimes to locate errors/warnings in large projects upon make-ing (gnu).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.