summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@src.gnome.org>1999-03-29 00:15:02 +0000
committerRaja R Harinath <harinath@src.gnome.org>1999-03-29 00:15:02 +0000
commit32f6e0a4ce7df5383b24dfde8de94e2176920fa3 (patch)
treec8ba4c9f52d8c2c7283c90436cbdad524f0b3155 /gdk
parent55a5d2144de146f03e760a3bf5cef44d78f85524 (diff)
downloadgtk+-32f6e0a4ce7df5383b24dfde8de94e2176920fa3.tar.gz
Make sure `gdkconfig.h' exists after the rule is fired.
* gdk/Makefile.am (gdkconfig.h): Make sure `gdkconfig.h' exists after the rule is fired. (install-exec-local): Install gdkconfig.h only if the contents are different from the currently installed gdkconfig.h. Rationale: `make install-exec' is meant to install files that go into $exec_prefix, which includes `gdkconfig.h'. However, developers use `make install-exec' when they know that none of the headers have changed, to prevent needless recompiles of other packages. My previous change of installing `*config.h' during `make install-exec' undermines this, even though it is the right thing to do. So, in the spirit of "do the right thing first, optimize later", here's the optimization.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/Makefile.am14
1 files changed, 10 insertions, 4 deletions
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index d5e5ae5a72..6bb478351d 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -2,7 +2,7 @@
gdkincludedir = $(includedir)/gdk
-configexecincludedir = $(pkglibdir)/include
+
lib_LTLIBRARIES = libgdk.la
@@ -74,12 +74,18 @@ libgdk_la_LDFLAGS = \
@x_libs@ \
-lm
-configexecinclude_DATA = \
- gdkconfig.h
+configexecincludedir = $(pkglibdir)/include
+#configexecinclude_DATA = gdkconfig.h
+install-exec-local: gdkconfig.h
+ $(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
+ file=$(DESTDIR)$(configexecincludedir)/gdkconfig.h; \
+ if test -r $$file && cmp -s gdkconfig.h $$file; then :; \
+ else $(INSTALL_DATA) gdkconfig.h $$file; fi
BUILT_SOURCES = stamp-gc-h #note: not gdkconfig.h
gdkconfig.h: stamp-gc-h
- @:
+ @if test -f gdkconfig.h; then :; \
+ else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
stamp-gc-h: ../config.status
cd .. && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=gdk/gdkconfig.h ./config.status
echo timestamp > stamp-gc-h