From f17bdf3c87ab5d2d6fabb17011e0b8a5465e5ded Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 18 Aug 2003 15:21:11 +0000 Subject: [PATCH] Rework handling of REBUILD_PNGS, so that we also don't try to REBUILD_PNGS Mon Aug 18 10:51:57 2003 Owen Taylor * configure.in: Rework handling of REBUILD_PNGS, so that we also don't try to REBUILD_PNGS when cross-compiling and there is no gdk-pixbuf-csource. But give an error if gtk/stock-icons/gtkstockpixbufs.h is not in the source tree. (Note that REBUILDS_PNG was set backwards before, which is why you always had to manually recreate gtkstockpixbufs.h!) * gtk/stock-icons/Makefile.am: Don't make gtkstockpixbufs.h depend on newly built gdk-pixbuf-csource when cross-compiling. (Was already in HEAD branch) --- ChangeLog | 14 ++++++++++++++ ChangeLog.pre-2-10 | 14 ++++++++++++++ ChangeLog.pre-2-4 | 14 ++++++++++++++ ChangeLog.pre-2-6 | 14 ++++++++++++++ ChangeLog.pre-2-8 | 14 ++++++++++++++ configure.in | 23 ++++++++++++++++------- gtk/stock-icons/Makefile.am | 4 +++- 7 files changed, 89 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c361065b9..e0053373ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Mon Aug 18 10:51:57 2003 Owen Taylor + + * configure.in: Rework handling of REBUILD_PNGS, + so that we also don't try to REBUILD_PNGS when + cross-compiling and there is no gdk-pixbuf-csource. + But give an error if gtk/stock-icons/gtkstockpixbufs.h + is not in the source tree. (Note that REBUILDS_PNG + was set backwards before, which is why you always + had to manually recreate gtkstockpixbufs.h!) + + * gtk/stock-icons/Makefile.am: Don't make + gtkstockpixbufs.h depend on newly built gdk-pixbuf-csource + when cross-compiling. (Was already in HEAD branch) + Mon Aug 18 10:19:55 2003 Owen Taylor * gtk+-2.0-uninstalled.pc.in: Add a missing gtk/ in the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7c361065b9..e0053373ee 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,17 @@ +Mon Aug 18 10:51:57 2003 Owen Taylor + + * configure.in: Rework handling of REBUILD_PNGS, + so that we also don't try to REBUILD_PNGS when + cross-compiling and there is no gdk-pixbuf-csource. + But give an error if gtk/stock-icons/gtkstockpixbufs.h + is not in the source tree. (Note that REBUILDS_PNG + was set backwards before, which is why you always + had to manually recreate gtkstockpixbufs.h!) + + * gtk/stock-icons/Makefile.am: Don't make + gtkstockpixbufs.h depend on newly built gdk-pixbuf-csource + when cross-compiling. (Was already in HEAD branch) + Mon Aug 18 10:19:55 2003 Owen Taylor * gtk+-2.0-uninstalled.pc.in: Add a missing gtk/ in the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7c361065b9..e0053373ee 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,17 @@ +Mon Aug 18 10:51:57 2003 Owen Taylor + + * configure.in: Rework handling of REBUILD_PNGS, + so that we also don't try to REBUILD_PNGS when + cross-compiling and there is no gdk-pixbuf-csource. + But give an error if gtk/stock-icons/gtkstockpixbufs.h + is not in the source tree. (Note that REBUILDS_PNG + was set backwards before, which is why you always + had to manually recreate gtkstockpixbufs.h!) + + * gtk/stock-icons/Makefile.am: Don't make + gtkstockpixbufs.h depend on newly built gdk-pixbuf-csource + when cross-compiling. (Was already in HEAD branch) + Mon Aug 18 10:19:55 2003 Owen Taylor * gtk+-2.0-uninstalled.pc.in: Add a missing gtk/ in the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7c361065b9..e0053373ee 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,17 @@ +Mon Aug 18 10:51:57 2003 Owen Taylor + + * configure.in: Rework handling of REBUILD_PNGS, + so that we also don't try to REBUILD_PNGS when + cross-compiling and there is no gdk-pixbuf-csource. + But give an error if gtk/stock-icons/gtkstockpixbufs.h + is not in the source tree. (Note that REBUILDS_PNG + was set backwards before, which is why you always + had to manually recreate gtkstockpixbufs.h!) + + * gtk/stock-icons/Makefile.am: Don't make + gtkstockpixbufs.h depend on newly built gdk-pixbuf-csource + when cross-compiling. (Was already in HEAD branch) + Mon Aug 18 10:19:55 2003 Owen Taylor * gtk+-2.0-uninstalled.pc.in: Add a missing gtk/ in the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7c361065b9..e0053373ee 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,17 @@ +Mon Aug 18 10:51:57 2003 Owen Taylor + + * configure.in: Rework handling of REBUILD_PNGS, + so that we also don't try to REBUILD_PNGS when + cross-compiling and there is no gdk-pixbuf-csource. + But give an error if gtk/stock-icons/gtkstockpixbufs.h + is not in the source tree. (Note that REBUILDS_PNG + was set backwards before, which is why you always + had to manually recreate gtkstockpixbufs.h!) + + * gtk/stock-icons/Makefile.am: Don't make + gtkstockpixbufs.h depend on newly built gdk-pixbuf-csource + when cross-compiling. (Was already in HEAD branch) + Mon Aug 18 10:19:55 2003 Owen Taylor * gtk+-2.0-uninstalled.pc.in: Add a missing gtk/ in the diff --git a/configure.in b/configure.in index 9a973d631e..2407ac7257 100644 --- a/configure.in +++ b/configure.in @@ -779,12 +779,6 @@ dnl Test for libpng *** from CVS.]) fi - REBUILD_PNGS=\# - if test -z "$LIBPNG"; then - REBUILD_PNGS= - fi - AC_SUBST(REBUILD_PNGS) - AC_SUBST(LIBTIFF) AC_SUBST(LIBJPEG) AC_SUBST(LIBPNG) @@ -899,6 +893,11 @@ fi AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes) +REBUILD_PNGS= +if test -z "$LIBPNG"; then + REBUILD_PNGS=# +fi + dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes) @@ -906,10 +905,20 @@ AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes) if test $cross_compiling = yes; then AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no) if test x$GDK_PIXBUF_CSOURCE = xno; then - AC_MSG_ERROR(Could not find a gdk-pixbuf-csource in your PATH) + REBUILD_PNGS=# fi fi +if test ! -f $srcdir/gtk/stock-icons/gtkstockpixbufs.h && + test "x$REBUILD_PNGS" = "x#" ; then + AC_MSG_ERROR([ +*** gtkstockpixbufs.h is not in the tree, and cannot be built +*** because you don't have libpng, or (when cross-compiling) you +*** don't have a prebuilt gdk-pixbuf-csource on the host system.]) +fi + +AC_SUBST(REBUILD_PNGS) + GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0" GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB" GDK_PIXBUF_EXTRA_CFLAGS= diff --git a/gtk/stock-icons/Makefile.am b/gtk/stock-icons/Makefile.am index 26eaae1f89..fea43745a2 100644 --- a/gtk/stock-icons/Makefile.am +++ b/gtk/stock-icons/Makefile.am @@ -265,11 +265,13 @@ CLEANFILES = $(noinst_DATA) if CROSS_COMPILING pixbuf_csource=$(GDK_PIXBUF_CSOURCE) +pixbuf_csource_deps= else pixbuf_csource=GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource +pixbuf_csource_deps=$(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource $(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders endif -gtkstockpixbufs.h: @REBUILD_PNGS@ $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource $(IMAGES) +gtkstockpixbufs.h: @REBUILD_PNGS@ $(pixbuf_csource_deps) $(IMAGES) $(pixbuf_csource) \ --raw --build-list $(VARIABLES1) > $(srcdir)/gtkstockpixbufs.h || \ ( rm -f $(srcdir)/gtkstockpixbufs.h && false )