This repository has been archived by the owner on Mar 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
60 lines (47 loc) · 1.76 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
#-------------------------------------------------------------------------------
# Copyright (C) 2018 Dominik Salvet
# SPDX-License-Identifier: MIT
# <https://github.com/dominiksalvet/asus-zenbook-ux430ua-linux-setup>
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# DEFINITIONS
#-------------------------------------------------------------------------------
# only bash is supported
SHELL := /bin/bash
ECHO := echo
SED := sed
COLUMN := column
# directory definitions
SRC_DIR := src
INSTALL_DIR := /usr/local/bin
# sed script of automatic help generation from target comments
define HELP_GENERATOR
/^[a-zA-Z]\+:[a-zA-Z ]*#.*$$/!d
s/^\s*/ /
s/\s*:[^#]*//
s/#\+\s*/#/
s/#/<U+0023>/2g
endef
export HELP_GENERATOR
#-------------------------------------------------------------------------------
# TARGETS
#-------------------------------------------------------------------------------
.PHONY: all install uninstall help about
# the default target
all: help
install: # launch an installation wizard of this program
./$(SRC_DIR)/install $(INSTALL_DIR)
uninstall: # launch an uninstallation wizard of this program
./$(SRC_DIR)/uninstall $(INSTALL_DIR)
help: # display this help
@$(ECHO) 'Usage: make [TARGET]...'
@$(ECHO)
@$(ECHO) 'TARGET:'
@$(SED) -e "$$HELP_GENERATOR" makefile | $(COLUMN) -t -s '#'
about: # display information about this program
@$(ECHO) 'asus-zenbook-ux430ua-linux-setup 1.0.3'
@$(ECHO) 'This program manages additional Linux configuration for ASUS ZenBook UX430UA.'
@$(ECHO)
@$(ECHO) 'Copyright (C) 2017-2018 Dominik Salvet'
@$(ECHO) 'SPDX-License-Identifier: MIT'
@$(ECHO) '<https://github.com/dominiksalvet/asus-zenbook-ux430ua-linux-setup>'