diff mbox

[ovs-dev,v2] vagrant: cleanup before building

Message ID 1475922437-25098-1-git-send-email-cascardo@redhat.com
State Accepted
Headers show

Commit Message

Thadeu Lima de Souza Cascardo Oct. 8, 2016, 10:27 a.m. UTC
Clean the source directory before building, otherwise, build might fail if it
has been configured already.

Only do it if there is a Makefile present, as suggested by Ben Pfaff.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Cc: Ben Pfaff <blp@ovn.org>
---
 Vagrantfile | 1 +
 1 file changed, 1 insertion(+)

Comments

Ben Pfaff Oct. 9, 2016, 7:45 p.m. UTC | #1
On Sat, Oct 08, 2016 at 07:27:17AM -0300, Thadeu Lima de Souza Cascardo wrote:
> Clean the source directory before building, otherwise, build might fail if it
> has been configured already.
> 
> Only do it if there is a Makefile present, as suggested by Ben Pfaff.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
> Cc: Ben Pfaff <blp@ovn.org>

Thanks for humoring me.  I applied this to master.  Please let me know
if you want me to backport it to branch-2.6 also.
diff mbox

Patch

diff --git a/Vagrantfile b/Vagrantfile
index 8f7adee..fb17ec5 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -33,6 +33,7 @@  SCRIPT
 $configure_ovs = <<SCRIPT
 cd /vagrant
 ./boot.sh
+[ -f Makefile ] && ./configure && make distclean
 mkdir -p ~/build
 cd ~/build
 /vagrant/configure --with-linux=/lib/modules/`uname -r`/build --enable-silent-rules