[RFC,v2,2/3] build: use Python pmdinfogen
diff mbox series

Message ID 20200702000232.10761-3-dmitry.kozliuk@gmail.com
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • pmdinfogen: rewrite in Python
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Dmitry Kozlyuk July 2, 2020, 12:02 a.m. UTC
Also don't suppress stderr from ar and pmdinfogen.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 GNUmakefile                     | 2 +-
 buildtools/Makefile             | 9 ---------
 buildtools/gen-pmdinfo-cfile.sh | 3 +--
 buildtools/meson.build          | 3 +--
 drivers/meson.build             | 2 +-
 mk/internal/rte.compile-pre.mk  | 2 +-
 mk/rte.sdkinstall.mk            | 2 --
 7 files changed, 5 insertions(+), 18 deletions(-)
 delete mode 100644 buildtools/Makefile

Patch
diff mbox series

diff --git a/GNUmakefile b/GNUmakefile
index e8de422df..242d30d2e 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -12,6 +12,6 @@  export RTE_SDK
 # directory list
 #
 
-ROOTDIRS-y := buildtools lib kernel drivers app
+ROOTDIRS-y := lib kernel drivers app
 
 include $(RTE_SDK)/mk/rte.sdkroot.mk
diff --git a/buildtools/Makefile b/buildtools/Makefile
deleted file mode 100644
index 7f76fd7d6..000000000
--- a/buildtools/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@ 
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2016 Neil Horman <nhorman@tuxdriver.com>
-# All rights reserved.
-
-include $(RTE_SDK)/mk/rte.vars.mk
-
-DIRS-y += pmdinfogen
-
-include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/buildtools/gen-pmdinfo-cfile.sh b/buildtools/gen-pmdinfo-cfile.sh
index 43059cf36..eeeab678e 100755
--- a/buildtools/gen-pmdinfo-cfile.sh
+++ b/buildtools/gen-pmdinfo-cfile.sh
@@ -9,6 +9,5 @@  pmdinfogen=$3
 # The generated file must not be empty if compiled in pedantic mode
 echo 'static __attribute__((unused)) const char *generator = "'$0'";' > $output
 for ofile in `ar t $arfile` ; do
-	ar p $arfile $ofile | $pmdinfogen - - >> $output 2> /dev/null
+	ar p $arfile $ofile | $pmdinfogen - - >> $output
 done
-exit 0
diff --git a/buildtools/meson.build b/buildtools/meson.build
index f9d2fdf74..88c238ca4 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -1,9 +1,8 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-subdir('pmdinfogen')
-
 pkgconf = find_program('pkg-config', 'pkgconf', required: false)
+pmdinfogen = find_program('pmdinfogen.py')
 pmdinfo = find_program('gen-pmdinfo-cfile.sh')
 list_dir_globs = find_program('list-dir-globs.py')
 check_symbols = find_program('check-symbols.sh')
diff --git a/drivers/meson.build b/drivers/meson.build
index e78c76c55..37822537a 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -119,7 +119,7 @@  foreach class:dpdk_driver_classes
 						command: [pmdinfo, tmp_lib.full_path(),
 							'@OUTPUT@', pmdinfogen],
 						output: out_filename,
-						depends: [pmdinfogen, tmp_lib])
+						depends: [tmp_lib])
 			endif
 			version_map = '@0@/@1@/@2@_version.map'.format(
 					meson.current_source_dir(),
diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
index df05b5576..bb2ab0725 100644
--- a/mk/internal/rte.compile-pre.mk
+++ b/mk/internal/rte.compile-pre.mk
@@ -59,7 +59,7 @@  endif
 CHECK_SYMBOLS_SCRIPT = $(RTE_SDK)/buildtools/check-symbols.sh
 CHECK_SYMBOLS = $(CHECK_SYMBOLS_SCRIPT) $(SRCDIR)/$(EXPORT_MAP) $@
 
-PMDINFO_GEN = $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c
+PMDINFO_GEN = $(RTE_SDK)/buildtools/pmdinfogen.py $@ $@.pmd.c
 PMDINFO_CC = $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@.pmd.o $@.pmd.c
 PMDINFO_LD = $(CROSS)ld -r $(filter-out -export-dynamic,$(LDFLAGS)) -o $@.o $@.pmd.o $@
 PMDINFO_TO_O = if grep -q 'RTE_PMD_REGISTER_.*(.*)' $<; then \
diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index 32bed5d95..875a64f04 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -98,7 +98,6 @@  install-runtime:
 	$(Q)cp $(CP_FLAGS)    $O/lib/* $(DESTDIR)$(libdir)
 	$(Q)$(call rte_mkdir, $(DESTDIR)$(bindir))
 	$(Q)tar -cf -      -C $O --exclude 'app/*.map' \
-		--exclude app/dpdk-pmdinfogen \
 		--exclude 'app/cmdline*' --exclude app/test \
 		--exclude app/testacl --exclude app/testpipeline app | \
 	    tar -xf -      -C $(DESTDIR)$(bindir) $(TAR_X_FLAGS)
@@ -134,7 +133,6 @@  install-sdk:
 	$(Q)cp $(CP_FLAGS)      $(RTE_SDK)/buildtools    $(DESTDIR)$(sdkdir)
 	$(Q)$(call rte_mkdir,                            $(DESTDIR)$(targetdir)/app)
 	$(Q)cp $(CP_FLAGS)      $O/.config               $(DESTDIR)$(targetdir)
-	$(Q)cp $(CP_FLAGS)      $O/app/dpdk-pmdinfogen   $(DESTDIR)$(targetdir)/app
 	$(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include)
 	$(Q)$(call rte_symlink, $(DESTDIR)$(libdir),     $(DESTDIR)$(targetdir)/lib)