datapath: Tidy up duplicate symbol detection.
authorJoe Stringer <joestringer@nicira.com>
Wed, 29 Apr 2015 20:33:25 +0000 (13:33 -0700)
committerJoe Stringer <joestringer@nicira.com>
Wed, 29 Apr 2015 21:00:11 +0000 (14:00 -0700)
Don't print each symbol that is iterated.
Make the error message more clear by prefixing "error: ".

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/Makefile.am

index a8e9be4..458fa5b 100644 (file)
@@ -42,15 +42,15 @@ COMPAT_EXPORTS := $(shell $(COMPAT_GET_EXPORTS))
 check-export-symbol:
        @for fun_ in $(COMPAT_FUNCTIONS); do \
           if ! grep -- $${fun_} $(top_srcdir)/datapath/linux/compat/build-aux/export-check-whitelist > /dev/null; then \
-             if ! echo $${fun_} | grep -E '^(rpl|ovs)_'; then \
-                echo "Should prefix $${fun_} with rpl_ or ovs_."; \
+             if ! echo $${fun_} | grep -q -E '^(rpl|ovs)_'; then \
+                echo "error: $${fun_}() needs to be prefixed with 'rpl_' or 'ovs_'."; \
                 exit 1; \
              fi; \
           fi; \
        done
        @for fun_ in $(COMPAT_EXPORTS); do \
-          if ! echo $${fun_} | grep -E '^(rpl|ovs)_'; then \
-             echo "Should prefix $${fun_} with rpl_ or ovs_."; \
+          if ! echo $${fun_} | grep -q -E '^(rpl|ovs)_'; then \
+             echo "error: $${fun_}() needs to be prefixed with 'rpl_' or 'ovs_'."; \
              exit 1; \
           fi; \
        done