gnomes gtk+/glib fails VPATH install



Hello.

I have started doing my gnome builds in a separate subdirectory so that cvs
update creates less noise... when running make install from this directory
after a successful build, the Makefile tries to install
$(srcdir)/glibconfig.h (which doesn't exist) instead of ./glibconfig.h.

Two solutions (both require patching automake) come to mind:

  i) amend the loop in header.am to check for each file in the build directory
     first, and fall back on the srcdir if that fails:
     
install-@DIR@HEADERS: $(@DIR@_HEADERS)
	@$(NORMAL_INSTALL)
	$(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
	@list='$(@DIR@_HEADERS)'; for p in $$list; do \
	  test -f ./$$p || p=$(srcdir)/$$p; \
	  echo " $(INSTALL_DATA) $$p $(@DIR@dir)/$$p"; \
	  $(INSTALL_DATA) $$p $(@DIR@dir)/$$p; \
	done
	
 ii) check whether each file is listed in BUILT_SOURCES to decide if a
     build directory version exists:

install-@DIR@HEADERS: $(@DIR@_HEADERS)
	@$(NORMAL_INSTALL)
	$(mkinstalldirs) $(@DIR@dir)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
	@list='$(@DIR@_HEADERS)'; for p in $$list; do \
	  expr '$(BUILT_SOURCES)' : "$$p" > /dev/null || p=$(srcdir)/$$p; \
	  echo " $(INSTALL_DATA) $$p $(@DIR@dir)/$$p"; \
	  $(INSTALL_DATA) $$p $(@DIR@dir)/$$p; \
	done

I prefer the former, as the other solution requires changes to Makefile.am
(listing offending headers in BUILT_SOURCES) -- and the latter seems a bit
hackish (I didn't test this one either!)

Tom, can you ajudicate and include a patch for 1.2f?  I expect other install
targets may require a parallel patch too?  In the mean while I don't mind
copying any offenders into the build directory.

Cheers,
	Gary V Vaughan.
-- 
{#include #.signature#}
WARNING:  Cannot find '.signature' template file

PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]