• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

make: Nothing to be done for `default’

by admin

Most programs build with a simple, two-command sequence:

$ ./configure
$ make

The configure program is a shell script that is supplied with the source tree. Its job is to analyze the build environment. configure command creates several new files in our source directory. The most important one is Makefile. Makefile is a configuration file that instructs the make program exactly how to build the program. The make program takes as input a make file (which is normally named Makefile), which describes the relationships and dependencies among the components that compose the finished program.

While writing make files to compile kernel modules we might come across the error:

make: Nothing to be done for 'default'.

The common cause for the error is the lack of tab space before the command. A make rule always has three parts a target, a prerequisite, and the command to generate the target from the prerequisite.

target:prerequisite
       command

For make to be able to differentiate between a command and a target, the command always needs to be prefixed with one tab space. In case we fail to do so then make will not recognize it as a command and throw an error saying that there is no command specified for the target. It is the same error as given above where default is the target.

Thus to solve the problem just open the makefile and add a tab space before the command for whichever target the error is being thrown.

Final Note

./configure, make, make install — can be used to build many source code packages. We have also seen the important role that makes plays in the maintenance of programs. The make program can be used for any task that needs to maintain a target/dependency relationship, not just for compiling source code. We have seen how to resolve the “Nothing to be done for ‘default'” error while running the make program.

Filed Under: C, Linux

Some more articles you might also be interested in …

  1. homectl Command Examples in Linux
  2. How to resize (extend) a partition-based file system in Linux
  3. debchange: command not found
  4. make: command not found
  5. Which network ports are reserved by the Linux Operating System?
  6. How to Create, restore, and delete snapshots of virtual machine images in RedHat Virtualization
  7. file: command not found
  8. How To Auto Mount a FileSystem Using Systemd
  9. apt-cache Command Examples
  10. apt-mark: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright