Browse Source

Add system detection variables

pull/5/head
10sr 9 years ago
parent
commit
0e3a1d350e
1 changed files with 41 additions and 1 deletions
  1. +41
    -1
      Makefile

+ 41
- 1
Makefile View File

@@ -15,7 +15,7 @@ vardir = $(home)/.var
bindir = $(localdir)/bin bindir = $(localdir)/bin


current = $(shell date) current = $(shell date)
ostype = $(shell uname)
uname = $(shell uname)


shrc_loadables = sh bash zsh shrc_loadables = sh bash zsh
shrc_common_tpl = shrc_common_tpl =
@@ -54,6 +54,46 @@ check-syntax: test-syntax






# System detection
# ================

# Is this usefull? Just checking uname is not enough?

ismsys =
iscygwin =
iswindows =

isdarwin =
isfreebsd =
isbsd =

islinux =

ifneq (,$(findstring MINGW,$(uname)))
ismsys = t
endif
ifneq (,$(findstring CYGWIN,$(uname)))
iscygwin = t
endif
ifneq (,$(ismsys)$(iscygwin))
iswindows = t
endif

ifneq (,$(findstring Darwin,$(uname)))
isdarwin = t
endif
ifneq (,$(findstring FreeBSD,$(uname)))
isfreebsd = t
endif
ifneq (,$(isdarwin)$(isfreebsd))
isbsd = t
endif

ifneq (,$(findstring Linux,$(uname)))
islinux = t
endif




# setups # setups
# ====== # ======


Loading…
Cancel
Save