summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-07-10 16:02:14 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-07-10 16:02:14 +0000
commit806c982e1dd9ef30ae17cd179476802015d1cd00 (patch)
tree5fde084b57296070a8cea480057ca9e616a41f7e
parent3a1ff2d9b43ed5a0bf0c0a984f0559a486da796d (diff)
downloadmidipix_build-806c982e1dd9ef30ae17cd179476802015d1cd00.tar.bz2
midipix_build-806c982e1dd9ef30ae17cd179476802015d1cd00.tar.xz
- Check if build script exists and if build level is valid w/ -r.
- Removes build levels {configure,build,install}{1,2}.
l---------003.gcc.stage1.build2
l---------006.gcc.runtime.build2
l---------008.gcc.libstdc++-v3.build1
-rw-r--r--009.gcc.full.build (renamed from 008.gcc.full.build)23
l---------010.pkgconf_host.build (renamed from 009.pkgconf_host.build)0
-rw-r--r--010.pkgconf_host.vars (renamed from 009.pkgconf_host.vars)0
-rw-r--r--100.perk.build50
-rw-r--r--100.perk.native.build53
l---------101.perk.cross.build1
l---------102.gmp.build (renamed from 101.gmp.build)0
l---------103.mpfr.build (renamed from 102.mpfr.build)0
l---------104.mpc.build (renamed from 103.mpc.build)0
l---------105.libelf.build (renamed from 104.libelf.build)0
l---------106.binutils.build (renamed from 105.binutils.build)0
l---------107.gcc.native.build1
l---------107.musl.native.build (renamed from 106.musl.native.build)0
l---------108.gcc.native.build1
-rwxr-xr-xbuild.sh14
-rw-r--r--build.usage2
19 files changed, 84 insertions, 66 deletions
diff --git a/003.gcc.stage1.build b/003.gcc.stage1.build
index c3b435df..f1fa8b29 120000
--- a/003.gcc.stage1.build
+++ b/003.gcc.stage1.build
@@ -1 +1 @@
-008.gcc.full.build \ No newline at end of file
+009.gcc.full.build \ No newline at end of file
diff --git a/006.gcc.runtime.build b/006.gcc.runtime.build
index c3b435df..f1fa8b29 120000
--- a/006.gcc.runtime.build
+++ b/006.gcc.runtime.build
@@ -1 +1 @@
-008.gcc.full.build \ No newline at end of file
+009.gcc.full.build \ No newline at end of file
diff --git a/008.gcc.libstdc++-v3.build b/008.gcc.libstdc++-v3.build
new file mode 120000
index 00000000..f1fa8b29
--- /dev/null
+++ b/008.gcc.libstdc++-v3.build
@@ -0,0 +1 @@
+009.gcc.full.build \ No newline at end of file
diff --git a/008.gcc.full.build b/009.gcc.full.build
index bc418847..fe469ff3 100644
--- a/008.gcc.full.build
+++ b/009.gcc.full.build
@@ -5,6 +5,7 @@
# Order: stage1, runtime, full, native
if [ "${3}" = runtime ]\
+|| [ "${3}" = libstdc++-v3 ]; then
|| [ "${3}" = full ]; then
set_build_dir cbb-gcc-${PKG_GCC_VERSION} cross;
cd ${PKG_BUILD_DIR};
@@ -18,23 +19,25 @@ if [ "${3}" = runtime ]\
make ${MAKEFLAGS} install-target-libgcc;
set_build_script_done install finish;
fi;
- elif [ "${3}" = full ]; then
- # GCC, everything else.
- if ! is_build_script_done build1; then
+ elif [ "${3}" = libstdc++-v3 ]; then
+ # GCC, libstdc++-v3.
+ if ! is_build_script_done build; then
make ${MAKEFLAGS} all-target-libstdc++-v3;
- set_build_script_done build1 -install1;
+ set_build_script_done build -install;
fi;
- if ! is_build_script_done install1; then
+ if ! is_build_script_done install; then
make ${MAKEFLAGS} install-target-libstdc++-v3;
- set_build_script_done install1 -build2;
+ set_build_script_done install finish;
fi;
- if ! is_build_script_done build2; then
+ elif [ "${3}" = full ]; then
+ # GCC, everything else.
+ if ! is_build_script_done build; then
make ${MAKEFLAGS};
- set_build_script_done build2 -install2;
+ set_build_script_done build -install;
fi;
- if ! is_build_script_done install2; then
+ if ! is_build_script_done install; then
make ${MAKEFLAGS} install;
- set_build_script_done install2 finish;
+ set_build_script_done install finish;
fi;
fi;
else
diff --git a/009.pkgconf_host.build b/010.pkgconf_host.build
index 52bb82e5..52bb82e5 120000
--- a/009.pkgconf_host.build
+++ b/010.pkgconf_host.build
diff --git a/009.pkgconf_host.vars b/010.pkgconf_host.vars
index 3443633b..3443633b 100644
--- a/009.pkgconf_host.vars
+++ b/010.pkgconf_host.vars
diff --git a/100.perk.build b/100.perk.build
deleted file mode 100644
index ae46c2fa..00000000
--- a/100.perk.build
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# . ./build.vars and set -o errexit -o noglob are assumed.
-#
-
-if ! is_build_script_done fetch; then
- fetch_git perk ${GITROOT}/perk;
- set_build_script_done fetch -configure1;
-fi;
-set_build_dir ${2} native;
-if ! is_build_script_done configure1; then
- rm_if_exists -m -c ${PKG_BUILD_DIR};
- ../perk/configure --prefix=/usr;
- set_build_script_done configure1 clean1 -build1;
-else
- cd ${PKG_BUILD_DIR};
-fi;
-if ! is_build_script_done clean1; then
- make ${MAKEFLAGS} clean;
- set_build_script_done clean1 -build1;
-fi;
-if ! is_build_script_done build1; then
- make;
- set_build_script_done build1 -install1;
-fi;
-if ! is_build_script_done install1; then
- make DESTDIR=${PREFIX} install;
- set_build_script_done install1 -configure2;
-fi;
-set_build_dir ${2} cross;
-if ! is_build_script_done configure2; then
- rm_if_exists -m -c ../${PKG_BUILD_DIR};
- ../perk/configure --prefix=/usr --target=${TARGET};
- set_build_script_done configure2 clean2 -build2;
-else
- cd ../${PKG_BUILD_DIR};
-fi;
-if ! is_build_script_done clean2; then
- make ${MAKEFLAGS} clean;
- set_build_script_done clean2 -build2;
-fi;
-if ! is_build_script_done build2; then
- make;
- set_build_script_done build2 -install2;
-fi;
-if ! is_build_script_done install2; then
- make DESTDIR=${PKG_PREFIX} install;
- set_build_script_done install2 finish;
-fi;
-
-# vim:filetype=sh
diff --git a/100.perk.native.build b/100.perk.native.build
new file mode 100644
index 00000000..1bf92d37
--- /dev/null
+++ b/100.perk.native.build
@@ -0,0 +1,53 @@
+#
+# . ./build.vars and set -o errexit -o noglob are assumed.
+#
+
+if ! is_build_script_done fetch; then
+ fetch_git perk ${GITROOT}/perk;
+ set_build_script_done fetch configure;
+fi;
+if [ "${3}" = native ]; then
+ set_build_dir ${2} native;
+ if ! is_build_script_done configure; then
+ rm_if_exists -m -c ${PKG_BUILD_DIR};
+ ../perk/configure --prefix=/usr;
+ set_build_script_done configure clean -build;
+ else
+ cd ${PKG_BUILD_DIR};
+ fi;
+ if ! is_build_script_done clean; then
+ make ${MAKEFLAGS} clean;
+ set_build_script_done clean -build;
+ fi;
+ if ! is_build_script_done build; then
+ make;
+ set_build_script_done build -install;
+ fi;
+ if ! is_build_script_done install; then
+ make DESTDIR=${PREFIX} install;
+ set_build_script_done install finish;
+ fi;
+elif [ "${3}" = cross ]; then
+ set_build_dir ${2} cross;
+ if ! is_build_script_done configure; then
+ rm_if_exists -m -c ../${PKG_BUILD_DIR};
+ ../perk/configure --prefix=/usr --target=${TARGET};
+ set_build_script_done configure clean -build;
+ else
+ cd ../${PKG_BUILD_DIR};
+ fi;
+ if ! is_build_script_done clean; then
+ make ${MAKEFLAGS} clean;
+ set_build_script_done clean -build;
+ fi;
+ if ! is_build_script_done build; then
+ make;
+ set_build_script_done build -install;
+ fi;
+ if ! is_build_script_done install; then
+ make DESTDIR=${PKG_PREFIX} install;
+ set_build_script_done install finish;
+ fi;
+fi;
+
+# vim:filetype=sh
diff --git a/101.perk.cross.build b/101.perk.cross.build
new file mode 120000
index 00000000..2f051329
--- /dev/null
+++ b/101.perk.cross.build
@@ -0,0 +1 @@
+100.perk.native.build \ No newline at end of file
diff --git a/101.gmp.build b/102.gmp.build
index 52bb82e5..52bb82e5 120000
--- a/101.gmp.build
+++ b/102.gmp.build
diff --git a/102.mpfr.build b/103.mpfr.build
index 52bb82e5..52bb82e5 120000
--- a/102.mpfr.build
+++ b/103.mpfr.build
diff --git a/103.mpc.build b/104.mpc.build
index 52bb82e5..52bb82e5 120000
--- a/103.mpc.build
+++ b/104.mpc.build
diff --git a/104.libelf.build b/105.libelf.build
index 52bb82e5..52bb82e5 120000
--- a/104.libelf.build
+++ b/105.libelf.build
diff --git a/105.binutils.build b/106.binutils.build
index 52bb82e5..52bb82e5 120000
--- a/105.binutils.build
+++ b/106.binutils.build
diff --git a/107.gcc.native.build b/107.gcc.native.build
deleted file mode 120000
index c3b435df..00000000
--- a/107.gcc.native.build
+++ /dev/null
@@ -1 +0,0 @@
-008.gcc.full.build \ No newline at end of file
diff --git a/106.musl.native.build b/107.musl.native.build
index 5455612b..5455612b 120000
--- a/106.musl.native.build
+++ b/107.musl.native.build
diff --git a/108.gcc.native.build b/108.gcc.native.build
new file mode 120000
index 00000000..f1fa8b29
--- /dev/null
+++ b/108.gcc.native.build
@@ -0,0 +1 @@
+009.gcc.full.build \ No newline at end of file
diff --git a/build.sh b/build.sh
index 3d905357..20aefbde 100755
--- a/build.sh
+++ b/build.sh
@@ -3,6 +3,7 @@
#
. ./build.subr;
+VALID_BUILD_LEVELS="fetch,extract,build_dir,autoconf,patch,configure,clean,build,install";
#
# Process command line arguments.
@@ -17,6 +18,16 @@ case ${1} in
-r) [ -n "${ARG_RESTART_SCRIPT}" ] && exec cat build.usage;
if [ "${2#*:*}" != "${2}" ]; then
ARG_RESTART_SCRIPT="${2%%:*}"; ARG_RESTART_SCRIPT_AT="${2##*:}";
+ if [ ! -e "${ARG_RESTART_SCRIPT}" ]; then
+ log_msg fail "Error: unknown build script specified.";
+ exec cat build.usage;
+ fi;
+ for __ in $(split , "${ARG_RESTART_SCRIPT_AT}"); do
+ if ! match_list "${VALID_BUILD_LEVELS}" , "${__}"; then
+ log_msg fail "Error: unknown build level specified.";
+ exec cat build.usage;
+ fi;
+ done;
else
ARG_RESTART_SCRIPT="${2}"; ARG_RESTART_SCRIPT_AT=ALL;
fi; shift; ;;
@@ -101,8 +112,7 @@ for BUILD_LVL in 0 1 2 3 ${ARG_TARBALL:+9}; do
for BUILD_SCRIPT_FNAME in ${BUILD_LVL}[0-9][0-9].*.build; do
if [ -n "${ARG_RESTART_SCRIPT}" ] \
&& [ "${ARG_RESTART_SCRIPT}" != "ALL" ] \
- && ! match_list "${ARG_RESTART_SCRIPT}" \
- , "${BUILD_SCRIPT_FNAME}"; then
+ && [ "${ARG_RESTART_SCRIPT}" != ${BUILD_SCRIPT_FNAME} ]; then
if [ ${ARG_XTRACE:-0} -eq 0 ]; then
log_msg info "Skipped build script \`${BUILD_SCRIPT_FNAME}' (--build-scripts policy.)";
fi;
diff --git a/build.usage b/build.usage
index 6ac36676..2048aecc 100644
--- a/build.usage
+++ b/build.usage
@@ -12,7 +12,7 @@ usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-c] [-h] [-i level.name.bui
Restart all or the specified build script(s) completely
or at the optionally specified build step. Currently defined
build steps are: fetch extract build_dir autoconf patch configure
- clean build install configure1 configure2 build1 build2 install1 install2.
+ clean build install.
-t[.gz|.bz2|.xz] Produce binary distribution and source tarballs containing ${PREFIX}
sans ${WORKDIR} and ${PREFIX}/src/midipix_build and ${WORKDIR} sans top-
level regular files at the end of a build with zero failures. The