]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmdline-opts/Makefile: on error, do not leave a partial
authorDaniel Stenberg <daniel@haxx.se>
Mon, 13 Feb 2023 14:34:54 +0000 (15:34 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 13 Feb 2023 19:53:45 +0000 (20:53 +0100)
And support 'make V=1' to show the full command line

Closes #10497

docs/cmdline-opts/Makefile.am

index 434b05818079819a105b1732731f4b81824dc861..0b5b29a127369a6734a9d4f657c6028e79636a27 100644 (file)
@@ -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))