src/plugins/dir/*.o
src/plugins/dir/*.so
src/plugins/dir/main
-src/plugins/dir/Makefile
+src/plugins/dir/Makefile.inc
src/plugins/dir/.libs
# src/plugins/fd/
src/plugins/fd/*.o
src/plugins/fd/*.so
src/plugins/fd/main
-src/plugins/fd/Makefile
+src/plugins/fd/Makefile.inc
src/plugins/fd/.libs
# src/plugins/sd/
# --client-only directories
fd_subdirs = src scripts src/lib src/findlib src/filed \
- @READLINE_SRC@ @BAT_DIR@ src/console @FD_PLUGIN_DIR@
+ @READLINE_SRC@ @BAT_DIR@ src/console
# Non-client-only directores
-subdirs = src/cats @DIRD_DIR@ @STORED_DIR@ src/tools @DIR_PLUGIN_DIR@
+subdirs = src/cats @DIRD_DIR@ @STORED_DIR@ src/tools
all_subdirs = ${fd_subdirs} ${@ALL_DIRS@} manpages
+# plugins enabled
+pluginsdirs = @FD_PLUGIN_DIR@ @DIR_PLUGIN_DIR@
+
DIST = INSTALL README.configure configure Makefile Makefile.in ChangeLog
DIST_CFG = autoconf/aclocal.m4 autoconf/configure.in \
depend:
@for I in ${all_subdirs}; \
- do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
-
-bacula-fd: Makefile
+ do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
+ @for I in ${pluginsdirs}; \
+ do echo "==>Entering directory ${I}"
+ $(MAKE) DESTDIR=$(DESTDIR) -C ${I} $@ ; done
+
+bacula-fd: Makefile
@for I in ${fd_subdirs}; \
do (cd $$I; echo "==>Entering directory `pwd`"; \
$(MAKE) DESTDIR=$(DESTDIR) all || \
echo ""; echo ""; false ) || false) || exit 1; \
done
+plugins:
+ @for I in ${pluginsdirs}; \
+ do echo "==> Plugin directory" $$I; \
+ $(MAKE) DESTDIR=$(DESTDIR) -C $$I all ; done
+
#-------------------------------------------------------------------------
autoconf/aclocal.m4: autoconf/configure.in autoconf/bacula-macros/* autoconf/gettext-macros/* autoconf/libtool/*
uninstall-autostart-sd:
(cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+install-plugins:
+ @for I in ${pluginsdirs}; \
+ do echo "==> Plugin directory $$I"; \
+ $(MAKE) DESTDIR=$(DESTDIR) -C $$I install ; done
+
Makefile: Makefile.in
cd $(topdir) \
&& CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
(cd src/qt-console/tray-monitor; \
chmod 755 install_conf_file build-depkgs-qt-console)
-clean:
+clean: clean-plugins
@for I in ${all_subdirs} ; \
do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
@(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
@$(RMF) -r autom4te.cache
@find . -name ".#*" -exec $(RMF) {} \;
+clean-plugins:
+ @for I in ${pluginsdirs}; \
+ do echo "==> Plugin directory" $$I; \
+ $(MAKE) DESTDIR=$(DESTDIR) -C $$I clean ; done
# clean for distribution
distclean:
dnl Enable/Disable plugin support
dnl
-PLUGCONFILES=""
-
dnl Docker Plugin
support_docker=auto
AC_ARG_ENABLE(docker-plugin,
fi
if test x$support_ldap_bpam = xyes; then
DIR_PLUGIN_DIR="${DIR_PLUGIN_DIR} src/plugins/dir/ldap/src"
- PLUGCONFILES="${PLUGCONFILES} src/plugins/dir/ldap/src/Makefile"
fi
AC_SUBST(BPAM_LDAP_TARGET)
src/cats/install-default-backend \
src/findlib/Makefile \
src/tools/Makefile \
- src/plugins/fd/Makefile \
src/plugins/fd/Makefile.inc \
src/plugins/sd/Makefile \
- src/plugins/dir/Makefile \
+ src/plugins/dir/Makefile.inc \
po/Makefile.in \
updatedb/update_mysql_tables \
updatedb/update_sqlite3_tables \
platforms/rpms/suse/bacula-bat.spec \
platforms/rpms/suse/bacula-docs.spec \
platforms/rpms/suse/bacula-mtx.spec \
- $PLUGCONFILES \
$PFILES
])
AC_OUTPUT
# Copyright (C) 2000-2015 Kern Sibbald
# License: BSD 2-Clause; see file LICENSE-FOSS
#
-@MCOMMON@
-
-# No optimization for now for easy debugging
-
-DIRDIR=../../dird
-SRCDIR=../..
-LIBDIR=../../lib
-
-topdir = @BUILD_DIR@
-thisdir = src/plugins/dir
-
-.SUFFIXES: .c .o .lo
+include Makefile.inc
.c.lo:
$(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) $(CPPFLAGS) $(CFLAGS) -I${SRCDIR} -I${DIRDIR} -DTEST_PROGRAM -c $<
install: all
$(MKDIR) $(DESTDIR)$(plugindir)
-# $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) example-plugin-dir.la $(DESTDIR)$(plugindir)
-# $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) test-authentication-api-dir.la $(DESTDIR)$(plugindir)
-# $(RMF) $(DESTDIR)$(plugindir)/example-plugin-dir.la
-# $(RMF) $(DESTDIR)$(plugindir)/test-authentication-api-dir.la
-
-libtool-clean:
+$(LIBTOOL_CLEAN_TARGET):
find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
$(RMF) *.la
$(RMF) -r .libs _libs
-clean: @LIBTOOL_CLEAN_TARGET@
+clean: $(LIBTOOL_CLEAN_TARGET)
rm -f main *.so *.o 1 2 3
distclean: clean
rm -f Makefile
-libtool-uninstall:
+$(LIBTOOL_UNINSTALL_TARGET):
$(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(plugindir)/example-plugin-dir.la
-Makefile: Makefile.in $(topdir)/config.status
- cd $(topdir) \
- && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall: @LIBTOOL_UNINSTALL_TARGET@
+uninstall: $(LIBTOOL_UNINSTALL_TARGET)
depend:
--- /dev/null
+#
+# Makefile for building FD plugins PluginLibrary for Bacula
+#
+# Copyright (C) 2000-2020 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+# Author: Radoslaw Korzeniewski, radoslaw@korzeniewski.net
+#
+
+@MCOMMON@
+
+topdir = @BUILD_DIR@
+working_dir = @working_dir@
+LIBTOOL_CLEAN_TARGET = @LIBTOOL_CLEAN_TARGET@
+LIBTOOL_UNINSTALL_TARGET = @LIBTOOL_UNINSTALL_TARGET@
+
+LDAP_LIBS=@LDAP_LIBS@
+LDAP_LDFLAGS=@LDAP_LDFLAGS@
+LDAP_INC=@LDAP_INC@
+BPAM_LDAP_TARGET = @BPAM_LDAP_TARGET@
+BPAM_LDAP_TARGET_INSTALL = @BPAM_LDAP_TARGET_INSTALL@
+
+SRCDIR = $(topdir)/src
+DIRDIR = $(SRCDIR)/dird
+LIBDIR = $(SRCDIR)/lib
+DIRPLUGDIR = $(SRCDIR)/plugins/dir
+
+.SUFFIXES: .c .cpp .lo
# License: BSD 2-Clause; see file LICENSE-FOSS
#
#
-@MCOMMON@
-# No optimization for now for easy debugging
-
-DIRDIR=../../../../dird
-SRCDIR=../../../..
-LIBDIR=../../../../lib
-DIRPLUGDIR=../..
-
-topdir = @BUILD_DIR@
-working_dir=@working_dir@
-thisdir = src/plugins/dir/ldap/src
-
-LDAP_LIBS=@LDAP_LIBS@
-LDAP_LDFLAGS=@LDAP_LDFLAGS@
-LDAP_INC=@LDAP_INC@
-BPAM_LDAP_TARGET = @BPAM_LDAP_TARGET@
-BPAM_LDAP_TARGET_INSTALL = @BPAM_LDAP_TARGET_INSTALL@
+include ../../Makefile.inc
LDAPSRC = ldap-dir.c
LDAPTESTSRC = ldaptest.c
LDAPOBJ = $(LDAPSRC:.c=.lo)
LDAPTESTOBJ = $(LDAPTESTSRC:.c=.lo)
-.SUFFIXES: .c .lo
-
# ldap-dir.la ldaptest
all: $(BPAM_LDAP_TARGET)
install: $(BPAM_LDAP_TARGET_INSTALL)
install-ldap: ldap-dir.la
- @echo "Installing plugin ... $(^:.la=.so)"
+ @echo "Installing plugin $(^:.la=.so) ..."
$(MKDIR) $(DESTDIR)$(plugindir)
$(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) ldap-dir.la $(DESTDIR)$(plugindir)
$(NO_ECHO)$(RMF) $(DESTDIR)$(plugindir)/ldap-dir.la
install-ldaptest: ldaptest
- @echo "Installing ldaptest ..."
- $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) ldaptest $(DESTDIR)$(sbindir)
+ @echo "Installing $< ..."
+ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) $< $(DESTDIR)$(sbindir)
Makefile: Makefile.in $(topdir)/config.status
cd $(topdir) \
&& CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-libtool-clean:
+$(LIBTOOL_CLEAN_TARGET):
@find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
@$(RMF) *.la
@$(RMF) -r .libs _libs
-clean: libtool-clean
+clean: $(LIBTOOL_CLEAN_TARGET)
@rm -f main ldaptest *.so *.o
distclean: clean
@rm -f Makefile *.la *.lo
@rm -rf .libs
-libtool-uninstall:
+$(LIBTOOL_UNINSTALL_TARGET):
$(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(plugindir)/ldap-dir.so
$(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(plugindir)/msad-fd.so
-uninstall: @LIBTOOL_UNINSTALL_TARGET@
+uninstall: $(LIBTOOL_UNINSTALL_TARGET)
depend:
\ No newline at end of file
install-docker:
$(MAKE) -C docker install
-Makefile: Makefile.in $(topdir)/config.status
- cd $(topdir) \
- && CONFIG_FILES=$(FDPLUGDIR)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-libtool-clean:
+$(LIBTOOL_CLEAN_TARGET):
@find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)
@$(RMF) *.la
@$(RMF) -r .libs _libs
-clean: libtool-clean
+clean: $(LIBTOOL_CLEAN_TARGET)
@rm -f main *.so *.o 1 2 3
distclean: clean
@rm -f Makefile *.la *.lo
@rm -rf .libs
-libtool-uninstall:
+$(LIBTOOL_UNINSTALL_TARGET):
$(LIBTOOL_UNINSTALL) $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.so
uninstall: $(LIBTOOL_UNINSTALL_TARGET)
topdir = @BUILD_DIR@
working_dir = @working_dir@
+LIBTOOL_CLEAN_TARGET = @LIBTOOL_CLEAN_TARGET@
+LIBTOOL_UNINSTALL_TARGET = @LIBTOOL_UNINSTALL_TARGET@
+
SYBASE_TMPDIR = @sybase_tmpdir@
SYBASE_CONFIG = @sysconfdir@/sbt.conf
ORACLE_TMPDIR = @oracle_tmpdir@
RMAN_SCRIPT_DIR = @sysconfdir@
RSYNC_INC = @RSYNC_INC@
RSYNC_LIBS = @RSYNC_LIBS@
-LIBTOOL_UNINSTALL_TARGET = @LIBTOOL_UNINSTALL_TARGET@
SRCDIR = $(topdir)/src
FDDIR = $(SRCDIR)/filed
$(LIBBACOBJ):
$(MAKE) -C $(LIBDIR) libbac.la
-docker-fd.la: Makefile $(DOCKEROBJ) $(PLUGINLIBDIR)/pluginlib.lo $(DOCKERSRCH) $(LIBDIR)/libbac.la
+docker-fd.la: Makefile $(DOCKEROBJ) $(PLUGINLIBDIR)/pluginlib.lo $(DOCKERSRCH)
@echo "Linking $(@:.la=.so) ..."
$(NO_ECHO)$(LIBTOOL_LINK) --silent $(CXX) $(LDFLAGS) -shared $^ -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version
install: all
$(MKDIR) $(DESTDIR)$(plugindir)
- $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bpipe-fd.la $(DESTDIR)$(plugindir)
- $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.la
libtool-clean:
@find . -name '*.lo' -print | xargs $(LIBTOOL_CLEAN) $(RMF)