]> granicus.if.org Git - curl/commitdiff
build: fixed making man page in out-of-tree tarball builds
authorDan Fandrich <dan@coneharvesters.com>
Thu, 9 Mar 2017 21:45:40 +0000 (22:45 +0100)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 9 Mar 2017 21:55:28 +0000 (22:55 +0100)
The man page taken from the release package is found in a different
location than if it's built from source. It must be referenced as $< in
the rule to get its correct location in the VPATH.

src/Makefile.am

index 19bab68ac3047a75c8f653f5cbeaca061e8118a4..03c5e2c123601f5f8ebf5a19a27c25728243332d 100644 (file)
@@ -106,19 +106,21 @@ $(MANPAGE):
 
 if HAVE_LIBZ
 # This generates the tool_hugehelp.c file in both uncompressed and
-# compressed formats
-$(HUGE): $(README) $(MANPAGE)  mkhelp.pl
+# compressed formats. $(MANPAGE) must be the first dependency so it
+# can be referenced with $< which points to the correct location in
+# the VPATH.
+$(HUGE): $(MANPAGE) $(README) $(MKHELP)
        echo '#include "tool_setup.h"' > $(HUGE)
        echo '#ifndef HAVE_LIBZ' >> $(HUGE)
-       $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
+       $(NROFF) $< | $(PERL) $(MKHELP) $(README) >> $(HUGE)
        echo '#else' >> $(HUGE)
-       $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
+       $(NROFF) $< | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
        echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
 else # HAVE_LIBZ
 # This generates the tool_hugehelp.c file uncompressed only
-$(HUGE): $(README) $(MANPAGE)  mkhelp.pl
+$(HUGE): $(MANPAGE) $(README) mkhelp.pl
        echo '#include "tool_setup.h"' > $(HUGE)
-       $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
+       $(NROFF) $< | $(PERL) $(MKHELP) $(README) >> $(HUGE)
 endif
 
 else # USE_MANUAL