On Mon, 16 Aug 2010, ali hagigat wrote: > Unlike make???les explicitly requested with ???-f??? or ???--file??? options, > make is not certain that > these make???les should exist. However, if a default make???le does not > exist but can be created > by running make rules, you probably want the rules to be run so that > the make???le can be > used. > ------------------------------------------------------------------------------------------------------------------------------ > > Suppose if i do not have any makefile at the working directory and i > run `make` command. > The manual says this command will create a makefile by running make > rules! When there is no makefile, where will be those make rules? > > Meanwhile in my Fedora box I get the following error by running make > without makefiles: > "make: *** No targets specified and no makefile found. Stop." > there are built in rules defined that describe how to create a target i.e. if you type
make hello it will search for a large variety of files that make sees as suitable sources to generate the target hello which is taken to be an executable. If you want to see what endless list of possible sources for hello make will try, run make with the -d option. i.e. make -d hello (whith no makefile in the directory and no hello.*) you get something like. make -d hello ... Trying pattern rule with stem `hello'. Rejecting impossible implicit prerequisite `hello.c'. Trying pattern rule with stem `hello'. Rejecting impossible implicit prerequisite `hello.cc'. Trying pattern rule with stem `hello'. Rejecting impossible implicit prerequisite `hello.C'. Trying pattern rule with stem `hello'. Rejecting impossible implicit prerequisite `hello.cpp'. Trying pattern rule with stem `hello'. Rejecting impossible implicit prerequisite `hello.p'. Trying pattern rule with stem `hello'. Rejecting impossible implicit prerequisite `hello.f'. Trying pattern rule with stem `hello'. Rejecting impossible implicit prerequisite `hello.F'. Trying pattern rule with stem `hello'. Rejecting impossible implicit prerequisite `hello.r'. ... if you how ever type make without giving it any target then make is unable to apply any of its built-in rules and after searching for all possible names of makefiles to extract a default target, consequently can't do anything and stops. hofrat _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
