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 8583239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:29:10+00:00 2026-06-11T21:29:10+00:00

I have a simple makefile project where I just want make install to copy

  • 0

I have a simple makefile project where I just want make install to copy files to a target folder, ie:

all:
   @echo "Nothing to build"

install:
   cp ./*.wav /usr/share/snd

my_custom_target:
   @echo "For testing purposes"

However, whenever I try to build any targets (ie: clean, all, install, my_custom_target, etc), every single one just echos “Nothing to be done for 'clean'“, “Nothing to be done for 'all'“, etc. My guess is that a makefile project is expecting at least something being built (ie: C/C++ file, etc).

Does anyone have any suggestions on how to proceed with this?

Thank you.

  • 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-11T21:29:11+00:00Added an answer on June 11, 2026 at 9:29 pm

    This seems to indicate that make is not able to find, or not able to correctly parse, your Makefile. What is the file named?

    Also, ensure that the commands in each rule (like the cp ./*.wav /usr/share/snd) are prefixed by an actual tab character, not spaces. In the sample that you pasted in, they are prefixed simply by three spaces, but for make to parse it properly, they need to be prefixed by an actual tab character.

    One more thing to check is whether there are files named all, install, or my_custom_target. Make does not care about whether some C or C++ file is built; the rules can do anything that you want. But it does check to see if there is a file named the same as the rule, and whether it is newer than the dependencies of the rule. If there is a file, and it is newer than all dependencies (or there are no dependencies, like in this example), then it will decide that there is nothing to do. In order to avoid this, add a .PHONY declaration to indicate that these are phony targets and don’t correspond to actual files to be built; then make will always run these recipes, whether or not there is an up-to-date file with the same name.

    .PHONY: all install my_custom_target
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple Makefile: default: @make build @make run build: @javac Test.java >
I started a simple makefile for my project (MS-windows target, MinGW) with the following
I have a simple eclipse CDT project with a very simple makefile. When I
Suppose I have a simple makefile like: hello: echo hello world bye: echo bye
I have a project which has a makefile: # a simple makefile # Uncomment,
Simple question: I have a C++ project configured for a existing makefile and it
Is there anyway to have Sublime Text 2 build all files in a project?
I have this simple rule in my Makefile : PP=g++ -std=c++0x %.o: $.cpp $(PP)
I have written a small makefile for a few simple C programs that compiles
I have a simple Eclipse C project. Is there a way to add a

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.