Imported Upstream version 2.5.1
[debian/amanda] / server-src / Makefile.am
index e3c46c4c21700c1e6450a1813c576721f40a9dfb..01f864101bc714aeb50041ea2853aa5e45f9ccc6 100644 (file)
@@ -3,7 +3,11 @@
 INCLUDES =     -I$(top_builddir)/common-src \
                -I$(top_srcdir)/common-src   \
                -I$(top_srcdir)/restore-src  \
-               -I$(top_srcdir)/tape-src
+               -I$(top_srcdir)/tape-src     \
+               -I$(top_srcdir)/amandad-src
+
+LINT=@AMLINT@
+LINTFLAGS=@AMLINTFLAGS@
 
 lib_LTLIBRARIES =      libamserver.la
 LIB_EXTENSION = la
@@ -20,7 +24,8 @@ libexec_PROGRAMS =    amindexd        amlogroll       amtrmidx        \
 sbin_SCRIPTS =         amcheckdb       amcleanup       amdump          \
                        amoverview      amrmtape        amtoc           \
                        amverify        amverifyrun     amstatus        \
-                       amcrypt         amaespipe
+                       amcrypt         amaespipe       amcrypt-ossl    \
+                       amcrypt-ossl-asym
 
 libamserver_la_SOURCES=        amindex.c       changer.c                       \
                        conffile.c      diskfile.c      driverio.c      \
@@ -38,7 +43,16 @@ libamserver_la_LDFLAGS= -release $(VERSION)
 ###
 
 LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
+       libamserver.$(LIB_EXTENSION)             \
+       ../tape-src/libamtape.$(LIB_EXTENSION)   \
+       ../common-src/libamanda.$(LIB_EXTENSION) \
+       ../tape-src/libamtape.$(LIB_EXTENSION)   \
+       ../common-src/libamanda.$(LIB_EXTENSION) \
+        $(READLINE_LIBS)
+
+amindexd_LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
        libamserver.$(LIB_EXTENSION) \
+       ../amandad-src/libamandad.$(LIB_EXTENSION) \
        ../tape-src/libamtape.$(LIB_EXTENSION) \
        ../common-src/libamanda.$(LIB_EXTENSION) \
        ../tape-src/libamtape.$(LIB_EXTENSION) \
@@ -62,9 +76,8 @@ EXTRA_PROGRAMS =      $(TEST_PROGS)
 
 CLEANFILES = *.test.c $(sbin_SCRIPTS)
 
-amindexd_SOURCES =     amindexd.c                                      \
-                       disk_history.c                  disk_history.h  \
-                       list_dir.c                      list_dir.h
+amindexd_CSRC =                amindexd.c      disk_history.c  list_dir.c
+amindexd_SOURCES =     disk_history.h  list_dir.h      $(amindexd_CSRC)
 
 amreport_SOURCES =     reporter.c
 
@@ -104,7 +117,10 @@ install-exec-hook:
                else true; \
                fi; \
        done
-if !WANT_SSH_SECURITY
+##                                                    ##
+## enterprise version will install dumper/planner suid ##
+##                                                    ##
+
        @list="dumper planner"; \
        for p in $$list; do \
                if echo "$(libexec_PROGRAMS)" | grep $$p >/dev/null 2>&1; then \
@@ -116,7 +132,38 @@ if !WANT_SSH_SECURITY
                else true; \
                fi; \
        done
-endif
+
+lint:
+       @ for p in $(libexec_PROGRAMS) $(sbin_PROGRAMS); do                     \
+               if [ $$p = "amindexd" ]; then                                   \
+                       s="$(amindexd_CSRC)";                                   \
+               elif [ $$p = "amreport" ]; then                                 \
+                       s="$(amreport_SOURCES)";                                \
+               elif [ $$p = "amgetconf" ]; then                                \
+                       s="$(getconf_SOURCES)";                                 \
+               else                                                            \
+                       s=$$p.c;                                                \
+               fi;                                                             \
+               f="$$s $(libamserver_la_SOURCES)";                              \
+               (cd ../common-src; make listlibsrc);                            \
+               f="$$f "`cat ../common-src/listlibsrc.output`;                  \
+               (cd ../tape-src; make listlibsrc);                              \
+               f="$$f "`cat ../tape-src/listlibsrc.output`;                    \
+               echo $(LINT) $$f;                                               \
+               $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config        \
+                   $(INCLUDES) $$f;                                            \
+               if [ $$? -ne 0 ]; then                                          \
+                   exit 1;                                                     \
+               fi;                                                             \
+       done;                                                                   \
+        exit 0
+
+listlibsrc:
+       @ for p in $(libamserver_la_SOURCES); do                \
+               listlibsrcs="$$listlibsrcs `pwd`/$$p";          \
+       done;                                                   \
+       echo $$listlibsrcs >listlibsrc.output
+
 
 diskfile_SOURCES = diskfile.test.c
 conffile_SOURCES = conffile.test.c