From 72841056f5342f357f3b59cb2ade23071516331f Mon Sep 17 00:00:00 2001 From: ZmnSCPxj Date: Wed, 3 Jan 2018 11:44:42 +0000 Subject: [PATCH] Makefile: Install subdaemons into pkglibexecdir instead of bindir. Fixes: #434 --- Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index dc0330f0b..ab632af17 100644 --- a/Makefile +++ b/Makefile @@ -337,23 +337,18 @@ POST_UNINSTALL = : installdirs: @$(NORMAL_INSTALL) $(MKDIR_P) $(DESTDIR)$(bindir) + $(MKDIR_P) $(DESTDIR)$(pkglibexecdir) $(MKDIR_P) $(DESTDIR)$(man1dir) $(MKDIR_P) $(DESTDIR)$(man7dir) $(MKDIR_P) $(DESTDIR)$(docdir) -# Programs to install in bindir. -# FIXME: Note that subdaemons should properly be put in libexecdir, -# but current lightningd expects them to be in the same -# directory as itself. -# This could be a problem later, if lightningd changes its -# search path for subdaemons; it might pick up older versions -# of the subdaemons, if a newer version is installed, without -# uninstalling the previous version. +# Programs to install in bindir and pkglibexecdir. # TODO: $(EXEEXT) support for Windows? Needs more coding for # the individual Makefiles, however. BIN_PROGRAMS = \ cli/lightning-cli \ - lightningd/lightningd \ + lightningd/lightningd +PKGLIBEXEC_PROGRAMS = \ lightningd/lightning_channeld \ lightningd/lightning_closingd \ lightningd/lightning_gossipd \ @@ -361,9 +356,10 @@ BIN_PROGRAMS = \ lightningd/lightning_onchaind \ lightningd/lightning_openingd -install-program: installdirs $(BIN_PROGRAMS) +install-program: installdirs $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) @$(NORMAL_INSTALL) $(INSTALL_PROGRAM) $(BIN_PROGRAMS) $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) $(PKGLIBEXEC_PROGRAMS) $(DESTDIR)$(pkglibexecdir) MAN1PAGES = $(filter %.1,$(MANPAGES)) MAN7PAGES = $(filter %.7,$(MANPAGES)) @@ -383,6 +379,10 @@ uninstall: echo rm -f $(DESTDIR)$(bindir)/`basename $$f`; \ rm -f $(DESTDIR)$(bindir)/`basename $$f`; \ done + @for f in $(PKGLIBEXEC_PROGRAMS); do \ + echo rm -f $(DESTDIR)$(pkglibexecdir)/`basename $$f`; \ + rm -f $(DESTDIR)$(pkglibexecdir)/`basename $$f`; \ + done @for f in $(MAN1PAGES); do \ echo rm -f $(DESTDIR)$(man1dir)/`basename $$f`; \ rm -f $(DESTDIR)$(man1dir)/`basename $$f`; \