-
Notifications
You must be signed in to change notification settings - Fork 12
/
makefile
executable file
·44 lines (35 loc) · 1.03 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
#SHELL := /bin/bash
BUILD_DIR=build
VER_BRANCH=build-release
VER_FILE=VERSION
LITERATE_TOOLS="https://github.com/vlead/literate-tools.git"
LITERATE_DIR=literate-tools
ELISP_DIR=elisp
ORG_DIR=org-templates
STYLE_DIR=style
CODE_DIR=build/code
DOC_DIR=build/docs
SRC_DIR=src
DIAGRAMS_DIR=src/diagrams
PWD=$(shell pwd)
LINT_FILE=${PWD}/${CODE_DIR}/lint_output
EXIT_FILE=${PWD}/exit.txt
STATUS=0
all: build-with-lint
clean:
make -f tangle-make clean
init:
./init.sh
build: init
make -f tangle-make -k all
rsync -a ${SRC_DIR}/static ${CODE_DIR}/src/
rsync -a ${SRC_DIR}/templates ${CODE_DIR}/src/
# get the latest commit hash and its subject line
# and write that to the VERSION file
write-version:
echo -n "Built from commit: " > ${CODE_DIR}/${VER_FILE}
echo `git rev-parse HEAD` >> ${CODE_DIR}/${VER_FILE}
echo `git log --pretty=format:'%s' -n 1` >> ${CODE_DIR}/${VER_FILE}
lint:
(pep8 --ignore=E302 ${PWD}/${CODE_DIR} > ${LINT_FILE}; ([ $$? -eq 0 ] && echo "no lint errors!") || echo "lint errors exist!")
build-with-lint: build lint