Files
xen/tools/tests/pdx/Makefile
T
Jan Beulich 8daabe4052 tools/tests: don't pass -E to sed
Even the 2018 edition of The Open Group Base Specifications Issue 7 [1]
doesn't name -E as a standard option; only Issue 8 [2] does. As there's
nothing "extended" about the expression used, simply drop the -E.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/
[2] https://pubs.opengroup.org/onlinepubs/9799919799/

Fixes: cb50e40337 ("test/pdx: add PDX compression unit tests")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Oleksii Kurochko<oleksii.kurochko@gmail.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Release-Acked-by: Oleksii Kurochko<oleksii.kurochko@gmail.com>
2025-10-09 11:09:25 +02:00

51 lines
1.0 KiB
Makefile

XEN_ROOT=$(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk
TARGETS := test-pdx-mask test-pdx-offset
.PHONY: all
all: $(TARGETS)
.PHONY: run
run: $(TARGETS)
ifeq ($(CC),$(HOSTCC))
set -e; \
for test in $? ; do \
./$$test ; \
done
else
$(warning HOSTCC != CC, will not run test)
endif
.PHONY: clean
clean:
$(RM) -- *.o $(TARGETS) $(DEPS_RM) pdx.h
.PHONY: distclean
distclean: clean
$(RM) -- *~
.PHONY: install
install: all
$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC)/tests
$(INSTALL_PROG) $(TARGETS) $(DESTDIR)$(LIBEXEC)/tests
.PHONY: uninstall
uninstall:
$(RM) -- $(patsubst %,$(DESTDIR)$(LIBEXEC)/tests/%,$(TARGETS))
pdx.h: $(XEN_ROOT)/xen/include/xen/pdx.h
sed -e '/^#[[:space:]]*include/d' <$< >$@
CFLAGS += -D__XEN_TOOLS__
CFLAGS += $(APPEND_CFLAGS)
CFLAGS += $(CFLAGS_xeninclude)
test-pdx-mask: CFLAGS += -DCONFIG_PDX_MASK_COMPRESSION
test-pdx-offset: CFLAGS += -DCONFIG_PDX_OFFSET_COMPRESSION
test-pdx-%: test-pdx.c pdx.h
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_$*.o) -o $@ $< $(APPEND_CFLAGS)
-include $(DEPS_INCLUDE)