瀏覽代碼

Add system detection variables

pull/5/head
10sr 9 年之前
父節點
當前提交
0e3a1d350e
共有 1 個檔案被更改,包括 41 行新增1 行删除
  1. +41
    -1
      Makefile

+ 41
- 1
Makefile 查看文件

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

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

shrc_loadables = sh bash zsh
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
# ======


Loading…
取消
儲存