Closed jeremy-rutman closed 7 years ago
Perhaps using the shell
function?
UBUNTU_VERSION := $(shell grep DISTRIB_CODENAME /etc/lsb-release | sed s/DISTRIB_CODENAME=//)
Implemented as of d09025798f8532a6ba82b1ea53be7fa5e5c8b41e (20161201)
The use of 'precise' in line 92 of the makefile predictably gave trouble on a non-precise ubuntu14.04 system, replacing it with 'trusty' took care of it. So to do this automatically one can find the version info in /etc/lsb-release, the following extracts the 'trusty' or 'precise' part grep -e "DISTRIB_CODENAME" /etc/lsb-release | sed s/DISTRIB_CODENAME=//
I attempted to put this into the Makefile but the rules seem different than shell scripts - so if there is a Makefile enthusiast perhaps you can take the output of the above command and put it into a variable. the attempt I made was UBUNTU_VERSION=
grep -e "DISTRIB_CODENAME" /etc/lsb-release | sed s/DISTRIB_CODENAME=//
but this simply puts the string into the variable and not the output of the string run as command.