forked from pshirshov/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (38 loc) · 849 Bytes
/
Makefile
File metadata and controls
53 lines (38 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
export CURRENT_USER = $(shell whoami)
include environment.make
CFG_OS := $(fw_cfg_os)
export MODE ?= global
ifeq ($(MODE), global)
export SUDO=$(fw_cfg_sudo)
else
export SUDO=
endif
ifeq ($(fw_cfg_os), linux)
ADDITIONAL_TOOLS := ssmtp
ECHOSYM=echo -n "="
else
ECHOSYM=echo "=\c"
endif
TOOLS=screen zsh psql ssh $(ADDITIONAL_TOOLS) xterm
M4BIN ?= $(fw_cfg_m4)
export M4=$(M4BIN) -I ../m4 -I ../settings \
-DCFG_OS=$(CFG_OS)
#console_width=$(shell tput cols)
batch:
@for tool in $(TOOLS);\
do \
for i in `seq 2 \`tput cols\``; do $(ECHOSYM) ; done; \
echo "=" ; \
echo "== PROCESSING: '$$tool'"; \
for i in `seq 2 \`tput cols\``; do $(ECHOSYM) ; done; \
echo "=" ; \
cd $$tool ; \
$(MAKE) $(TASK) || exit 1; \
cd .. ; \
done
clean-var:
TASK=clean
clean: clean-var batch
inst-var:
TASK=install
install: inst-var batch