Message ID | 1467398168-2148-1-git-send-email-aserdean@cloudbasesolutions.com |
---|---|
State | Superseded |
Delegated to: | Guru Shetty |
Headers | show |
> De la: Ben Pfaff [mailto:blp@ovn.org] > Trimis: Friday, July 1, 2016 11:31 PM > Către: Alin Serdean <aserdean@cloudbasesolutions.com> > Cc: dev@openvswitch.org > Subiect: Re: [ovs-dev] [PATCH] build: Skip datapath subdir on Windows > > I think that this will make "make dist" on Windows omit the datapath > directory. If I'm right about that, then it's unacceptable because the > distribution tarball should be the same regardless of where it's built. [Alin Gabriel Serdean: ] You are right Ben, I did not think about it. > > I'd suggest putting the if...endif block into datapath/Makefile.am, like > this: [Alin Gabriel Serdean: ] I will resend the patch and add you as co-author. Thanks for the for the snippet. > > diff --git a/datapath/Makefile.am b/datapath/Makefile.am index > 458fa5b..f2a85bc 100644 > --- a/datapath/Makefile.am > +++ b/datapath/Makefile.am > @@ -30,6 +30,7 @@ print-build-modules: > fi > @echo "$(build_modules)" | tr '_' '-'; > > +if !WIN32 > COMPAT_GET_FUNCTIONS := find $(top_srcdir)/datapath/linux/compat - > name "*.h" \ > -exec sed -n '/^[a-z][a-z]* \*\?[A-Za-z0-9_][A-Za-z0-9_]*([a-z]/p; > /^struct [a-z0-9_][a-z0-9_]* \*\?[A-Za-z0-9_][A-Za-z0-9_]*([a-z]/p' {} \; | tr - > d '*' | cut -d '(' -f1 | rev | cut -d ' ' -f1 | rev COMPAT_GET_EXPORTS := find > $(top_srcdir)/datapath/linux/compat -name "*.c" \ @@ -56,3 +57,4 @@ > check-export-symbol: > done > > all-local: check-export-symbol > +endif
diff --git a/Makefile.am b/Makefile.am index 8cb8523..c251ef5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,9 @@ AUTOMAKE_OPTIONS = foreign subdir-objects ACLOCAL_AMFLAGS = -I m4 +if !WIN32 SUBDIRS = datapath +endif AM_CPPFLAGS = $(SSL_CFLAGS) AM_LDFLAGS = $(SSL_LDFLAGS)
This patch makes automake skip the 'datapath' folder under Windows. The main reason is that msys does not have an implementation of rev used by: https://github.com/openvswitch/ovs/blob/master/datapath/Makefile.am#L34 and can be seen on: https://ci.appveyor.com/project/blp/ovs/build/1.0.1851#L322 Another solution would be to skip COMPAT_GET_FUNCTIONS on windows or to modify the use of 'rev'. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> --- Makefile.am | 2 ++ 1 file changed, 2 insertions(+)