## Makefile.am fragment sourced by src/Makefile.am.

helper/unit-menu.$(OBJEXT): helper/sp-marshal.h

ink_common_sources +=	\
	helper/action.cpp	\
	helper/action.h	\
	helper/action-context.cpp	\
	helper/action-context.h	\
	helper/geom.cpp	\
	helper/geom.h	\
	helper/geom-curves.h	\
	helper/geom-nodetype.cpp	\
	helper/geom-nodetype.h	\
	helper/geom-pathstroke.cpp      \
	helper/geom-pathstroke.h        \
	helper/gnome-utils.cpp	\
	helper/gnome-utils.h	\
	helper/mathfns.h \
	helper/png-write.cpp	\
	helper/png-write.h	\
	helper/sp-marshal.cpp	\
	helper/sp-marshal.h	\
	helper/window.cpp	\
	helper/window.h		\
	helper/stock-items.cpp	\
	helper/stock-items.h	

# cmp exits with status 0 when there are no differences. "if" executes the commands
# after "then" when the exit status of the if command is 0 (this is crazy).
helper/sp-marshal.h: helper/sp-marshal.list
	glib-genmarshal --prefix=sp_marshal --header $(srcdir)/helper/sp-marshal.list > helper/tmp.sp-marshal.h
	if cmp -s helper/sp-marshal.h helper/tmp.sp-marshal.h; \
	then rm helper/tmp.sp-marshal.h; \
	else mv helper/tmp.sp-marshal.h helper/sp-marshal.h; fi

helper/sp-marshal.cpp: helper/sp-marshal.list helper/sp-marshal.h
	( echo '#include "helper/sp-marshal.h"' &&	\
	  glib-genmarshal --prefix=sp_marshal --body $(srcdir)/helper/sp-marshal.list )	\
	 > helper/tmp.sp-marshal.cpp; \
	if cmp -s helper/sp-marshal.cpp helper/tmp.sp-marshal.cpp; \
	then rm helper/tmp.sp-marshal.cpp; \
	else mv helper/tmp.sp-marshal.cpp helper/sp-marshal.cpp; fi

helper/sp-marshal.cpp helper/sp-marshal.h: helper/sp-marshal.list
