moonbridge

changeset 24:159aa2706cdf

Code cleanup in Makefile; Use lsb_release binary in Makefile
author jbe
date Thu Jan 29 23:48:04 2015 +0100 (2015-01-29)
parents 6889aa20b19f
children 2916ad931f7e
files Makefile
line diff
     1.1 --- a/Makefile	Thu Jan 29 23:40:38 2015 +0100
     1.2 +++ b/Makefile	Thu Jan 29 23:48:04 2015 +0100
     1.3 @@ -1,17 +1,19 @@
     1.4  # BSD Makefile
     1.5  # On GNU systems, use bmake.
     1.6  
     1.7 -.if $(:!uname!) == "FreeBSD"
     1.8 +PLATFORM != uname
     1.9 +
    1.10 +.if $(PLATFORM) == "FreeBSD"
    1.11  # Default configuration for FreeBSD
    1.12  LUA_INCLUDE ?= /usr/local/include/lua52
    1.13  LUA_LIBDIR  ?= /usr/local/lib
    1.14  LUA_LIBRARY ?= lua-5.2
    1.15  UTIL_FLAGS  ?= -lutil
    1.16  
    1.17 -.elif $(:!uname!) == "Linux"
    1.18 +.elif $(PLATFORM) == "Linux"
    1.19  # Distinguish between different Linux distributions
    1.20 -DISTRIB_ID != grep ^DISTRIB_ID= /etc/lsb-release | sed -E 's/.*= *"?([^"]*)"?/\1/'
    1.21 -.if $(DISTRIB_ID) == "Ubuntu"
    1.22 +DISTRIBUTION != lsb_release -i -s
    1.23 +.if $(DISTRIBUTION) == "Ubuntu"
    1.24  # Default configuration for Ubuntu
    1.25  LUA_INCLUDE ?= /usr/include/lua5.2
    1.26  LUA_LIBDIR  ?= /usr/lib/x86_64-linux-gnu

Impressum / About Us