-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
49 lines (40 loc) · 1.01 KB
/
makefile
File metadata and controls
49 lines (40 loc) · 1.01 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
# ------------------------------------------------
# Generic Makefile
#
# Author: David McDanel dave.mcdanel@gmail.com
# Date : 2020-04-11
#
# Changelog :
# 2020-04-11 - Create new. DLM
# ------------------------------------------------
# project name (generate executable with this name)
GITEAUSER = dave.mcdanel
TARGET = $(notdir $(shell pwd))
TARGET_DIR = $(shell pwd)
SERVER_NAME = dave@hamshack.kc0bpo.net
SERVER_DIR = /var/www/html/gitea/$(GITEAUSER)/$(TARGET)
BUILDID=$(shell date +%Y%m%d-%H:%M:%S)
COMMIT_COMMENT?='Automatic commit of successful build.'
rm = rm -f
.PHONY: run
run:
$(shell $(TARGET))
.PHONY: install
install:
rm /usr/local/bin/$(TARGET)
cp $(TARGET) /usr/local/bin/
.PHONY: push
push:
cd $(TARGET_DIR) && \
git push origin master
.PHONY: pull
pull:
cd $(TARGET_DIR) && \
git pull origin master
.PHONY: commit
commit:
cd $(TARGET_DIR) && \
pwd && \
git add -A . && \
git commit -m "$(COMMIT_COMMENT) Build:$(BUILDID)"
-include $(DEPS)