From eb17da9f5770a6a2ec051cef785a4c5d4ffba277 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 1 Mar 2016 08:21:33 +0000 Subject: [PATCH] Sanitize marshaler generating --- .gitignore | 1 + src/Makefile.am | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index fea026d..10732ce 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ Makefile.in /src/matrix-version.h /src/matrix-enumtypes.[ch] /src/matrix-marshalers.[ch] +/src/stamp-matrix-marshalers /docs/reference/matrix-glib/version.xml /docs/reference/matrix-glib/html/ /docs/reference/matrix-glib/xml/ diff --git a/src/Makefile.am b/src/Makefile.am index 4c34d1f..892f34b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -92,21 +92,26 @@ matrix-enumtypes.c: $(matrix_enum_headers) matrix-enumtypes.h matrix-enumtypes.c $(filter-out %.template,$^) > $@.tmp \ && mv $@.tmp $@ -matrix-marshalers.h: matrix-marshalers.list +matrix-marshalers.h: stamp-matrix-marshalers + @true + +stamp-matrix-marshalers: matrix-marshalers.list $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_matrix_marshal \ $(srcdir)/matrix-marshalers.list \ --header \ --valist-marshallers >> xgen-gmlh \ && (cmp -s xgen-gmlh matrix-marshalers.h \ || cp xgen-gmlh matrix-marshalers.h) \ - && rm -f xgen-gmlh + && rm -f xgen-gmlh \ + && echo timestamp > $(@F) -matrix-marshalers.c: matrix-marshalers.list +matrix-marshalers.c: matrix-marshalers.h $(AM_V_GEN) (echo "#include \"matrix-marshalers.h\""; \ - $(GLIB_GENMARSHAL) --prefix=_matrix_marshal \ - $(srcdir)/matrix-marshalers.list \ - --body \ - --valist-marshallers) >> xgen-gmlc \ + echo "#undef G_ENABLE_DEBUG"; \ + $(GLIB_GENMARSHAL) --prefix=_matrix_marshal \ + $(srcdir)/matrix-marshalers.list \ + --body \ + --valist-marshallers) >> xgen-gmlc \ && cp xgen-gmlc matrix-marshalers.c \ && rm -f xgen-gmlc