From: Daniel Stenberg Date: Mon, 13 Feb 2023 14:34:54 +0000 (+0100) Subject: cmdline-opts/Makefile: on error, do not leave a partial X-Git-Tag: curl-7_88_0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17153e173d4ff41702963107346853b12ba12d26;p=thirdparty%2Fcurl.git cmdline-opts/Makefile: on error, do not leave a partial And support 'make V=1' to show the full command line Closes #10497 --- diff --git a/docs/cmdline-opts/Makefile.am b/docs/cmdline-opts/Makefile.am index 434b058180..0b5b29a127 100644 --- a/docs/cmdline-opts/Makefile.am +++ b/docs/cmdline-opts/Makefile.am @@ -30,8 +30,12 @@ include Makefile.inc EXTRA_DIST = $(DPAGES) MANPAGE.md gen.pl $(OTHERPAGES) CMakeLists.txt +GEN = $(GN_$(V)) +GN_0 = @echo " GENERATE" $@; +GN_1 = +GN_ = $(GN_0) + all: $(MANPAGE) $(MANPAGE): $(DPAGES) $(OTHERPAGES) Makefile.inc - @echo "generate $(MANPAGE)" - @(cd $(srcdir) && @PERL@ ./gen.pl mainpage $(DPAGES)) > $(MANPAGE) + $(GEN)(rm -f $(MANPAGE) && cd $(srcdir) && @PERL@ ./gen.pl mainpage $(DPAGES) > $(builddir)/manpage.tmp && mv $(builddir)/manpage.tmp $(MANPAGE))