Skip to content
Browse files

Update .gitignore even if srcdir != builddir

When srcdir != builddir, autotools sets VPATH = @srcdir@.
due to this and unfortunately the top directory has same name to
liblangtag, where contains the library's source code, make confuses
the top directory is the target directory for 'liblangtag'.
.gitignore is already available since building is performed at the top
therefore .gitignore considered available.

To avoid this confusion on make, abs_srcdir has to be used for target.
  • Loading branch information...
1 parent ae81a0a commit 8bcdf54202e278cb915724b1d97a2c486f5ef862 @tagoh committed Dec 12, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 git.mk
View
4 git.mk
@@ -84,7 +84,7 @@ git-mk-install:
### .gitignore generation
-$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
+$(abs_srcdir)/.gitignore: $(srcdir)/Makefile.am $(top_srcdir)/git.mk
$(AM_V_GEN) \
{ \
if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
@@ -185,7 +185,7 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
LC_ALL=C sort | uniq > $@.tmp && \
mv $@.tmp $@;
-all: $(srcdir)/.gitignore gitignore-recurse-maybe
+all: $(abs_srcdir)/.gitignore gitignore-recurse-maybe
gitignore-recurse-maybe:
@if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \
$(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \

0 comments on commit 8bcdf54

Please sign in to comment.
Something went wrong with that request. Please try again.