Imported Debian patch 2.5.2p1-1
[debian/amanda] / server-src / Makefile.am
index 84c9b06c3a77d4fe50c8a2bb21e1294eded8b5cd..c883daf4ee0d8b5d061037e304026f8b4358d66c 100644 (file)
@@ -1,13 +1,14 @@
 # Makefile for Amanda server programs.
 
-###
-# Yes, I really mean ../common-src.  The genversion.h file ends up getting
-# built there rather than into the source tree.
-###
+INCLUDES =     -I$(top_builddir)/common-src \
+               -I$(top_srcdir)/common-src   \
+               -I$(top_srcdir)/restore-src  \
+               -I$(top_srcdir)/tape-src     \
+               -I$(top_srcdir)/amandad-src  \
+               -I$(top_srcdir)/gnulib
 
-INCLUDES =             -I$(top_srcdir)/common-src \
-                       -I../common-src \
-                       -I$(top_srcdir)/tape-src
+LINT=@AMLINT@
+LINTFLAGS=@AMLINTFLAGS@
 
 lib_LTLIBRARIES =      libamserver.la
 LIB_EXTENSION = la
@@ -18,16 +19,20 @@ sbin_PROGRAMS =             amadmin         amcheck         amflush         \
 
 libexec_PROGRAMS =     amindexd        amlogroll       amtrmidx        \
                        amtrmlog        driver          dumper          \
-                       planner         taper           amcleanupdisk
+                       planner         taper           amcleanupdisk   \
+                       chunker
 
 sbin_SCRIPTS =         amcheckdb       amcleanup       amdump          \
                        amoverview      amrmtape        amtoc           \
-                       amverify        amverifyrun     amstatus
+                       amverify        amverifyrun     amstatus        \
+                       amcrypt         amaespipe       amcrypt-ossl    \
+                       amcrypt-ossl-asym
 
 libamserver_la_SOURCES=        amindex.c       changer.c                       \
-                       conffile.c      diskfile.c      driverio.c      \
+                       diskfile.c      driverio.c      cmdline.c  \
                        holding.c       infofile.c      logfile.c       \
-                       tapefile.c      find.c          server_util.c
+                       tapefile.c      find.c          server_util.c   \
+                        taperscan.c
 
 libamserver_la_LDFLAGS= -release $(VERSION)
 
@@ -38,43 +43,54 @@ libamserver_la_LDFLAGS= -release $(VERSION)
 # routines, and second to pick up any references in the other libraries.
 ###
 
-LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
+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)   \
+       ../gnulib/libgnu.$(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) \
-       ../common-src/libamanda.$(LIB_EXTENSION)
+       ../common-src/libamanda.$(LIB_EXTENSION) \
+       ../gnulib/libgnu.$(LIB_EXTENSION)
 
 SUFFIXES =             .sh .pl
 
 .pl:
                        cat $< > $@
                        chmod a+x $@
-                       -test -z "$(PERL)" || $(PERL) -c $@
+                       -test -z "$(PERL)" || $(PERL) -c -w -W -t -T $@
 
 .sh:
                        cat $< > $@
                        chmod a+x $@
 
 # there are used for testing only:
-TEST_PROGS = diskfile conffile infofile
+TEST_PROGS = diskfile infofile
 
-EXTRA_PROGRAMS = $(TEST_PROGS)
+EXTRA_PROGRAMS =       $(TEST_PROGS)
 
-EXTRA_DIST = dumper-krb4.c
+CLEANFILES = *.test.c $(sbin_SCRIPTS)
 
-CLEANFILES = *.test.c
-
-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
 
 amgetconf_SOURCES =    getconf.c
 
 noinst_HEADERS =       amindex.h       changer.h                       \
-                       conffile.h      diskfile.h      driverio.h      \
+                       diskfile.h      driverio.h      \
                        holding.h       infofile.h      logfile.h       \
-                       tapefile.h      find.h          server_util.h
+                       tapefile.h      find.h          server_util.h   \
+                       taperscan.h cmdline.h
 
 install-exec-hook:
        @list="$(sbin_PROGRAMS) $(sbin_SCRIPTS)"; \
@@ -104,6 +120,10 @@ install-exec-hook:
                else true; \
                fi; \
        done
+##                                                    ##
+## 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,8 +136,39 @@ install-exec-hook:
                fi; \
        done
 
+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
 infofile_SOURCES = infofile.test.c
 
 %.test.c: $(srcdir)/%.c