Files
xen/tools/include/xen-foreign/Makefile
T
Roger Pau Monne daddec692a xen/tools: fix substitution of __align8__ uint64_t inside of headers
The current seedery doesn't work with BSD sed, so remove the try to match
int64_t also (since there's none at the moment). Also, apply the same
treatment to all arch headers, currently this is only done to x86_64
headers.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
2016-04-27 14:12:36 +01:00

57 lines
1.8 KiB
Makefile

XEN_ROOT=$(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk
ROOT = $(XEN_ROOT)/xen/include/public
architectures := arm32 arm64 x86_32 x86_64
headers := $(patsubst %, %.h, $(architectures))
.PHONY: all clean distclean check-headers
all: $(headers) check-headers
clean:
rm -f $(headers)
rm -f checker checker.c
rm -f *.pyc *.o *~
distclean: clean
checker: checker.c $(headers)
$(HOSTCC) $(HOSTCFLAGS) -D__XEN_TOOLS__ -o $@ $<
check-headers: checker
./checker > tmp.size
diff -u reference.size tmp.size
rm tmp.size
arm32.h: mkheader.py structs.py $(ROOT)/arch-arm.h $(ROOT)/xen.h
$(PYTHON) $< $* $@.tmp $(filter %.h,$^)
#Avoid mixing an alignment directive with a uint64_t cast or sizeof expression
sed 's/(__align8__ \(uint64_t\))/(\1)/g' < $@.tmp > $@.tmp2
rm $@.tmp
$(call move-if-changed,$@.tmp2,$@)
arm64.h: mkheader.py structs.py $(ROOT)/arch-arm.h $(ROOT)/xen.h
$(PYTHON) $< $* $@.tmp $(filter %.h,$^)
#Avoid mixing an alignment directive with a uint64_t cast or sizeof expression
sed 's/(__align8__ \(uint64_t\))/(\1)/g' < $@.tmp > $@.tmp2
rm $@.tmp
$(call move-if-changed,$@.tmp2,$@)
x86_32.h: mkheader.py structs.py $(ROOT)/arch-x86/xen-x86_32.h $(ROOT)/arch-x86/xen.h $(ROOT)/xen.h
$(PYTHON) $< $* $@.tmp $(filter %.h,$^)
#Avoid mixing an alignment directive with a uint64_t cast or sizeof expression
sed 's/(__align8__ \(uint64_t\))/(\1)/g' < $@.tmp > $@.tmp2
rm $@.tmp
$(call move-if-changed,$@.tmp2,$@)
x86_64.h: mkheader.py structs.py $(ROOT)/arch-x86/xen-x86_64.h $(ROOT)/arch-x86/xen.h $(ROOT)/xen.h
$(PYTHON) $< $* $@.tmp $(filter %.h,$^)
#Avoid mixing an alignment directive with a uint64_t cast or sizeof expression
sed 's/(__align8__ \(uint64_t\))/(\1)/g' < $@.tmp > $@.tmp2
rm $@.tmp
$(call move-if-changed,$@.tmp2,$@)
checker.c: mkchecker.py structs.py
$(PYTHON) $< $@ $(architectures)