1#!/bin/bash 2FILECHECK=$1 3CXX=$2 4PREFIX=$3 5ARGS=${*:4} 6SOURCE=$(echo $ARGS | grep -oP '\S+\.cpp\b') 7OBJ=$(echo $ARGS | grep -oP '\S+\.o\b') 8$CXX $ARGS 2>&1 | $FILECHECK -check-prefix=$PREFIX $SOURCE 9if [ "$?" -eq 0 ]; then 10 touch $OBJ 11else 12 exit 1 13fi 14