Skip to content

Commit

Permalink
Update .gitignore even if srcdir != builddir
Browse files Browse the repository at this point in the history
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
tagoh committed Dec 12, 2012
1 parent ae81a0a commit 8bcdf54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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; \
Expand Down

0 comments on commit 8bcdf54

Please sign in to comment.