summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-07-10 16:19:23 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-07-10 16:19:23 +0000
commita8960162daf2fee5955732def8862aa60bf6bf0b (patch)
tree02b082fb4b091eb71dc9293d74377e917a0f0843
parent806c982e1dd9ef30ae17cd179476802015d1cd00 (diff)
downloadmidipix_build-a8960162daf2fee5955732def8862aa60bf6bf0b.tar.bz2
midipix_build-a8960162daf2fee5955732def8862aa60bf6bf0b.tar.xz
Adds pseudo-build step `diff.'
-rwxr-xr-xbuild.sh14
-rw-r--r--build.usage10
-rw-r--r--pkg.build15
3 files changed, 29 insertions, 10 deletions
diff --git a/build.sh b/build.sh
index 20aefbde..067ec244 100755
--- a/build.sh
+++ b/build.sh
@@ -22,12 +22,14 @@ case ${1} in
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;
+ if [ "${ARG_RESTART_SCRIPT_AT}" != diff ]; then
+ 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;
+ fi;
else
ARG_RESTART_SCRIPT="${2}"; ARG_RESTART_SCRIPT_AT=ALL;
fi; shift; ;;
diff --git a/build.usage b/build.usage
index 2048aecc..624f66ca 100644
--- a/build.usage
+++ b/build.usage
@@ -1,5 +1,5 @@
usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-c] [-h] [-i level.name.build]
- [-r ALL|level.name.build[:step]] [-t[.gz|.bz2|.xz] [-x]
+ [-r ALL|level.name.build[:diff|:step[,...]]] [-t[.gz|.bz2|.xz] [-x]
-a nt32|nt64 Selects 32-bit or 64-bit architecture; defaults to nt64.
-b debug|release Selects debug or release build; defaults to debug.
This currently only controls CFLAGS.
@@ -8,11 +8,13 @@ usage: ./build.sh [-a nt32|nt64] [-b debug|release] [-c] [-h] [-i level.name.bui
-i level.name.build Insert link to pkg.build for the specified build script.
All consecutive scripts with higher build levels will
be renamed automatically.
- -r ALL|level.name.build[:step]
+ -r ALL|level.name.build[:step[,...]]
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.
+ build steps are: fetch extract build_dir autoconf patch
+ configure clean build install.
+ -r level.name.build:diff
+ Automatically produce diff(1).
-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
diff --git a/pkg.build b/pkg.build
index 03309d87..6d44e3a3 100644
--- a/pkg.build
+++ b/pkg.build
@@ -3,6 +3,21 @@
#
parse_with_pkg_name ${SCRIPT_FNAME%[0-9][0-9]*} ${2} ${PKG_BUILD_NAMES};
+if [ "${ARG_RESTART_SCRIPT_AT}" = diff ]; then
+ printf "" > ${MIDIPIX_BUILD_PWD}/${PKG_SUBDIR}.local.patch.new;
+ for __ in $(find ${PKG_SUBDIR} -name \*.orig); do
+ if [ -e ${__%.orig} ]; then
+ echo diff -Nru ${__} ${__%.orig};
+ set +o errexit; diff -Nru ${__} ${__%.orig} \
+ >> ${MIDIPIX_BUILD_PWD}/${PKG_SUBDIR}.local.patch.new; __=${?}; set -o errexit;
+ if [ ${__} -ge 2 ]; then
+ exit 1;
+ fi;
+ fi;
+ done;
+ ls -la ${MIDIPIX_BUILD_PWD}/${PKG_SUBDIR}.local.patch.new;
+ exit 0;
+fi;
if ! is_build_script_done fetch; then
if test_cmd pkg_${PKG_NAME}_fetch; then
pkg_${PKG_NAME}_fetch;