For example, my default Python is 3.2, but I only have Matplotlib
installed for 2.7. However, the default version of Python on newton
is 2.6. Now the user can override it at invocation:
$ make PYTHON=python2.6 all
CP = cp
GREP = grep
MKDIR = mkdir
+PYTHON = python2.7
RM = rm
TAR = tar
gnuplot "$<" > "$@"
time-vs-y0-E.png: plot_image.py final-vs-y0-E.data
- cut -d ' ' -f 1,2,3 final-vs-y0-E.data | python2.7 ./plot_image.py --xyz -t 'Time vs impact parameter and energy' -o "$@"
+ cut -d ' ' -f 1,2,3 final-vs-y0-E.data | $(PYTHON) ./plot_image.py --xyz -t 'Time vs impact parameter and energy' -o "$@"
angle-vs-y0-E.png: plot_image.py final-vs-y0-E.data
- cut -d ' ' -f 1,2,4 final-vs-y0-E.data | python2.7 ./plot_image.py --xyz -t 'Angle vs impact parameter and energy' -o "$@"
+ cut -d ' ' -f 1,2,4 final-vs-y0-E.data | $(PYTHON) ./plot_image.py --xyz -t 'Angle vs impact parameter and energy' -o "$@"
# Pattern rule for compiling object files from C++ source
# There is an implicit rule for this in GNU make