Revision 6915
Added by Aaron Marcuse-Kubitza about 12 years ago
Makefile | ||
---|---|---|
14 | 14 |
SHELL := /bin/bash |
15 | 15 |
|
16 | 16 |
# OS |
17 |
os := $(shell uname) |
|
18 | 17 |
isMac := $(filter Darwin,$(os)) |
19 | 18 |
|
20 | 19 |
# System |
... | ... | |
22 | 21 |
mtime = $(shell $(if $(isMac),stat -f %Sm -t "$(dateFmt)" $(1),date\ |
23 | 22 |
--reference=$(1) +"$(dateFmt)")) |
24 | 23 |
|
25 |
# Terminal |
|
26 |
esc := '[' |
|
27 |
reset := $(esc)'0m' |
|
28 |
emph := $(esc)'7m ' |
|
29 |
endEmph := ' '$(reset) |
|
30 |
|
|
31 |
# User interaction |
|
32 |
|
|
33 |
confirm = $(if $(shell read -p $(emph)"$(1)"$(endEmph)$$'$(if\ |
|
34 |
$(2),\n$(2))\nContinue? (y/n) ' REPLY; test "$$REPLY" = y && echo t),,\ |
|
35 |
$(error Aborting)) |
|
36 |
|
|
37 | 24 |
# Paths |
38 | 25 |
bin := $(root)/bin |
39 | 26 |
|
Also available in: Unified diff
Makefiles: Factored out common vars/functions into lib/common.Makefile