diff --git a/modules/Makefile.in b/modules/Makefile.in index 0a67c9fb..0fd13dc0 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -27,13 +27,20 @@ all: $(OBJS) $(TARGETS) depend:: $(CXX) -MM $(CXXFLAGS) $(SRCS) $(INCLUDES) $(PERLCC) >.depend -install: all create_install_dir $(INSTALL_TARGS) +install: all create_install_dir install_metadirs $(INSTALL_TARGS) @echo -n "" create_install_dir: mkdir -p $(DESTDIR)$(prefix)/share/znc rm -rf $(DESTDIR)$(prefix)/share/znc/*.so +install_metadirs: + for a in *; do \ + if [ -d $$a ] && [ -f $${a}.so ]; then \ + cp -Ra $$a $(DESTDIR)$(prefix)/share/znc; \ + fi \ + done + install_%: install -m 0755 $(subst install_,,$@) $(DESTDIR)$(prefix)/share/znc