DEADSOFTWARE

e82d0a682d0d8edbb13eb361669e71c0f3c6aeb5
[cpc.git] / make-bootstrap.sh
1 #! /bin/sh
3 set -e
5 ###^^^^^^^^^^^^^^^^^^###
6 ### Global variables ###
7 ###__________________###
9 _exec="make-bootstrap.sh"
10 _this="$(dirname "$(readlink -f "$0")")"
11 _version="v0.2"
13 ###^^^^^^^^^^^###
14 ### Functions ###
15 ###___________###
17 make_bootstrap() {
18 local _cpu="$1"
19 local _target="$2"
20 local _system="$3"
21 "$_this/make.sh" -x -o "$_this/bootstrap/$_cpu-$_target-$_system" \
22 "$_cpu" "$_target" "$_system"
23 find "$_this/bootstrap/$_cpu-$_target-$_system" -mindepth 1 -maxdepth 1 \
24 -type d -name 'CodeC' -prune -o -exec rm -rf {} +
25 }
27 ###^^^^^^^^^^^^^^^^^^^^###
28 ### Prebuild C sources ###
29 ###____________________###
31 rm -rf "$_this/bootstrap"
32 mkdir -p "$_this/bootstrap"
33 make_bootstrap 486 cpfront linux
34 make_bootstrap 486 cpfront cygwin
35 make_bootstrap arm cpfront linux
37 ###^^^^^^^^^^^^^^^^^^^^^^###
38 ### Package dist sources ###
39 ###______________________###
41 rm -rf "$_this/cpc-$_version"
42 mkdir -p "$_this/cpc-$_version"
43 cp -rt "$_this/cpc-$_version" -- \
44 "$_this/CHANGELOG" \
45 "$_this/LICENSE" \
46 "$_this/README" \
47 "$_this/man" \
48 "$_this/crux" \
49 "$_this/make.sh" \
50 "$_this/make-all.sh" \
51 "$_this/make-bootstrap.sh" \
52 "$_this/bootstrap" \
53 "$_this/src" \
54 "$_this/C"
55 tar czf "cpc-$_version.src.tar.gz" "cpc-$_version"