#!/bin/sh # Usage: ./mkmk [compiler-name] dirs="src example_f90 benchmarking benchmarking/test_acc" if [[ $# == 1 ]] then echo $1 > .compiler fi # make sure we have copies of .compiler if [[ -e .compiler ]] then for dir in $dirs do cp -pv .compiler $dir/ done fi # now build the makefiles for dir in $dirs do pushd $dir ./mkmk popd done