X-Git-Url: https://deadsoftware.ru/gitweb?p=cpc.git;a=blobdiff_plain;f=make-bootstrap.sh;h=c3a36e66e3e699c3e28dc0cdec84ab8d4e5f6a3d;hp=8eb3b66a0c0ede001442441700453f3366818651;hb=bd7398793200348c87a743d5dbd51795c8b113e2;hpb=1a42ddc54f906162fc90d4530cd3d5580e007ca1 diff --git a/make-bootstrap.sh b/make-bootstrap.sh index 8eb3b66..c3a36e6 100755 --- a/make-bootstrap.sh +++ b/make-bootstrap.sh @@ -1,16 +1,23 @@ -#! /bin/sh +#! /bin/bash set -e +abspath() { + [[ "$1" == /* ]] && echo "$1" || echo "$(pwd)/$1" +} + ###^^^^^^^^^^^^^^^^^^### ### Global variables ### ###__________________### _exec="make-bootstrap.sh" -_this="$(dirname "$(readlink -f "$0")")" -_version="v0.2" +_this="$(dirname "$(abspath "$0")")" +_version="v0.3" _sign=false +export CPCFLAGS="-no-use-time $CPCFLAGS" +export CPLFLAGS="$CPLFLAGS" + ###^^^^^^^^^^^### ### Functions ### ###___________### @@ -20,6 +27,11 @@ usage() { echo "Options:" echo " -v version Set build version" echo " -S Sign build" + echo "Environment variables:" + echo " CC C compiler binary" + echo " CFLAGS C compiler options" + echo " CPCFLAGS CPC compiler options" + echo " CPLFLAGS CPL linker options" exit 2 } @@ -62,8 +74,9 @@ fi rm -rf "$_this/bootstrap" mkdir -p "$_this/bootstrap" make_bootstrap 486 cpfront linux -make_bootstrap 486 cpfront cygwin -make_bootstrap arm cpfront linux +#make_bootstrap 486 cpfront cygwin +#make_bootstrap arm cpfront linux +#make_bootstrap powerpc cpfront osx ###^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^### ### Hack: remove temp files from v0.1 ### @@ -77,7 +90,7 @@ find "$_this/bootstrap" -type f -name '.new*' -delete rm -rf "$_this/cpc-$_version" mkdir -p "$_this/cpc-$_version" -cp -rt "$_this/cpc-$_version" -- \ +cp -r \ "$_this/CHANGELOG" \ "$_this/LICENSE" \ "$_this/README" \ @@ -88,7 +101,8 @@ cp -rt "$_this/cpc-$_version" -- \ "$_this/make-bootstrap.sh" \ "$_this/bootstrap" \ "$_this/src" \ - "$_this/C" + "$_this/C" \ + "$_this/cpc-$_version" tar czf "cpc-$_version.src.tar.gz" "cpc-$_version" ###^^^^^^^^^^^^^^^^### @@ -96,5 +110,5 @@ tar czf "cpc-$_version.src.tar.gz" "cpc-$_version" ###________________### if $_sign; then - gpg --armor --detach-sig "cpc-$_version.src.tar.gz" + gpg --yes --armor --detach-sig "cpc-$_version.src.tar.gz" fi