cd "$1"
[ ! -e "ChangeLog.gqview" ] && exit 1
-[ ! -x "$(command -v git)" ] && exit 0
-[ ! -d ".git" ] && exit 0
+[ ! -x "$(command -v git)" ] && exit 1
+[ ! -d ".git" ] && exit 1
LC_ALL=C git log --no-merges --no-notes --encoding=UTF-8 --no-follow --use-mailmap 1b58572cf58e9d2d4a0305108395dab5c66d3a09..HEAD > "$builddir/ChangeLog.$$.new" && \
cat ChangeLog.gqview >> "$builddir/ChangeLog.$$.new" && \
subdir('doc')
# Install other project files
-run_command(find_program('gen_changelog.sh'), meson.source_root(), meson.build_root(), check : true)
+res = run_command(find_program('gen_changelog.sh'), meson.source_root(), meson.build_root(), check : false)
+
+if res.returncode() == 0
+ install_data(join_paths(meson.build_root(), 'ChangeLog'), join_paths(meson.build_root(), 'ChangeLog.html'), install_dir : helpdir)
+ summary({'ChangeLog' : ['ChangeLog, ChangeLog.html created:', true]}, section : 'Documentation', bool_yn : true)
+else
+ summary({'ChangeLog' : ['ChangeLog, ChangeLog.html created:', false]}, section : 'Documentation', bool_yn : true)
+endif
pandoc = find_program('pandoc', required : false)
if pandoc.found()
run_command(find_program('gen_readme.sh'), meson.source_root(), meson.build_root(), check : false)
install_data('README.md', 'COPYING', 'TODO', 'AUTHORS',
- join_paths(meson.build_root(), 'ChangeLog'),
join_paths(meson.build_root(), 'README.html'),
- join_paths(meson.build_root(), 'ChangeLog.html'),
install_dir : helpdir)
summary({'README' : ['README.html created:', true]}, section : 'Documentation', bool_yn : true)
else
install_data('README.md', 'COPYING', 'TODO', 'AUTHORS',
- join_paths(meson.build_root(), 'ChangeLog'),
- join_paths(meson.build_root(), 'ChangeLog.html'),
install_dir : helpdir)
summary({'README' : ['pandoc not found - README.html created:', false]}, section : 'Documentation', bool_yn : true)
endif