Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,24 @@ GITLOG_START_POINT=v2.6.0
# the current dir, and defaults to generate a "ChangeLog" in the current dir.
# The script itself is generated from a template, so resides in builddir.
dummy-stamp:
ChangeLog: tools/gitlog2changelog.py dummy-stamp
cd $(abs_top_srcdir) && \
ChangeLog: dummy-stamp
+@$(MAKE) $(AM_MAKEFLAGS) $(abs_top_builddir)/ChangeLog

# Be sure to not confuse with a DIST'ed file (and so try to overwrite it):
$(abs_top_builddir)/ChangeLog: tools/gitlog2changelog.py dummy-stamp
@cd $(abs_top_srcdir) && \
if test -e .git ; then \
CHANGELOG_FILE="$@" $(abs_top_builddir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \
{ printf "gitlog2changelog.py failed to generate the ChangeLog.\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n" > "$@" ; } ; \
else \
if ! test -s "$@" ; then \
printf "Failed to generate the ChangeLog.\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n" > "$@" ; \
if test x"$(abs_top_srcdir)" != x"$(abs_top_builddir)" -a -s ./ChangeLog ; then \
echo "Using distributed ChangeLog file from sources" >&2 ; \
rm -f "$@" || true ; \
cat ./ChangeLog > "$@" ; \
else \
if ! test -s "$@" ; then \
printf "Failed to generate the ChangeLog.\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n" > "$@" ; \
fi ; \
fi ; \
fi

Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ $(top_builddir)/ChangeLog.adoc: $(top_builddir)/ChangeLog
|| { \
MSG="FAILED to resolve input or output filename with this make implementation, or input was not generated!"; \
echo " DOC-CHANGELOG-ASCIIDOC SKIP: $${MSG}" >&2; \
test -n "$@" && echo "$${MSG}" > "$@" ; \
test -n "$@" && { printf '=== Failed to generate the ChangeLog\n\n%s\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n' "$${MSG}" > "$@" ; } ; \
exit ; \
} ; \
echo " DOC-CHANGELOG-ASCIIDOC $${INPUT} => $@" \
Expand Down