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

  • Home
  • SEARCH
  • 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 8115733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:33:53+00:00 2026-06-06T03:33:53+00:00

One of the many makefiles in my project shows errors in the error console

  • 0

One of the many makefiles in my project shows errors in the error console when there are no files to delete even though the -f flag is being used. Here’s the offending line in the makefile

-rm -f *.o

If I remove the dash at the beginning of the line, it stops dead in its tracks – so I know that this is the line that’s generating the error.

This is a big project with a dozen or so makefiles. What I don’t understand is that some of the others don’t have this problem.

This is the embedded programming world – I’m using WindRiver 2.6 (so the rm utility is “rm.EXE”, though it seems to have the usual options).

Does anyone know why an “rm -f” call would still generate an error if there’s nothing to delete?

  • 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-06-06T03:33:54+00:00Added an answer on June 6, 2026 at 3:33 am

    I’m not familiar with the WindRiver tools, but here’s an educated guess based on the behavior of typical Unix shells and make tools.

    When you run rm -f *.o, the following happens:

    • the shell tries to expand *.o, leaving it as is if there are no files matching it (try issuing echo *.o in a dir containing no such files, and one with such files)
    • the result of the expansion is passed to rm, so if there are no matching files, rm is called with the literal string *.o as its argument
    • rm interprets as arguments as path names, without expanding patterns (because that’s the shell’s job); the -f shuts it up if a file cannot be found

    From the error message, it looks like your rm is broken in that it still complains when no file called *.o can be found. You can work around this by first checking whether any file matches the pattern. I must admit that I don’t know how to do that in your environment.

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

Sidebar

Related Questions

Possible Duplicate: Make error: missing separator I've made many makefiles, but today I was
I have one many-to-many relationship in my model. There are two entities, Emergencies and
When performing a delete of a one-many relationship without exposing the foreign key, EF
I have several one-to-many mappings in an NHibernate project that are configured to use
A one-many or many-many relationship in Entity Framework Code First looks like this:- public
Unowned one-to-many and many-to-many relationships are defined using Sets or Lists of Keys. Let's
I have one to many association Student entity to Subject entity. Student entity association
I have a one-to-many relationship between two classes for this situation. I have a
I have a one-to-many relationship between Foo and Bar and I cannot perform an
I've got a one to many table with ids and traits for those users.

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.