I’d like to execute my Makefile from a bash script file using make/gmake depending on the system it is being compiled on: gmake on FreeBSD (not the standard make) and make on others. For that I would like to determine if the make command installed on the system is GNU make:
– if GNU make then compile with make
– if not GNU make then compile with gmake (and raise error if gmake is not installed)
Is there an easy way of doing this?
EDIT: Changed –ver to –version