]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/Makefile.in
Add scriptsdir
[bacula/bacula] / bacula / src / dird / Makefile.in
index 699d0a8e066034b8e702b4e947e93af494cb01fe..976592130dc4f0706a17605d4097f83e86a52a2e 100644 (file)
@@ -1,5 +1,7 @@
 #
 #  Bacula Director Makefile
+#
+#  Version $Id$
 #  
 @MCOMMON@
 
@@ -20,22 +22,30 @@ first_rule: all
 dummy:
 
 #
-SVRSRCS = dird.c authenticate.c backup.c catreq.c dird_conf.c \
+SVRSRCS = dird.c authenticate.c autoprune.c \
+         backup.c \
+         catreq.c dird_conf.c \
          fd_cmds.c getmsg.c job.c \
-         mountreq.c msgchan.c newvol.c run_conf.c restore.c \
-         scheduler.c ua_cmds.c \
-         ua_dotcmds.c \
+         mountreq.c msgchan.c newvol.c \
+         recycle.c restore.c run_conf.c \
+         scheduler.c sql_cmds.c \
+         ua_cmds.c ua_dotcmds.c \
          ua_db_query.c ua_retention.c \
-         ua_input.c ua_output.c ua_run.c \
+         ua_input.c ua_output.c ua_prune.c \
+         ua_purge.c ua_restore.c ua_run.c \
          ua_select.c ua_server.c \
          ua_status.c verify.c
-SVROBJS = dird.o authenticate.o backup.o catreq.o dird_conf.o \
+SVROBJS = dird.o authenticate.o autoprune.o \
+         backup.o \
+         catreq.o dird_conf.o \
          fd_cmds.o getmsg.o job.o \
-         mountreq.o msgchan.o newvol.o run_conf.o restore.o \
-         scheduler.o ua_cmds.o \
-         ua_dotcmds.o \
+         mountreq.o msgchan.o newvol.o \
+         recycle.o restore.o run_conf.o \
+         scheduler.o sql_cmds.o \
+         ua_cmds.o ua_dotcmds.o \
          ua_db_query.o ua_retention.o \
-         ua_input.o ua_output.o ua_run.o \
+         ua_input.o ua_output.o ua_prune.o \
+         ua_purge.o ua_restore.o ua_run.o \
          ua_select.o ua_server.o \
          ua_status.o verify.o
 
@@ -50,13 +60,19 @@ EXTRAOBJS = @OBJLIST@
 .c.o:
        $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
 #-------------------------------------------------------------------------
-all: Makefile bacula-dir
+all: Makefile bacula-dir @STATIC_DIR@
        @echo "==== Make of dird is good ===="
        @echo " "
 
-bacula-dir:  $(SVROBJS) ../lib/libbac.a ../cats/libsql.a
-       $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(SVROBJS) \
-             -lsql $(LIBS) $(DLIB) -lbac -lm
+bacula-dir:  $(SVROBJS) ../lib/libbac.a ../cats/libsql.a ../findlib/libfind.a
+       $(CXX) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
+             -lsql -lbac -lfind -lm $(LIBS) $(DLIB) $(DB_LIBS)
+
+static-bacula-dir:  $(SVROBJS) ../lib/libbac.a ../cats/libsql.a ../findlib/libfind.a
+       $(CXX) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
+             -lsql -lbac -lfind -lm $(LIBS) $(DLIB) $(DB_LIBS)
+       strip $@
+
 
 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
        cd $(topdir) \
@@ -64,13 +80,14 @@ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
 
 clean:
        @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
+       @$(RMF) static-bacula-dir
 
 realclean: clean
        @$(RMF) tags bacula-dir.conf
 
 distclean: realclean
        if test $(srcdir) = .; then $(MAKE) realclean; fi
-       (cd $(srcdir); $(RMF) Makefile)
+       (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
 
 install: all
        $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
@@ -81,22 +98,18 @@ install: all
        else \
           destconf=$$srcconf; \
        fi; \
-       echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
-       ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
-       @srcconf=query.sql; \
-       if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
-          destconf=$$srcconf.new; \
-          echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
-       else \
-          destconf=$$srcconf; \
-       fi; \
-       echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
-       ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
+       echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
+       ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
+       if  test -f ${DESTDIR}${scriptdir}/query.sql; then \
+          $(MV) -f ${DESTDIR}${scriptdir}/query.sql ${DESTDIR}${scriptdir}/query.sql.save; \
+       fi 
+       ${INSTALL_DATA} query.sql ${DESTDIR}${scriptdir}/query.sql
 
 
 uninstall:
        (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir)
-       (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf)
+       (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf bacula-dir.conf.new)
+       (cd $(DESTDIR)$(scriptdir); $(RMF) query.sql)