From 9b4ca1aadefbb75ab4051e0b0e9173709456f7fb Mon Sep 17 00:00:00 2001 From: Julio Merino Date: Mon, 8 Feb 2016 21:10:48 -0500 Subject: Avoid using cpp for sshfs.1 generation Move the logic to determine which values to stick into the manual page to the configure script and replace the logic to build the sshfs.1 manual page with sed instead of abusing cpp. I'm not using AC_OUTPUT here because this macro is typically used to generate support build files. Final artifacts of the build should, in general, be built by the Makefile itself. --- Makefile.am | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index ed3090e..f003bae 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,8 @@ endif sshfs_LDADD = $(SSHFS_LIBS) sshfs_CFLAGS = $(SSHFS_CFLAGS) -sshfs_CPPFLAGS = -D_REENTRANT -DFUSE_USE_VERSION=26 -DLIBDIR=\"$(libdir)\" +sshfs_CPPFLAGS = -D_REENTRANT -DFUSE_USE_VERSION=26 -DLIBDIR=\"$(libdir)\" \ + -DIDMAP_DEFAULT="\"$(IDMAP_DEFAULT)\"" EXTRA_DIST = sshnodelay.c sshfs.1.in CLEANFILES = sshnodelay.so sshfs.1 sshfs.1.tmp @@ -20,8 +21,10 @@ CLEANFILES = sshnodelay.so sshfs.1 sshfs.1.tmp dist_man_MANS = 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; \ + $(AM_V_GEN)sed \ + -e 's,__IDMAP_DEFAULT__,$(IDMAP_DEFAULT),g' \ + -e 's,__UNMOUNT_COMMAND__,$(UNMOUNT_COMMAND),g' \ + sshfs.1.tmp || exit 1; \ mv sshfs.1.tmp sshfs.1 if SSH_NODELAY_SO -- cgit v1.2.3