so add a test for it in configure.
Wrap generated headers files with #ifdef/#endif and add
a comment related to their auto-generated nature.
Make the generation itself quiet, but display a message
on error.
Make these targets depend on respective Makefile.in.
fi
AM_PATH_GTK_2_0(2.4.0,,AC_MSG_ERROR(GTK+ >= 2.4.0 not installed.))
+AC_PATH_PROGS(GDK_PIXBUF_CSOURCE, "gdk-pixbuf-csource")
AC_DEFINE_UNQUOTED(GQ_HELPDIR, "$prefix/share/doc/geeqie-$VERSION", [Location of documentation files])
AC_DEFINE_UNQUOTED(GQ_HTMLDIR, "$prefix/share/doc/geeqie-$VERSION/html", [Location of html documentation])
icon_spinner $(srcdir)/ui_spinner.png \
icon_tabcomp $(srcdir)/ui_tabcomp.png
-ui_icons.h: $(extra_ICONS)
- gdk-pixbuf-csource --raw --extern --build-list $(ICON_PAIRS) > ui_icons.h
+ui_icons.h: $(extra_ICONS) Makefile.in
+ @(echo '/* Auto generated file, do not edit */'; echo; \
+ echo '#ifndef UI_ICONS_H'; \
+ echo '#define UI_ICONS_H'; echo; \
+ $(GDK_PIXBUF_CSOURCE) --raw --extern --build-list $(ICON_PAIRS); \
+ echo '#endif /* UI_ICONS_H */') > $@ || echo "!!! Failed to generate $@ !!!"
ui_spinner.o: ui_icons.h
icon_tools $(srcdir)/icon_tools.png \
icon_view $(srcdir)/icon_view.png
-icons_inline.h: $(ICONS_INLINE)
- gdk-pixbuf-csource --raw --extern --build-list $(ICONS_INLINE_PAIRS) > icons_inline.h
+icons_inline.h: $(ICONS_INLINE) Makefile.in
+ @(echo '/* Auto generated file, do not edit */'; echo; \
+ echo '#ifndef ICONS_INLINE_H'; \
+ echo '#define ICONS_INLINE_H'; echo; \
+ $(GDK_PIXBUF_CSOURCE) --raw --extern --build-list $(ICONS_INLINE_PAIRS); \
+ echo '#endif /* ICONS_INLINE_H */') > $@ || echo "!!! Failed to generate $@ !!!"
noinst_DATA = icons_inline.h
CLEANFILES = $(noinst_DATA)