DESC="Generate dependencies"
main(){
	if  ( ${AGCC} --path src -v2  -MF dep.ag -M src/*.cc );then true;else
		ERR_MSG="Failed executing  '${AGCC} -v2 -MM -MF dep.ag'";
		return 0;
	fi;
	
	if [ ! -f dep.ag ];then
		ERR_MSG="File with dependency information was not generated";
		return 0;
	fi;

	g++ -include src/trace.ah -M -MF dep.g  src/*.cc;
	
	echo -e "\nDIFF BETWEEN FILES 'dep.g' and 'dep.ag': \n"
	if ( diff dep.g dep.ag );then true;else
		ERR_MSG="Dependency information differs between 'g++' and 'ag++' (files: 'dep.g' and 'dep.ag')";
		return 0;
	fi;

	rm -rf dep.*;
	return 1;
}
