[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Sat Jul 25 00:40:19 UTC 2020


The branch, master has been updated
       via  e07d79ad Handle the first run of configure; prefer gmake.
       via  2f74eb75 Change smart-rebuild to smart-make.
       via  39741c7d Fix the setting of $make.
       via  3f016888 Add helper script for a smart rebuild.
      from  e5a012c9 Link to the git blob for source files.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e07d79ad508c23b9290b3d6379a140d232ddfe35
Author: Wayne Davison <wayne at opencoder.net>
Date:   Fri Jul 24 17:31:54 2020 -0700

    Handle the first run of configure; prefer gmake.

commit 2f74eb7584aac158bd2633ee50c650bab7b93579
Author: Wayne Davison <wayne at opencoder.net>
Date:   Fri Jul 24 17:20:45 2020 -0700

    Change smart-rebuild to smart-make.

commit 39741c7d50901b2d9724e40d7ad8c51011d80aaf
Author: Wayne Davison <wayne at opencoder.net>
Date:   Fri Jul 24 16:49:55 2020 -0700

    Fix the setting of $make.

commit 3f016888fd09453caf9f118e21ef4e490eac5771
Author: Wayne Davison <wayne at opencoder.net>
Date:   Fri Jul 24 14:04:02 2020 -0700

    Add helper script for a smart rebuild.

-----------------------------------------------------------------------

Summary of changes:
 packaging/patch-update | 18 ++++++++++++++----
 packaging/smart-make   | 45 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 4 deletions(-)
 create mode 100755 packaging/smart-make


Changeset truncated at 500 lines:

diff --git a/packaging/patch-update b/packaging/patch-update
index a387ad72..b3fb527b 100755
--- a/packaging/patch-update
+++ b/packaging/patch-update
@@ -127,18 +127,27 @@ def update_patch(patch):
 
     s = cmd_run(['git', 'merge', based_on])
     ok = s.returncode == 0
-    if not ok or args.cmd or args.shell:
+    skip_shell = False
+    if not ok or args.cmd or args.make or args.shell:
         cmd_chk(['packaging/prep-auto-dir'], discard='output')
     if not ok:
         print(f'"git merge {based_on}" incomplete -- please fix.')
         if not run_a_shell(parent, patch):
             return 0
+        if not args.make and not args.cmd:
+            skip_shell = True
+    if args.make:
+        if cmd_run(['packaging/smart-make']).returncode != 0:
+            if not run_a_shell(parent, patch):
+                return 0
+            if not args.cmd:
+                skip_shell = True
     if args.cmd:
         if cmd_run(args.cmd).returncode != 0:
             if not run_a_shell(parent, patch):
                 return 0
-            ok = False
-    if ok and args.shell:
+            skip_shell = True
+    if args.shell and not skip_shell:
         if not run_a_shell(parent, patch):
             return 0
 
@@ -218,8 +227,9 @@ if __name__ == '__main__':
     parser = argparse.ArgumentParser(description="Turn a git branch back into a diff files in the patches dir.", add_help=False)
     parser.add_argument('--branch', '-b', dest='base_branch', metavar='BASE_BRANCH', default='master', help="The branch the patch is based on. Default: master.")
     parser.add_argument('--skip-check', action='store_true', help="Skip the check that ensures starting with a clean branch.")
-    parser.add_argument('--shell', '-s', action='store_true', help="Launch a shell for every patch/BASE/* branch updated, not just when a conflict occurs.")
+    parser.add_argument('--make', '-m', action='store_true', help="Run the smart-make script in every patch branch.")
     parser.add_argument('--cmd', '-c', help="Run a command in every patch branch.")
+    parser.add_argument('--shell', '-s', action='store_true', help="Launch a shell for every patch/BASE/* branch updated, not just when a conflict occurs.")
     parser.add_argument('--gen', metavar='DIR', nargs='?', const='', help='Include generated files. Optional DIR value overrides the default of using the "patches" dir.')
     parser.add_argument('--patches-dir', '-p', metavar='DIR', default='patches', help="Override the location of the rsync-patches dir. Default: patches.")
     parser.add_argument('patch_files', metavar='patches/DIFF_FILE', nargs='*', help="Specify what patch diff files to process. Default: all of them.")
diff --git a/packaging/smart-make b/packaging/smart-make
new file mode 100755
index 00000000..6b7aa9bf
--- /dev/null
+++ b/packaging/smart-make
@@ -0,0 +1,45 @@
+#!/bin/sh
+ 
+set -e
+
+make=`which gmake 2>/dev/null` || make=`which make 2>/dev/null`
+
+branch=`packaging/prep-auto-dir`
+if test x"$branch" = x; then
+    srcdir=.
+else
+    cd build
+    srcdir=..
+fi
+
+if test -f configure.sh; then
+    cp -p configure.sh configure.sh.old
+else
+    touch configure.sh.old
+fi
+
+if test -f .fetch; then
+    $srcdir/prepare-source fetch
+else
+    $srcdir/prepare-source
+fi
+
+if diff configure.sh configure.sh.old >/dev/null 2>&1; then
+    echo "configure.sh is unchanged."
+    rm configure.sh.old
+else
+    echo "configure.sh has CHANGED."
+    if test -f config.status; then
+	./config.status --recheck
+    else
+	$srcdir/configure
+    fi
+fi
+
+./config.status
+
+$make all
+
+if test x"$1" = x"check"; then
+    $make check
+fi


-- 
The rsync repository.



More information about the rsync-cvs mailing list