]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/Makefile.in
Add scriptsdir
[bacula/bacula] / bacula / src / dird / Makefile.in
index f1fbcf3597356f18a62f7e5654b009d011b6b0c4..976592130dc4f0706a17605d4097f83e86a52a2e 100644 (file)
@@ -60,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 -lbac -lm $(LIBS) $(DLIB) $(DB_LIBS)
+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) \
@@ -74,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
@@ -91,15 +98,18 @@ install: all
        else \
           destconf=$$srcconf; \
        fi; \
-       echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
-       ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
-       ${INSTALL_DATA} query.sql ${DESTDIR}${sysconfdir}/query.sql
+       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) query.sql)
+       (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf bacula-dir.conf.new)
+       (cd $(DESTDIR)$(scriptdir); $(RMF) query.sql)