aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorJulio Merino <jmmv@google.com>2016-02-08 11:37:02 -0500
committerJulio Merino <jmmv@meroh.net>2016-02-08 20:50:22 -0500
commit19ab22abec86e2167b8169bc7123fd5d1bd496f9 (patch)
tree52a8cb97921a0445bfa7300a020642eb82c5415f /Makefile.am
parent3bf3be3bcd0855f1fb90e9df23eeaf597e98f34a (diff)
downloadsshfs-19ab22abec86e2167b8169bc7123fd5d1bd496f9.tar
sshfs-19ab22abec86e2167b8169bc7123fd5d1bd496f9.tar.gz
sshfs-19ab22abec86e2167b8169bc7123fd5d1bd496f9.tar.bz2
sshfs-19ab22abec86e2167b8169bc7123fd5d1bd496f9.zip
Improve sshfs.1 manpage generation
* Fix dependencies of the sshfs.1 target to actually specify sshfs.1.in as a source. * Ensure that failures during the generation of sshfs.1 do not result in a potentially bogus manpage by first outputting the contents to a temporary file unknown to the Makefile rule and then replacing the target file once all is known to be OK. * Use $(AM_V_GEN) in the command to respect automake's silent rules.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index c5b92f0..ed3090e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,13 +14,15 @@ sshfs_LDADD = $(SSHFS_LIBS)
sshfs_CFLAGS = $(SSHFS_CFLAGS)
sshfs_CPPFLAGS = -D_REENTRANT -DFUSE_USE_VERSION=26 -DLIBDIR=\"$(libdir)\"
-EXTRA_DIST = sshnodelay.c
-CLEANFILES = sshnodelay.so sshfs.1
+EXTRA_DIST = sshnodelay.c sshfs.1.in
+CLEANFILES = sshnodelay.so sshfs.1 sshfs.1.tmp
dist_man_MANS = sshfs.1
-sshfs.1:
- $(CPP) $(CPPFLAGS) -P -xassembler-with-cpp sshfs.1.in | sed -e '/^$$/d' > sshfs.1
+sshfs.1: sshfs.1.in
+ $(AM_V_GEN)$(CPP) $(CPPFLAGS) -P -xassembler-with-cpp sshfs.1.in \
+ | sed -e '/^$$/d' >sshfs.1.tmp || exit 1; \
+ mv sshfs.1.tmp sshfs.1
if SSH_NODELAY_SO
all-local: sshnodelay.so