• 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. How To Use distro-sync Option With dnf To Upgrade OS (CentOS/RHEL 8)
  2. CentOS / RHEL : How to configure alias (virtual interface) of bond interface (bondx:y)
  3. Linux / UNIX : How to find files which has SUID/SGID set
  4. CentOS / RHEL 6 : How to extract initramfs image and edit/view it
  5. How to Change or Rename a Mount Point in Linux
  6. RHEL 7 – RHCSA Notes : Create hard and soft links.
  7. CentOS / RHEL : How to view the commands executed in yum history command output
  8. How to configure kdump in Oracle Enterprise Linux (OEL 5,6)
  9. How to split iso or file using ‘split’ command in Linux
  10. How to analyze basic system performance using – vmstat, sar, iostat and mpstat

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright