How to execute a makefile from LINUX system.

Ben Finney bignose+hates-spam at benfinney.id.au
Tue Oct 21 02:43:54 EDT 2008


gaurav kashyap <gauravkec2005 at gmail.com> writes:

> How to run the makefile using some python function.

A makefile is not a program to be run; it contains a declarative
(*not* procedural) data set for the ‘make’ program. You need to invoke
the ‘make’ command, tell it which file to read, and specify which
target you want it to achieve.

An example:

    $ make -f /tmp/foo/makefile spam

where ‘/tmp/foo/makefile’ is the path to the file containing the data
set, and ‘spam’ is the target you want ‘make’ to achieve.

How do you know which target you want? You'll need that information
from the author of the makefile, such as in the documentation that
comes with the makefile.

-- 
 \             “I put contact lenses in my dog's eyes. They had little |
  `\   pictures of cats on them. Then I took one out and he ran around |
_o__)                                      in circles.” —Steven Wright |
Ben Finney



More information about the Python-list mailing list