[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 18/254: Makefile: avoid use of GNU-specific form of
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 18/254: Makefile: avoid use of GNU-specific form of $< |
Date: |
Sat, 17 Jun 2017 16:50:50 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.
commit 80a87e8abc535aadf28bd154fdf5d44e61ef2080
Author: Dan Fandrich <address@hidden>
AuthorDate: Sun Apr 23 09:49:59 2017 +0200
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.
---
docs/Makefile.am | 18 +++++++++++++++---
src/Makefile.am | 15 +++++++--------
2 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 7da7c0dea..16836c650 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -22,7 +22,7 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
-man_MANS = curl.1 curl-config.1
+man_MANS = $(abs_builddir)/curl.1 curl-config.1
noinst_man_MANS = mk-ca-bundle.1
GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
@@ -30,7 +30,9 @@ MANDISTPAGES = curl.1.dist curl-config.1.dist
HTMLPAGES = $(GENHTMLPAGES) index.html
-SUBDIRS = libcurl cmdline-opts
+# Build targets in this file (.) before cmdline-opts to ensure that
+# the curl.1 rule below runs first
+SUBDIRS = libcurl . cmdline-opts
DIST_SUBDIRS = $(SUBDIRS) examples
CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) $(MANDISTPAGES) curl.1
@@ -47,7 +49,17 @@ MAN2HTML= roffit $< >$@
SUFFIXES = .1 .html .pdf
-curl.1:
+# $(abs_builddir) is to disable VPATH when searching for this file, which
+# would otherwise find the copy in $(srcdir) which breaks the $(HUGE)
+# rule in src/Makefile.am in out-of-tree builds that references the file in the
+# build directory.
+#
+# First, seed the used copy of curl.1 with the prebuilt copy (in an out-of-tree
+# build), then run make recursively to rebuild it only if its dependencies
+# have changed.
+$(abs_builddir)/curl.1:
+ if test "$(top_builddir)x" != "$(top_srcdir)x" -a -e
"$(srcdir)/curl.1"; then \
+ cp -fp "$(srcdir)/curl.1" $@; fi
cd cmdline-opts && $(MAKE)
html: $(HTMLPAGES)
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
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 15/254: RELEASE-NOTES: synced with c68fed875, (continued)
- [GNUnet-SVN] [gnurl] 15/254: RELEASE-NOTES: synced with c68fed875, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 16/254: curl-compilers.m4: accept -Og and -Ofast GCC flags, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 19/254: if2ip: fix -Wcast-align warning, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 53/254: http: use private user:password output buffer, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 07/254: typecheck-gcc: handle function pointers properly, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 23/254: typecheck-gcc: fix _curl_is_slist_info, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 24/254: nss: do not leak PKCS #11 slot while loading a key, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 09/254: gnutls: removed some code when --disable-verbose is configured, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 69/254: openssl: use local stack for temp storage, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 78/254: abstract-unix-socket.d: shorten the help text to fit within 79 cols, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 18/254: Makefile: avoid use of GNU-specific form of $<,
gnunet <=
- [GNUnet-SVN] [gnurl] 33/254: cookie_interface.c: changed the other domain to example.com too, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 26/254: nss: load libnssckbi.so if no other trust is specified, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 29/254: http-proxy: remove unused argument from Curl_proxyCONNECT(), gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 36/254: tool_operate: use utimes instead of obsolescent utime when available, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 32/254: cookie_interface.c: fix cookie domain so the example works, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 87/254: test557: set a known good numeric locale, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 89/254: tests/server: make string literals const, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 37/254: runtests.pl: support multiline <postcheck> commands, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 75/254: curl: non-boolean command line args reject --no- prefixes, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 52/254: anyauthput: remove unused code, gnunet, 2017/06/17