diff options
author | Tom Jones <thj@freebsd.org> | 2024-02-01 16:09:20 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@0xa5.net> | 2024-05-06 11:36:29 +0000 |
commit | 5267b535285b2dd3775d8a8a88791100ef536243 (patch) | |
tree | 8ec46913bc3587a9abaa231b85298edb96723607 /build/external | |
parent | 0a2fdc56694db3226dc99065955787db65b9da5a (diff) |
dpdk: Use gnu sed on FreeBSD for header fix ups
FreeBSD sed isn't compatible with gnu seds in place option. On FreeBSD
explicitly use gsed, on Linux and other platforms this is available just
as 'sed'.
Type: improvement
Change-Id: I6e4fcaf11d4d22cd3e4cd0c3327b16393542845f
Signed-off-by: Tom Jones <thj@freebsd.org>
Diffstat (limited to 'build/external')
-rw-r--r-- | build/external/packages/dpdk.mk | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/build/external/packages/dpdk.mk b/build/external/packages/dpdk.mk index e0a3ef2559b..b9ce4ac813f 100644 --- a/build/external/packages/dpdk.mk +++ b/build/external/packages/dpdk.mk @@ -134,14 +134,19 @@ endif DPDK_DRIVERS_DISABLED := $(shell echo $(DPDK_DRIVERS_DISABLED) | tr -d '\\\t ') DPDK_LIBS_DISABLED := $(shell echo $(DPDK_LIBS_DISABLED) | tr -d '\\\t ') +SED=sed +ifeq ($shell(uname), FreeBSD) +SED=gsed +endif + HASH := \# # post-meson-setup snippet to alter rte_build_config.h define dpdk_config if grep -q RTE_$(1) $(dpdk_src_dir)/config/rte_config.h ; then \ -sed -i -e 's/$(HASH)define RTE_$(1).*/$(HASH)define RTE_$(1) $(DPDK_$(1))/' \ +$(SED) -i -e 's/$(HASH)define RTE_$(1).*/$(HASH)define RTE_$(1) $(DPDK_$(1))/' \ $(dpdk_src_dir)/config/rte_config.h; \ elif grep -q RTE_$(1) $(dpdk_build_dir)/rte_build_config.h ; then \ -sed -i -e 's/$(HASH)define RTE_$(1).*/$(HASH)define RTE_$(1) $(DPDK_$(1))/' \ +$(SED) -i -e 's/$(HASH)define RTE_$(1).*/$(HASH)define RTE_$(1) $(DPDK_$(1))/' \ $(dpdk_build_dir)/rte_build_config.h; \ else \ echo '$(HASH)define RTE_$(1) $(DPDK_$(1))' \ @@ -157,7 +162,7 @@ if [[ "$(DPDK_$(1))" == "y" ]]; then \ >> $(dpdk_build_dir)/rte_build_config.h ; \ fi; \ elif [[ "$(DPDK_$(1))" == "n" ]]; then \ - sed -i '/$(HASH)define RTE_$(1) .*/d' $(dpdk_build_dir)/rte_build_config.h \ + $(SED) -i '/$(HASH)define RTE_$(1) .*/d' $(dpdk_build_dir)/rte_build_config.h \ $(dpdk_src_dir)/config/rte_config.h ; \ fi endef |