Python in Makefile Question
Efrat Regev
efrat_regev at yahoo.com
Fri Feb 11 06:02:09 EST 2005
Hello,
I'd like to ask a question concerning a python script in a makefile.
Suppose I have a C++ project (sorry for raising this in a Python newsgroup),
with some makefile for it. Before compiling the code, I'd like to check that
there are no C++ convention violations (e.g., identifiers beginning with an
underscore). So my makefile looks something like this:
target: ...
verify.py
$(CC) ...
verify.py is a python script that checks for convention violations, i.e.,
its first line is
#! /usr/bin/env python
I can't figure out the following:
1. How can I get the python script to return a value to make, so that if it
decides that there are convention violations make will fail?
2. How can I pass information from the makefile to the python script, e.g.,
the base directory to check?
Thanks,
Efrat
More information about the Python-list
mailing list