From c896a481f2f2da6aa79b9a7907d27f059586aa16 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 4 Nov 2016 10:17:06 +0200 Subject: [PATCH] Fix "make dist" work out of the box again 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. --- Makefile.am | 6 ++++++ Makefile.maint | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index ddb35c1bd7..a00bb73991 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/Makefile.maint b/Makefile.maint index f84154c9e2..8de6deed45 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -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