-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
85 lines (75 loc) · 1.43 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
###############################################################################
# $Id: Makefile,v 1.1 2012-12-04 15:35:19-08 dmfrank - $
# Derek Frank
#
# NAME
# Makefile
#
# DESCRIPTION
# A common Makefile
#
###############################################################################
MKFILE = Makefile
WHOAMI ?= $(shell whoami)
PWD = $(shell pwd)
CWD = $(shell basename ${PWD})
#
# Define the "ci" command with respect to the current user.
# dmfrank, derekmfrank, dmf, ghoti, fain are all aliases.
#
CICMD = ci
ifeq (${WHOAMI},dmf)
CICMD = cil
endif
#
# Define checksource
#
CHK80 = checksource -l 80
#
# Variables
#
FILES = README
CHKSRC = ${MKFILE}
CHKFILES =
ALLFILES = ${MKFILE} ${FILES}
#
# make all
#
all : clean sync
#
# Run checksource on the files
#
check : ${CHKSRC}
- ${CHK80} ${CHKSRC}
#
# Check files into an RCS subdirectory
#
ci :
ifeq (${WHOAMI},dmf)
${CICMD} + ${ALLFILES}
endif
#
# Initialize git repository
#
gitinit :
touch README
git init
git add README Makefile
git commit -m "First commit"
git remote add origin [email protected]:dmfrank/${CWD}.git
git push -u origin master # to push changes for the first time
#
# Sync local and remote repositories
#
sync : ci
git add --all
git commit -a
git status
git push
#git pull
#
# Clean and spotless remove genereated files
#
clean :
- rm blah
spotless : clean