# HG changeset patch # User zas_ # Date 1207919268 0 # Node ID 6cb3c072be3f3b19a89825563c2d2f0da0f31bbe # Parent 667e49f5216822a18f06d2daeb49d4271020735d ui_icons.h and icons_inline.h depend on gdk-pixbuf-csource, 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. diff -r 667e49f52168 -r 6cb3c072be3f configure.in --- a/configure.in Fri Apr 11 12:31:32 2008 +0000 +++ b/configure.in Fri Apr 11 13:07:48 2008 +0000 @@ -19,6 +19,7 @@ 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]) diff -r 667e49f52168 -r 6cb3c072be3f src/Makefile.am --- a/src/Makefile.am Fri Apr 11 12:31:32 2008 +0000 +++ b/src/Makefile.am Fri Apr 11 13:07:48 2008 +0000 @@ -36,8 +36,12 @@ 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 diff -r 667e49f52168 -r 6cb3c072be3f src/icons/Makefile.am --- a/src/icons/Makefile.am Fri Apr 11 12:31:32 2008 +0000 +++ b/src/icons/Makefile.am Fri Apr 11 13:07:48 2008 +0000 @@ -35,8 +35,12 @@ 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)