This repository has been archived by the owner on May 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
/
Makefile
75 lines (57 loc) · 2.01 KB
/
Makefile
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
#!/bin/make -f
DO := ./build/utils.sh
SET_CONFIG := $(DO) set-config
DESTDIR ?= /
PREFIX ?= /usr
MAYBE_SUDO_DO := $(DO)
define colorecho
@tput setaf 118 || true
@echo $1 || true
@tput sgr0 || true
endef
ifeq ($(DESTDIR),/)
MAYBE_SUDO_DO := sudo $(DO)
endif
# Configuration: Use values from command line if provided, default values otherwise.
at_spi_service ?= False
background_images_dir ?= $(abspath $(PREFIX)/share/backgrounds)
config_dir ?= $(abspath /etc/lightdm)
debug_mode := False
decorated := False
greeters_dir ?= $(abspath $(PREFIX)/share/xgreeters)
locale_dir ?= $(abspath $(PREFIX)/share/locale)
themes_dir ?= $(abspath $(PREFIX)/share/web-greeter/themes)
logo_image ?= $(themes_dir)/default/img/antergos-logo-user.png
stays_on_top := True
user_image ?= $(themes_dir)/default/img/antergos.png
ifeq ($(MAKECMDGOALS),build_dev)
debug_mode := True
decorated := True
stays_on_top := False
endif
_apply_config:
@$(SET_CONFIG) at_spi_service $(at_spi_service)
@$(SET_CONFIG) background_images_dir $(background_images_dir)
@$(SET_CONFIG) config_dir $(config_dir)
@$(SET_CONFIG) debug_mode $(debug_mode)
@$(SET_CONFIG) decorated $(decorated)
@$(SET_CONFIG) greeters_dir $(greeters_dir)
@$(SET_CONFIG) locale_dir $(locale_dir)
@$(SET_CONFIG) themes_dir $(themes_dir)
@$(SET_CONFIG) logo_image $(logo_image)
@$(SET_CONFIG) stays_on_top $(stays_on_top)
@$(SET_CONFIG) user_image $(user_image)
_build_init: clean
$(DO) build-init
all: install
build: _build_init _apply_config
$(DO) build $(PREFIX)
build_dev: install
$(MAYBE_SUDO_DO) install-dev
clean:
$(DO) clean
install: build
./build/utils.sh prepare-install $(PREFIX)
$(MAYBE_SUDO_DO) install $(DESTDIR) $(PREFIX)
$(call colorecho, SUCCESS!)
.PHONY: all _apply_config _build_init build build_dev clean install