mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-13 20:42:43 +00:00
Use #include "common/..." in (de)marshallers
Now that they are created in $builddir, their includes will need to refer to files in $srcdir, which can be different. It's cleaner to add -I $(top_srcdir)/spice-common/ to modules using spice-common rather than having -I $(top_srcdir)/spice-common/common which would could create header collisions.
This commit is contained in:
parent
7ea1cc54b1
commit
90a1240f27
@ -81,6 +81,7 @@ libspice_common_la_SOURCES += \
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GL_CFLAGS) \
|
||||
$(PIXMAN_CFLAGS) \
|
||||
$(CELT051_CFLAGS) \
|
||||
@ -109,26 +110,26 @@ MARSHALLERS_DEPS = \
|
||||
# Note despite being autogenerated these are not part of CLEANFILES, they are
|
||||
# actually a part of EXTRA_DIST, to avoid the need for pyparser by end users
|
||||
generated_client_demarshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include messages.h $< $@ >/dev/null
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include common/messages.h $< $@ >/dev/null
|
||||
|
||||
generated_client_demarshallers1.c: $(top_srcdir)/spice1.proto $(MARSHALLERS_DEPS)
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include messages.h --prefix 1 --ptrsize 8 $< $@ >/dev/null
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include common/messages.h --prefix 1 --ptrsize 8 $< $@ >/dev/null
|
||||
|
||||
generated_client_marshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include messages.h --include client_marshallers.h --client $< $@ >/dev/null
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include common/messages.h --include client_marshallers.h --client $< $@ >/dev/null
|
||||
|
||||
generated_client_marshallers1.c: $(top_srcdir)/spice1.proto $(MARSHALLERS_DEPS)
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include messages.h --include client_marshallers.h --client --prefix 1 --ptrsize 8 $< $@ >/dev/null
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include common/messages.h --include client_marshallers.h --client --prefix 1 --ptrsize 8 $< $@ >/dev/null
|
||||
|
||||
generated_server_demarshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --server --include messages.h $< $@ >/dev/null
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --server --include common/messages.h $< $@ >/dev/null
|
||||
|
||||
STRUCTS = -M String -M Rect -M Point -M DisplayBase -M Fill -M Opaque -M Copy -M Blend -M Blackness -M Whiteness -M Invers -M Rop3 -M Stroke -M Text -M Transparent -M AlphaBlend -M Composite
|
||||
generated_server_marshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --server --include messages.h $< $@ >/dev/null
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --server --include common/messages.h $< $@ >/dev/null
|
||||
|
||||
generated_server_marshallers.h: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --server --include messages.h -H $< $@ >/dev/null
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --server --include common/messages.h -H $< $@ >/dev/null
|
||||
|
||||
# this is going to upset automake distcheck, since we try to write to
|
||||
# readonly srcdir. To limit the fail chances, rebuild automatically
|
||||
|
||||
@ -1250,7 +1250,7 @@ def write_includes(writer):
|
||||
writer.writeln("#include <stdio.h>")
|
||||
writer.writeln("#include <spice/protocol.h>")
|
||||
writer.writeln("#include <spice/macros.h>")
|
||||
writer.writeln('#include "mem.h"')
|
||||
writer.writeln('#include "common/mem.h"')
|
||||
writer.newline()
|
||||
writer.writeln("#ifdef _MSC_VER")
|
||||
writer.writeln("#pragma warning(disable:4101)")
|
||||
|
||||
@ -4,7 +4,7 @@ import codegen
|
||||
|
||||
def write_includes(writer):
|
||||
writer.header.writeln("#include <spice/protocol.h>")
|
||||
writer.header.writeln('#include "marshaller.h"')
|
||||
writer.header.writeln('#include "common/marshaller.h"')
|
||||
writer.header.newline()
|
||||
writer.header.writeln("#ifndef _GENERATED_HEADERS_H")
|
||||
writer.header.writeln("#define _GENERATED_HEADERS_H")
|
||||
@ -15,7 +15,7 @@ def write_includes(writer):
|
||||
writer.writeln("#include <stdio.h>")
|
||||
writer.writeln("#include <spice/protocol.h>")
|
||||
writer.writeln("#include <spice/macros.h>")
|
||||
writer.writeln('#include "marshaller.h"')
|
||||
writer.writeln('#include "common/marshaller.h"')
|
||||
writer.newline()
|
||||
writer.writeln("#ifdef _MSC_VER")
|
||||
writer.writeln("#pragma warning(disable:4101)")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user