build: do not fail due to an existing read-only hello.1 * Makefile.am (hello.1): In Makefile rules, never redirect directly to the target. Instead, redirect to a temporary, $@-t, and once that succeeds, rename to target using "mv -f". Also, since this is a generated file, explicitly make it read-only, so one is less likely to think it is an editable primary source. Reported by Assaf Gordon.
diff --git a/Makefile.am b/Makefile.am line changes: +3/-1 index 14aa203..eb02a4c --- a/Makefile.am +++ b/Makefile.am
@@ -48,7 +48,9 @@ EXTRA_DIST += $(man_MANS) CLEANFILES = $(man_MANS) hello.1: hello - $(HELP2MAN) --include=$(top_srcdir)/man/hello.x $(top_builddir)/hello -o $@ + $(HELP2MAN) --include=$(top_srcdir)/man/hello.x $(top_builddir)/hello -o $@-t + chmod a=r $@-t + mv -f $@-t $@ TESTS = \ tests/greeting-1 \