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.
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user