From 86c9b100f3e27f5b3136f4a1d37b703306e7ddd9 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sat, 9 Apr 2011 14:52:10 +0200 Subject: Fix VPATH builds --- Makefile.am | 2 +- data/Makefile.am | 6 +++--- src/Makefile.am | 3 ++- src/tests/Makefile.am | 2 +- util/fluxbox-update_configs.cc | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8411e57..b0c5dfb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,7 @@ SUBDIRS = doc nls src util data MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in ACLOCAL_AMFLAGS = -I . -EXTRA_DIST = acinclude.m4 3rd/vim/* 3rd/vim/syntax/* +EXTRA_DIST = acinclude.m4 $(top_srcdir)/3rd/vim/* $(top_srcdir)/3rd/vim/syntax/* uninstall-local: rmdir $(pkgdatadir) diff --git a/data/Makefile.am b/data/Makefile.am index 856677d..ea462f1 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -20,19 +20,19 @@ all-local: menu init apps install-pkgdataDATA: @echo "Installing menu file in $(DESTDIR)$(DEFAULT_MENU)" $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_MENU)) - $(INSTALL_DATA) $(srcdir)/menu $(DESTDIR)$(DEFAULT_MENU) + $(INSTALL_DATA) $(builddir)/menu $(DESTDIR)$(DEFAULT_MENU) @echo "Installing keys file in $(DESTDIR)$(DEFAULT_KEYS)" $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_KEYS)) $(INSTALL_DATA) $(srcdir)/keys $(DESTDIR)$(DEFAULT_KEYS) @echo "Installing apps file in $(DESTDIR)$(DEFAULT_APPS)" $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_APPS)) - $(INSTALL_DATA) $(srcdir)/apps $(DESTDIR)$(DEFAULT_APPS) + $(INSTALL_DATA) $(builddir)/apps $(DESTDIR)$(DEFAULT_APPS) @echo "Installing overlay file in $(DESTDIR)$(DEFAULT_OVERLAY)" $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_OVERLAY)) $(INSTALL_DATA) $(srcdir)/overlay $(DESTDIR)$(DEFAULT_OVERLAY) @echo "Installing init file in $(DESTDIR)$(DEFAULT_INIT)" $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_INIT)) - $(INSTALL_DATA) $(srcdir)/init $(DESTDIR)$(DEFAULT_INIT) + $(INSTALL_DATA) $(builddir)/init $(DESTDIR)$(DEFAULT_INIT) @echo "Installing windowmenu file in $(DESTDIR)$(DEFAULT_WINDOWMENU)" $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_WINDOWMENU)) $(INSTALL_DATA) $(srcdir)/windowmenu $(DESTDIR)$(DEFAULT_WINDOWMENU) diff --git a/src/Makefile.am b/src/Makefile.am index 38182c5..e60f9b4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -58,6 +58,7 @@ defaults.hh: Makefile defaults.cc: force @( \ + GITDIR=$(top_srcdir)/.git; \ echo '#include "defaults.hh"'; \ echo ''; \ echo 'std::string realProgramName(const std::string& name) {'; \ @@ -65,7 +66,7 @@ defaults.cc: force echo '}'; \ echo ''; \ echo 'const char* gitrevision() {'; \ - echo ' return "'`cat ../.git/$$(cat ../.git/HEAD | cut -f 2 -d ' ')`'";';\ + echo ' return "'`cat $$GITDIR/$$(cat $$GITDIR/HEAD | cut -f 2 -d ' ')`'";';\ echo '}' ) > defaults_tmp.cc @if ! cmp defaults_tmp.cc defaults.cc ; then cp defaults_tmp.cc defaults.cc; fi @rm defaults_tmp.cc diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 1b82135..53e1ddc 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES= -I.. +INCLUDES= -I$(top_srcdir)/src noinst_PROGRAMS= \ testTexture \ diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc index 39539f8..37248ce 100644 --- a/util/fluxbox-update_configs.cc +++ b/util/fluxbox-update_configs.cc @@ -24,7 +24,7 @@ #include "../src/FbTk/StringUtil.hh" #include "../src/FbTk/FileUtil.hh" -#include "defaults.hh" +#include "../src/defaults.hh" #ifdef HAVE_CONFIG_H #include "config.h" -- cgit v0.11.2