Fix VPATH builds

This commit is contained in:
Pavel Labath 2011-04-09 14:52:10 +02:00 committed by Mathias Gumz
parent 8b6943ab1c
commit 86c9b100f3
5 changed files with 8 additions and 7 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -1,4 +1,4 @@
INCLUDES= -I..
INCLUDES= -I$(top_srcdir)/src
noinst_PROGRAMS= \
testTexture \

View file

@ -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"