-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (47 loc) · 1.88 KB
/
Makefile
File metadata and controls
64 lines (47 loc) · 1.88 KB
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
ROOT := .
SHELL := /bin/bash
ME := cli-shell-utils
APT_WRAPPER := cli-package-installer
DEB_ROOT := debian
SCRIPTS := live-usb-maker live-kernel-updater
LIB_DIR := $(ROOT)/usr/local/lib/$(ME)
BIN_DIR := $(ROOT)/usr/local/bin
LOCALE_DIR := $(ROOT)/usr/share/locale
DESK_DIR := $(ROOT)/usr/share/applications/antix
MAN_DIR := $(ROOT)/usr/local/share/man/man1
SCRIPTS_ALL := $(addsuffix -all, $(SCRIPTS))
ALL_DIRS := $(LIB_DIR) $(BIN_DIR) $(LOCALE_DIR) $(DESK_DIR) $(MAN_DIR)
.PHONY: $(SCRIPTS) dd-live-usb help all lib $(SCRIPTS_ALL) debian clean locales
help:
@echo "make help show this help"
@echo "make debian Install under $(DEB_ROOT)/ directory"
@echo " delete scripts that are packaaged elsewhere"
@echo "make clean remove the $(DEB_ROOT)/ directory"
@echo "make all install to current directory"
@echo "make all ROOT= install to /"
@echo "make all ROOT=dir install to directory dir"
@echo "make lib install the lib and aux files"
@echo "make live-usb-maker install live-usb-maker"
@echo "make live-kernel-updater install live-kernel-updater"
@#echo ""
@#echo ""
all: $(SCRIPTS) dd-live-usb lib locales
debian:
mkdir -p $(DEB_ROOT)
make all ROOT=$(DEB_ROOT)
rm -f $(DEB_ROOT)/$(LIB_DIR)/bin/copy-initrd-*
clean:
test -d $(DEB_ROOT) && rm -r $(DEB_ROOT) || true
lib: | $(LIB_DIR) $(LOCALE_DIR)
cp -r $(ME).bash bin text-menus $(LIB_DIR)
locales: | $(LOCALE_DIR)
cp -r locale/* $(LOCALE_DIR)
dd-live-usb: | $(BIN_DIR)
cp ../live-usb-maker/dd-live-usb $(BIN_DIR)
$(SCRIPTS): | $(BIN_DIR) $(DESK_DIR) $(MAN_DIR)
cp ../$@/$@ $(BIN_DIR)
test -e ../$@/$@.desktop && cp ../$@/$@.desktop $(DESK_DIR) || true
test -e ../$@/$@.1 && gzip -c ../$@/$@.1 > $(MAN_DIR)/$@.1.gz || true
$(ALL_DIRS):
test -d $(ROOT)/
mkdir -p $@