summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2017-04-23 09:49:59 +0200
committerDan Fandrich <dan@coneharvesters.com>2017-04-24 21:38:11 +0200
commit80a87e8abc535aadf28bd154fdf5d44e61ef2080 (patch)
tree490a127575a4c730e4e1db8f1898bfcd8bc5bb67 /src/Makefile.am
parentc8ac0b6a7f9d308fcfe404d445a013b9a2c58845 (diff)
downloadcurl-80a87e8abc535aadf28bd154fdf5d44e61ef2080.tar.gz
Makefile: avoid use of GNU-specific form of $<
$< is only allowed in implicit rules in some non-GNU makes (e.g. BSD, AIX) so avoid use elsewhere by referencing the dependent curl.1 file directly instead. This is somewhat tricky because the file is supplied in the packaged tar ball (but not in git) but must still be able to be rebuilt when its dependencies change. The right thing must happen in both tar ball and git source trees, as well as in both in-tree and out-of-tree builds.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index b59fb8786..afc86f2e1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -92,7 +92,8 @@ EXTRA_DIST = mkhelp.pl makefile.dj Makefile.b32 \
macos/src/curl_GUSIConfig.cpp macos/src/macos_main.cpp makefile.amiga \
curl.rc Makefile.netware Makefile.inc Makefile.Watcom CMakeLists.txt
-MANPAGE=$(top_builddir)/docs/curl.1
+# Use absolute directory to disable VPATH
+MANPAGE=$(abs_top_builddir)/docs/curl.1
README=$(top_srcdir)/docs/MANUAL
MKHELP=$(top_srcdir)/src/mkhelp.pl
HUGE=tool_hugehelp.c
@@ -101,25 +102,23 @@ if USE_MANUAL
# Here are the stuff to create a built-in manual
$(MANPAGE):
- cd $(top_builddir)/docs && $(MAKE) curl.1
+ cd $(top_builddir)/docs && $(MAKE)
if HAVE_LIBZ
# This generates the tool_hugehelp.c file in both uncompressed and
-# compressed formats. $(MANPAGE) must be the first dependency so it
-# can be referenced with $< which points to the correct location in
-# the VPATH.
+# compressed formats.
$(HUGE): $(MANPAGE) $(README) $(MKHELP)
echo '#include "tool_setup.h"' > $(HUGE)
echo '#ifndef HAVE_LIBZ' >> $(HUGE)
- $(NROFF) $< | $(PERL) $(MKHELP) $(README) >> $(HUGE)
+ $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
echo '#else' >> $(HUGE)
- $(NROFF) $< | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
+ $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) -c $(README) >> $(HUGE)
echo '#endif /* HAVE_LIBZ */' >> $(HUGE)
else # HAVE_LIBZ
# This generates the tool_hugehelp.c file uncompressed only
$(HUGE): $(MANPAGE) $(README) mkhelp.pl
echo '#include "tool_setup.h"' > $(HUGE)
- $(NROFF) $< | $(PERL) $(MKHELP) $(README) >> $(HUGE)
+ $(NROFF) $(MANPAGE) | $(PERL) $(MKHELP) $(README) >> $(HUGE)
endif
else # USE_MANUAL