diff mbox series

[ovs-dev] make: ensure repeated builds don't prompt

Message ID CAHKWyj8mdu2isBdUvLvM5KPp3XwkC-sGN5vu9tf5pqgdh6qT3Q@mail.gmail.com
State Changes Requested
Headers show
Series [ovs-dev] make: ensure repeated builds don't prompt | expand

Commit Message

Aidan Shribman March 30, 2021, 10:43 a.m. UTC
When running repeated builds using `make build` you get prompts in cases
the `mv` command is about to overwrite a file which is write-protect. This
patch forced the `mv` w/o prompting for approval.

Signed-off-by: Aidan Shribman <aidan.shribman@gmail.com>

        $(AM_V_GEN)$(run_python) $< meta-flow
$(srcdir)/include/openvswitch/meta-flow.h > $@.tmp

Comments

Ben Pfaff March 30, 2021, 5:11 p.m. UTC | #1
On Tue, Mar 30, 2021 at 11:43:34AM +0100, Aidan Shribman wrote:
> When running repeated builds using `make build` you get prompts in cases
> the `mv` command is about to overwrite a file which is write-protect. This
> patch forced the `mv` w/o prompting for approval.
> 
> Signed-off-by: Aidan Shribman <aidan.shribman@gmail.com>

Thanks for the patch.

We can't apply this because it is word-wrapped.  Please submit it
without word-wrapping.
diff mbox series

Patch

diff --git a/Makefile.am b/Makefile.am
index 691a005ad..cb8076433 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -168,7 +168,7 @@  SUFFIXES += .in
        @if head -n 1 $@.tmp | grep '#!' > /dev/null; then \
          chmod +x $@.tmp; \
        fi
-       $(AM_V_at) mv $@.tmp $@
+       $(AM_V_at) mv -f $@.tmp $@

 SUFFIXES += .xml
 %: %.xml
diff --git a/lib/automake.mk b/lib/automake.mk
index 39afbff9d..39901bd6d 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -590,7 +590,7 @@  lib/dirs.c: lib/dirs.c.in Makefile
                -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
                -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
             > lib/dirs.c.tmp && \
-       mv lib/dirs.c.tmp lib/dirs.c
+       mv -f lib/dirs.c.tmp lib/dirs.c

 lib/meta-flow.inc: $(srcdir)/build-aux/extract-ofp-fields
include/openvswitch/meta-flow.h