forked from tenbaht/sduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (38 loc) · 1.58 KB
/
Makefile
File metadata and controls
53 lines (38 loc) · 1.58 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
50
51
52
53
# the required versions for the new build
COREVERSION=0.5
SDCCVERSION=11242
TOOLSVERSION=2019.02.05
# default the tool version to be the current date as YYYY.MM.DD
#TOOLSVERSION?=$(shell date '+%Y.%m.%d')
BASEURL=https://github.com/tenbaht/sduino/releases/download/v$(COREVERSION)
PACKAGEFILE=package_sduino_stm8_index.json
# version for pre-release testing on my private server at home
TESTPACKAGEFILE=package_testserver_index.json
TESTBASEURL=http://knecht.fritz.box/sduino
TESTBASEDIR=knecht:/var/www/html/sduino
# make sure these definitions are visible for the sub-makes
export
.PHONY: core tools sdcc clean upload release
$(TESTPACKAGEFILE): ../$(PACKAGEFILE)
sed 's#http.*/download/#$(TESTBASEURL)/release/#' $^ > $@
../$(PACKAGEFILE): core tools sdcc
@echo "Generating the package_index file."
./assemble.sh $@
core tools sdcc:
make -f Makefile.$@
clean:
rm -rf *~ *.jsone *.bak *.orig *.rej
# upload to my private test server, totally useless for anybody else.
upload: $(TESTPACKAGEFILE)
@echo "uploading to $(TESTBASEDIR)"
rsync -av -rsh=ssh --delete release $(TESTPACKAGEFILE) $(TESTBASEDIR)
@echo "URL for board manager: $(TESTBASEURL)/$(TESTPACKAGEFILE)"
DATE=$(shell date '+%F')
release:
# update the version number in the changelog if not already done:
grep -q "$(COREVERSION)" ../CHANGELOG.md || \
sed -i "/^## \[Unreleased\]/ a\\\n\n## [$(COREVERSION) - $(DATE)]" ../CHANGELOG.md
git add ../CHANGELOG.md ../$(PACKAGEFILE)
git add parts/tools-*-$(SDCCVERSION).txt parts/tools-*-$(TOOLSVERSION).txt parts/platform-*-$(COREVERSION).txt
git commit
git tag v$(COREVERSION)