Skip to content

Commit 7172635

Browse files
committed
place the archive files according to the github directory structure
1 parent 1cac397 commit 7172635

4 files changed

Lines changed: 32 additions & 13 deletions

File tree

board-manager/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PACKAGEFILE=package_sduino_stm8_index.json
99

1010
# version for pre-release testing on my private server at home
1111
TESTPACKAGEFILE=package_testserver_index.json
12-
TESTBASEURL=http://knecht.fritz.box/sduino/release
12+
TESTBASEURL=http://knecht.fritz.box/sduino
1313
TESTBASEDIR=knecht:/var/www/html/sduino
1414

1515
export
@@ -18,7 +18,7 @@ export
1818

1919

2020
$(TESTPACKAGEFILE): ../$(PACKAGEFILE)
21-
sed 's#http.*/download/#$(TESTBASEURL)/#' $^ > $@
21+
sed 's#http.*/download/#$(TESTBASEURL)/release/#' $^ > $@
2222

2323
../$(PACKAGEFILE): core tools sdcc
2424
@echo "Generating the package_index file."

board-manager/Makefile.core

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SDCCVERSION?=10088
44
TOOLSVERSION?=2017.11.06
55

66
# where to put the generated files
7-
COREDIR?=release
7+
COREDIR?=release/v$(COREVERSION)
88
PARTSDIR?=parts
99

1010
# subtree of the repository to be included in the archive
@@ -31,7 +31,15 @@ $(PLATFORM_ENTRY): $(COREFILE)
3131
./gen_platform_entry.sh $^ "$(COREVERSION)" "$(SDCCVERSION)" "$(TOOLSVERSION)" |\
3232
sed "s/^/ /" > $@
3333

34-
$(COREFILE):
34+
$(COREFILE): | $(COREDIR)
3535
echo "Generating the core archive file."
3636
(cd ..; git archive -v --format=tar HEAD:$(SUBTREE))|\
3737
bzip2 > $(COREFILE)
38+
39+
# make a new release directory if not present
40+
#
41+
# make sure to define an order-only dependency on this rule by placing it on
42+
# the right side of a pipe symbol. This prevents rebuilding the archives
43+
# every time.
44+
$(COREDIR):
45+
mkdir -p $@

board-manager/Makefile.sdcc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SDCCVERSION?=10088
66
#SNAPSHOTDIR=sdcc-snapshots
77

88
# where to put the generated files
9-
SDCCDIR=release
9+
SDCCDIR=release/v$(COREVERSION)
1010
PARTSDIR=parts
1111

1212
VERSION=$(SDCCVERSION)

board-manager/Makefile.tools

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
NAME=sduino-tools
2-
TOOLSVERSION?=2017.10.21
2+
COREVERSION?=0.3.2
3+
# default the tool version to be the current date as YYYY.MM.DD
4+
TOOLSVERSION?=$(shell date '+%Y.%m.%d')
35

46
# Where to find the tools directory
57
BASEDIR=../sduino/hardware/sduino
@@ -8,7 +10,7 @@ BASEDIR=../sduino/hardware/sduino
810
IGNORE=*~ *bak x build-* *.orig *.rej
911

1012
# where to put the generated files
11-
ARCHIVEDIR=release
13+
ARCHIVEDIR=release/v$(COREVERSION)
1214
PARTSDIR=parts
1315

1416

@@ -24,9 +26,9 @@ TOOLS_STEM=$(ARCHIVEDIR)/$(NAME)
2426
TOOLS_ENTRY=$(PARTSDIR)/tools-entry-$(NAME)-$(TOOLSVERSION).txt
2527

2628
# The individual filenames for the different tools archives
27-
TOOLS_LINUX32=release/$(NAME)_linux32-$(TOOLSVERSION).tar.bz2
28-
TOOLS_LINUX64=release/$(NAME)_linux64-$(TOOLSVERSION).tar.bz2
29-
TOOLS_WINDOWS=release/$(NAME)_mingw32-$(TOOLSVERSION).tar.bz2
29+
TOOLS_LINUX32=$(ARCHIVEDIR)/$(NAME)_linux32-$(TOOLSVERSION).tar.bz2
30+
TOOLS_LINUX64=$(ARCHIVEDIR)/$(NAME)_linux64-$(TOOLSVERSION).tar.bz2
31+
TOOLS_WINDOWS=$(ARCHIVEDIR)/$(NAME)_mingw32-$(TOOLSVERSION).tar.bz2
3032

3133
TOOLS_TARS=$(TOOLS_LINUX32) $(TOOLS_LINUX64) $(TOOLS_WINDOWS)
3234
EXCLUDES=$(addprefix --exclude=, $(IGNORE))
@@ -40,16 +42,25 @@ TARFLAGS=$(EXCLUDES) --show-transformed-names --transform
4042
$(TOOLS_ENTRY) : $(TOOLS_TARS)
4143
./gen_tools_entry.sh "$(TOOLS_STEM)" "$(TOOLSVERSION)" "$(COREVERSION)" > $@
4244

43-
$(TOOLS_LINUX32):
45+
$(TOOLS_LINUX32): | $(ARCHIVEDIR)
4446
@echo "Generating the tools archive file for Linux 32 bit."
4547
tar cjf $@ $(EXCLUDES) -C $(BASEDIR) --transform s/linux32/linux/ \
4648
tools/wrapper tools/linux32
4749

48-
$(TOOLS_LINUX64):
50+
$(TOOLS_LINUX64): | $(ARCHIVEDIR)
4951
@echo "Generating the tools archive file for Linux 64 bit."
5052
tar cjf $@ $(EXCLUDES) -C $(BASEDIR) --transform s/linux64/linux/ \
5153
tools/wrapper tools/linux64
5254

53-
$(TOOLS_WINDOWS):
55+
$(TOOLS_WINDOWS): | $(ARCHIVEDIR)
5456
@echo "Generating the tools archive file for Windows."
5557
tar cjf $@ $(EXCLUDES) -C $(BASEDIR) tools/wrapper tools/win
58+
59+
60+
# make a new release directory if not present
61+
#
62+
# make sure to define an order-only dependency on this rule by placing it on
63+
# the right side of a pipe symbol. This prevents rebuilding the archives
64+
# every time.
65+
$(ARCHIVEDIR):
66+
mkdir -p $@

0 commit comments

Comments
 (0)