-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (23 loc) · 1.11 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
MKDIR_P := mkdir -p
RELEASE_DOC_FILES := copyright envylogger.html README.md
RELEASE_DOC_DIR := ./usr/local/share/doc/envylogger
RELEASE_MAN_FILES := envylogger.1.gz
RELEASE_MAN_DIR := ./usr/local/share/man/man1
RELEASE_SBIN_FILES := envylogger
RELEASE_SBIN_DIR := ./usr/local/sbin
directories := ${RELEASE_SBIN_DIR} ${RELEASE_MAN_DIR} ${RELEASE_DOC_DIR}
.PHONY: release release_dirs release_cleanall release_docs release_man release_sbin
release: envylogger.tar.gz
envylogger.tar.gz: release_docs release_man release_sbin
tar czf envylogger.tar.gz ./usr
if [ -d ./usr ] && [ -f envylogger.tar.gz ]; then rm -r ./usr; fi
release_cleanall:
if [ -d ./usr ]; then rm -r ./usr; fi
release_dirs: release_cleanall
for d in ${directories}; do ${MKDIR_P} $$d; done
release_docs: release_dirs ${RELEASE_DOC_FILES}
for rf in ${RELEASE_DOC_FILES}; do cp -f $$rf ${RELEASE_DOC_DIR}; done
release_man: release_dirs ${RELEASE_MAN_FILES}
for rf in ${RELEASE_MAN_FILES}; do cp -f $$rf ${RELEASE_MAN_DIR}; done
release_sbin: release_dirs ${RELEASE_SBIN_FILES}
for rf in ${RELEASE_SBIN_FILES}; do cp -f $$rf ${RELEASE_SBIN_DIR}; done