forked from npinto/gentoo-prefix-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpers.mk
48 lines (40 loc) · 1.25 KB
/
helpers.mk
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
ifndef HELPERS_MK
HELPERS_MK=helpers.mk
debug:
export EPREFIX=${EPREFIX}-debug
clean:
rm -f bootstrap-prefix.sh
rm -rvf install/
uninstall: uninstall-ask uninstall-force
uninstall-ask:
@echo "*************************************************************"
@echo "** WARNING WARNING WARNING WARNING WARNING WARNING WARNING **"
@echo "*************************************************************"
@echo "Are you sure you want to uninstall ${EPREFIX} ??"
@echo "Press any key to continue or CTRL-C to cancel."
@echo
@read null
@echo "*************************************************************"
@echo "Are you really really sure ???"
@echo "Press any key to continue or CTRL-C to cancel."
@echo
@read null
uninstall-force: clean
mv -f ${EPREFIX} ${EPREFIX}.deleteme 2> /dev/null || exit 0
rm -rf ${EPREFIX}.deleteme
backup: ${EPREFIX}
mv -vf ${EPREFIX} ${EPREFIX}-backup-$(shell date +"%Y-%m-%d_%Hh%Mm%Ss")
help:
@cat README.txt
@echo
@echo "Available actions (targets):"
@echo "----------------------------"
@./utils/list_make_targets.sh
@echo
@echo "To see which commands will be executed by each action, use:"
@echo "\$$ make -n action"
@echo
@echo "To debug an action in a ${EPREFIX}-debug, use:"
@echo "\$$ make debug action"
@echo
endif