Skip to content

Commit

Permalink
Fix "make dist" work out of the box again
Browse files Browse the repository at this point in the history
ChangeLog is listed as EXTRA_DIST but there's no rule to create it
so dist target is broken except when invoked with Makefile.maint. Which
nobody finds because its such a strange thing to have.

Move back ChangeLog generation into main Makefile.am but do not
require git to create it. Instead have a rule to create an empty
file to appease EXTRA_DIST no matter what, and only create the
real thing if we're in a git checkout and git command is present.
  • Loading branch information
pmatilai committed Nov 4, 2016
1 parent 97c78d1 commit c896a48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 6 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,12 @@ BUILT_SOURCES += db.h
endif
DISTCLEANFILES = db.h

ChangeLog:
touch ChangeLog

dist-hook:
if [ -d .git ] && [ -x $(command -v git) ]; then git log --no-merges > $(distdir)/ChangeLog; fi

clean-local:
rm -rf doc/hacking/html
rm -rf include
Expand Down
7 changes: 1 addition & 6 deletions Makefile.maint
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
include Makefile

snapshot: ChangeLog
snapshot:
@$(MAKE) dist VERSION=$(VERSION)-git`git rev-list --count HEAD`

release: ChangeLog dist

ChangeLog: .git
@git log --no-merges > ChangeLog

0 comments on commit c896a48

Please sign in to comment.