diff mbox

[ovs-dev,2/3] makefile: hook up dpdkstrip preprocessor

Message ID 20170816200452.9748-3-aconole@redhat.com
State Superseded
Headers show

Commit Message

Aaron Conole Aug. 16, 2017, 8:04 p.m. UTC
When building the openvswitch-custom.te file, it is important to have the
ability to filter out dpdk blocks depending on whether the system has been
configured with dpdk or not.  This allows using all the standard .in file
blocks, as well as the dpdkstrip blocks, when constructing the selinux
policy file.

Additionally, this means any .in files which might want to change based on
configuration to exclude blocks based on dpdk can do so.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Tested-by: Jean Hsiao <jhsiao@redhat.com>
---
 Makefile.am | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/Makefile.am b/Makefile.am
index 035afe6..31d6331 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,9 @@  AM_CFLAGS += $(OVS_CFLAGS)
 
 if DPDK_NETDEV
 AM_CFLAGS += -D_FILE_OFFSET_BITS=64
+DPDKSTRIP_FLAGS = --dpdk
+else
+DPDKSTRIP_FLAGS = --nodpdk
 endif
 
 if NDEBUG
@@ -141,6 +144,7 @@  ro_shell = printf '\043 Generated automatically -- do not modify!    -*- buffer-
 SUFFIXES += .in
 .in:
 	$(AM_V_GEN)$(PERL) $(srcdir)/build-aux/soexpand.pl -I$(srcdir) < $< | \
+	  $(PERL) $(srcdir)/build-aux/dpdkstrip.pl $(DPDKSTRIP_FLAGS) | \
 	  sed \
 	    -e 's,[@]PKIDIR[@],$(PKIDIR),g' \
 	    -e 's,[@]LOGDIR[@],$(LOGDIR),g' \