2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-17 14:28:02 +00:00

Makefile.am: fix printf-check in out-of-tree build

The introduction of a %zu in datapath/flow_netlink.c with commit c1fc1411
revealed a problem with out-of-tree builds.

printf-check and thread-safety-check skip some directories with a 'grep -v'.
In the case of an out-of-tree build, the grep -v pattern doesn't work, because
it assumes the pathnames to be relative to the OVS root directory.

This commit fixes the problem by changing the directory before executing any
commands, like we do elsewhere in Makefile.am

Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
This commit is contained in:
Daniele Di Proietto
2014-06-23 04:39:47 +00:00
committed by Joe Stringer
parent 2791461076
commit 8faeab7257

View File

@@ -208,8 +208,9 @@ config-h-check:
# Check for printf() type modifiers that MSVC doesn't support.
ALL_LOCAL += printf-check
printf-check:
@if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \
git --no-pager grep -n -E -e '%[-+ #0-9.*]*([ztj]|hh)' --and --not -e 'ovs_scan' `git ls-files $(srcdir) | grep '\.[ch]$$' | \
@cd $(srcdir); \
if test -e .git && (git --version) >/dev/null 2>&1 && \
git --no-pager grep -n -E -e '%[-+ #0-9.*]*([ztj]|hh)' --and --not -e 'ovs_scan' `git ls-files | grep '\.[ch]$$' | \
grep -vE '^datapath|^lib/sflow|^third-party'`; \
then \
echo "See above for list of violations of the rule that"; \
@@ -246,9 +247,10 @@ check-assert-h-usage:
ALL_LOCAL += thread-safety-check
thread-safety-check:
@if test -e '$(srcdir)'/.git && (git --version) >/dev/null 2>&1 && \
grep -n -f '$(srcdir)'/build-aux/thread-safety-blacklist \
`git ls-files '$(srcdir)' | grep '\.[ch]$$' \
@cd $(srcdir); \
if test -e .git && (git --version) >/dev/null 2>&1 && \
grep -n -f build-aux/thread-safety-blacklist \
`git ls-files | grep '\.[ch]$$' \
| $(EGREP) -v '^datapath|^lib/sflow|^third-party'` /dev/null \
| $(EGREP) -v ':[ ]*/?\*'; \
then \