Command line R script for GNU make like functionality