Bug 447930. Preserve old timestamp on cairo-features.h across reconfigures, if it hasn't changed. r=bsmedberg
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 29 Jul 2008 21:49:58 -0700
changeset 16289 3f3ff0208421c029011ddc796136ca88208cb0da
parent 16288 74297bc2ef7621039e48f234668692e6ecc34288
child 16290 20427bfb85bc38f7f0aec97dfab6485a7f3ab14e
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs447930
milestone1.9.1a2pre
Bug 447930. Preserve old timestamp on cairo-features.h across reconfigures, if it hasn't changed. r=bsmedberg
configure.in
--- a/configure.in
+++ b/configure.in
@@ -7464,16 +7464,20 @@ if test "$MOZ_TREE_CAIRO"; then
             if test "$MOZ_X11"; then
                 MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS "'-L$(DEPTH)/gfx/cairo/glitz/src/glx -lmozglitzglx -lGL'
             fi
             if test "$MOZ_WIDGET_TOOLKIT" = "windows"; then
                 MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS "'-L$(DEPTH)/gfx/cairo/glitz/src/wgl -lmozglitzwgl'
             fi
         fi
     fi
+
+    CAIRO_FEATURES_H=gfx/cairo/cairo/src/cairo-features.h
+    mv -f $CAIRO_FEATURES_H "$CAIRO_FEATURES_H".orig 2> /dev/null
+
 else
    PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION freetype2 fontconfig)
    MOZ_CAIRO_CFLAGS=$CAIRO_CFLAGS
    MOZ_CAIRO_LIBS=$CAIRO_LIBS
    if test "$MOZ_X11"; then
         PKG_CHECK_MODULES(CAIRO_XRENDER, cairo-xlib-xrender >= $CAIRO_VERSION)
         MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS"
         MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS"
@@ -8323,16 +8327,25 @@ echo $MAKEFILES | ${PERL} $srcdir/build/
 fi
 . ./conftest.sh
 rm conftest.sh
 
 echo $MAKEFILES > unallmakefiles
 
 AC_OUTPUT($MAKEFILES)
 
+dnl Prevent the regeneration of cairo-features.h forcing rebuilds of gfx stuff
+if test "$CAIRO_FEATURES_H"; then
+  if cmp -s $CAIRO_FEATURES_H "$CAIRO_FEATURES_H".orig; then
+    mv -f "$CAIRO_FEATURES_H".orig "$CAIRO_FEATURES_H" 2> /dev/null
+  else
+    rm -f "$CAIRO_FEATURES_H".orig 2> /dev/null
+  fi
+fi
+
 dnl ========================================================
 dnl = Setup a nice relatively clean build environment for
 dnl = sub-configures.
 dnl ========================================================
 CC="$_SUBDIR_CC" 
 CXX="$_SUBDIR_CXX" 
 CFLAGS="$_SUBDIR_CFLAGS" 
 CPPFLAGS="$_SUBDIR_CPPFLAGS"