aboutsummaryrefslogtreecommitdiffstats
path: root/marshal.mk
diff options
context:
space:
mode:
Diffstat (limited to 'marshal.mk')
-rw-r--r--marshal.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/marshal.mk b/marshal.mk
new file mode 100644
index 0000000000..9d4298deae
--- /dev/null
+++ b/marshal.mk
@@ -0,0 +1,7 @@
+%.h: %.list
+ ( $(GLIB_GENMARSHAL) --prefix=$(subst -,_,$*) $< --header > $@.tmp \
+ && mv $@.tmp $@ ) || ( rm -f $@.tmp && exit 1 )
+
+%.c: %.list %.h
+ ( (echo "#include \"$*.h\""; $(GLIB_GENMARSHAL) --prefix=$(subst -,_,$*) $*.list --body) > $@.tmp \
+ && mv $@.tmp $@ ) || ( rm -f $@.tmp && exit 1 )