forked from SrainApp/srain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
96 lines (78 loc) · 2.01 KB
/
Makefile.in
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Makefile
# Export all variables
export
# Package meta message
PACKAGE = srain
PACKAGE_NAME = Srain
PACKAGE_APPID = im.srain.Srain
PACKAGE_BUILD = $(shell [ -d .git ] && \
git rev-parse --git-dir > /dev/null 2>&1 && \
echo -n -git@0.`git rev-list --count HEAD`.`git describe --always`)
PACKAGE_VERSION = 1.0.0
PACKAGE_AUTHOR = Shengyu Zhang
PACKAGE_EMAIL = [email protected]
PACKAGE_DESC = Modern IRC client written in GTK.
PACKAGE_WEBSITE = https://srain.im
PACKAGE_COPYRIGHT_DATES = 2016 - 2020
PACKAGE_DATA_DIR = $(DATADIR)
PACKAGE_CONFIG_DIR = $(SYSCONFDIR)
MAKE = make
DEL = rm -rf
INSTALL = install -v
DBG = gdb
BUILD_DIR = $(BUILDDIR)
TARGET = $(BUILD_DIR)/$(PACKAGE).out
FAKE_HOME = $(BUILD_DIR)/home/$(PACKAGE)
FAKE_XDG_DATA_DIR = $(PREFIX)/share:/usr/share:/usr/local/share
default: src/Makefile
- mkdir -p $(BUILD_DIR)
$(MAKE) -C data resources
$(MAKE) -C src
.PHONY: install
install: install-bin install-data install-po
.PHONY: install-bin
install-bin:
$(INSTALL) -Dm755 "$(TARGET)" "$(DESTDIR)$(PREFIX)/bin/$(PACKAGE)"
.PHONY: install-data
install-data: data/Makefile
$(MAKE) -C data
.PHONY: install-po
install-po: po/Makefile
$(MAKE) -C po
.PHONY: install-doc
install-doc: doc/Makefile
$(MAKE) -C doc install
.PHONY: doc
doc: doc/Makefile
$(MAKE) -C doc
.PHONY: view-doc
view-doc: doc/Makefile
$(MAKE) -C doc view
.PHONY: run
run:
unset XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME; \
export HOME=$(FAKE_HOME); \
export XDG_DATA_DIRS=$(FAKE_XDG_DATA_DIR); \
"$(DESTDIR)$(PREFIX)/bin/$(PACKAGE)"
.PHONY: bt
bt:
unset XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME; \
export HOME=$(FAKE_HOME); \
export XDG_DATA_DIRS=$(FAKE_XDG_DATA_DIR); \
$(DBG) "$(DESTDIR)$(PREFIX)/bin/$(PACKAGE)" -ex 'r' -ex 'bt' -ex 'q'
.PHONY: gtk-dbg
gtk-dbg:
GTK_DEBUG=interactive \
GOBJECT_DEBUG=instance-countcd \
$(MAKE) run
.PHONY: clean
clean:
$(DEL) $(BUILD_DIR)/*
.PHONY: cleanobj
cleanobj:
$(DEL) $(BUILD_DIR)/*.c
$(DEL) $(BUILD_DIR)/*.o
$(DEL) $(TARGET)
.PHONY: todo
todo:
grep --color=auto -r -E "TODO|FIXME" src/