diff --git a/Makefile.am b/Makefile.am index b03e6a450..b3bda88ea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,11 +13,21 @@ EXTRA_DIST= ChangeLog configure.ac \ tools/gas2masm/gas2masm.dsp tools/gas2masm/gas2masm.dsw \ tools/gas2masm/gas2masm.mak tools/gas2masm/gas2masm.mdp -ChangeLog: - git log > ChangeLog - NOCONV_DIST= $(distdir)/include/win32/resources/icon1.ico +changelog: ChangeLog +ChangeLog: FORCE + @if test -d "$(srcdir)/.git"; then \ + echo "creating ChangeLog" && \ + ( cd "$(top_srcdir)" && \ + echo 'This file is generated by Makefile; do not edit.'; \ + echo; \ + $(top_srcdir)/missing --run git log --abbrev-commit --stat --no-merges \ + ) > $(top_builddir)/ChangeLog; \ + else \ + echo 'A git clone is required to generate ChangeLog' >&2; \ + fi + dist-zip: distdir -chmod -R a+r $(distdir) ZIP="-r9q" zip $(distdir).zip $(NOCONV_DIST) @@ -36,3 +46,5 @@ dist-all-local: distdir ZIP="-r9q" zip $(distdir).zip $(NOCONV_DIST) ZIP="-r9ql" zip $(distdir).zip $(distdir) -x $(NOCONV_DIST) -rm -rf $(distdir) + +FORCE: