# HG changeset patch # User jbe # Date 1422571684 -3600 # Node ID 159aa2706cdf23de7c2e6f018d0c26614ad5e070 # Parent 6889aa20b19f77df519d948bc69ae1d134922d42 Code cleanup in Makefile; Use lsb_release binary in Makefile diff -r 6889aa20b19f -r 159aa2706cdf Makefile --- a/Makefile Thu Jan 29 23:40:38 2015 +0100 +++ b/Makefile Thu Jan 29 23:48:04 2015 +0100 @@ -1,17 +1,19 @@ # BSD Makefile # On GNU systems, use bmake. -.if $(:!uname!) == "FreeBSD" +PLATFORM != uname + +.if $(PLATFORM) == "FreeBSD" # Default configuration for FreeBSD LUA_INCLUDE ?= /usr/local/include/lua52 LUA_LIBDIR ?= /usr/local/lib LUA_LIBRARY ?= lua-5.2 UTIL_FLAGS ?= -lutil -.elif $(:!uname!) == "Linux" +.elif $(PLATFORM) == "Linux" # Distinguish between different Linux distributions -DISTRIB_ID != grep ^DISTRIB_ID= /etc/lsb-release | sed -E 's/.*= *"?([^"]*)"?/\1/' -.if $(DISTRIB_ID) == "Ubuntu" +DISTRIBUTION != lsb_release -i -s +.if $(DISTRIBUTION) == "Ubuntu" # Default configuration for Ubuntu LUA_INCLUDE ?= /usr/include/lua5.2 LUA_LIBDIR ?= /usr/lib/x86_64-linux-gnu