Imported Upstream version 3.2.0
[debian/amanda] / common-src / Makefile.am
index 91a42a1159cf478454660984dc59f8fba5ae13a2..d57d351eb20317136cc357b046efdbab0b9c477c 100644 (file)
@@ -19,6 +19,8 @@ libamanda_la_SOURCES =                \
        alloc.c                 \
        amfeatures.c            \
        amflock.c               \
+       ipc-binary.c            \
+       amxml.c                 \
        clock.c                 \
        columnar.c              \
        conffile.c              \
@@ -32,16 +34,16 @@ libamanda_la_SOURCES =              \
        packet.c                \
        pipespawn.c             \
        protocol.c              \
+       semaphore.c             \
        security.c              \
        security-util.c         \
+       simpleprng.c            \
        sl.c                    \
        sockaddr-util.c         \
        stream.c                \
        tapelist.c              \
        timestamp.c             \
-       token.c                 \
-       util.c                  \
-       versuff.c
+       util.c
 # version.c is generated; see below
 nodist_libamanda_la_SOURCES = version.c
 
@@ -80,9 +82,6 @@ endif
 if WANT_BSDUDP_SECURITY
 libamanda_la_SOURCES += bsdudp-security.c
 endif
-if WANT_KRB4_SECURITY
-libamanda_la_SOURCES += krb4-security.c        
-endif
 if WANT_KRB5_SECURITY
 libamanda_la_SOURCES += krb5-security.c
 endif
@@ -94,9 +93,12 @@ libamanda_la_LDFLAGS =  -release $(VERSION)
 noinst_HEADERS =               \
        amanda.h                \
        amfeatures.h            \
+       ipc-binary.h            \
+       amxml.h                 \
        arglist.h               \
        clock.h                 \
        columnar.h              \
+       directtcp.h             \
        amflock.h               \
        conffile.h              \
        debug.h                 \
@@ -105,18 +107,19 @@ noinst_HEADERS =          \
        file.h                  \
        fileheader.h            \
        glib-util.h             \
+       match.h                 \
        packet.h                \
        pipespawn.h             \
        protocol.h              \
-       queue.h                 \
+       semaphore.h             \
        security.h              \
        security-util.h         \
+       simpleprng.h            \
        sl.h                    \
        sockaddr-util.h         \
        stream.h                \
        tapelist.h              \
        timestamp.h             \
-       token.h                 \
        util.h                  \
        version.h
 
@@ -131,9 +134,8 @@ EXTRA_PROGRAMS = genversion $(TEST_PROGS)
 # 4. Makefile runs genversion to create version.c
 # 5. version.c is compiled into libamanda normally
 
-genversion_SOURCES = genversion.c genversion.h svn-info.h
+genversion_SOURCES = genversion.c svn-info.h
 genversion_LDADD = $(libamanda_la_LIBADD)      \
-       versuff.lo                              \
        ../gnulib/libgnu.la
 
 genversion.h: $(top_builddir)/config.status
@@ -150,7 +152,7 @@ version.c: genversion$(EXEEXT)
 BUILT_SOURCES += genversion.h version.c
 
 # these are used for testing only:
-TEST_PROGS = token file bsdsecurity amfeatures
+TEST_PROGS = file bsdsecurity
 
 CLEANFILES += *.test.c
 DISTCLEANFILES += version.c genversion genversion.h
@@ -160,18 +162,19 @@ DISTCLEANFILES += version.c genversion genversion.h
 STANDARD_COMMON_STUFF_NOT_FILE = \
        alloc.lo \
        clock.lo \
+       conffile.lo \
        debug.lo \
+       glib-util.lo \
        util.lo \
        match.lo \
-       sl.lo
+       sl.lo \
+       sockaddr-util.lo \
+       timestamp.lo
 
 STANDARD_COMMON_STUFF = \
        $(STANDARD_COMMON_STUFF_NOT_FILE) \
        file.lo
 
-token_SOURCES = token.test.c
-token_LDADD = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF)
-
 file_SOURCES = file.test.c
 file_LDADD = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF_NOT_FILE)
 
@@ -185,26 +188,58 @@ bsdsecurity_LDADD = $(libamanda_a_LIBADD) \
                    file.lo \
                    packet.lo \
                    security.lo \
-                   ssh-security.lo \
-                   versuff.lo
+                   ssh-security.lo
 
-amfeatures_SOURCES = amfeatures.test.c
-amfeatures_LDADD = $(libamanda_la_LIBADD) $(STANDARD_COMMON_STUFF)
+# libtestutils.la
+#
+# Convenience library (never installed) for 'make check'-based tests.
+
+noinst_LTLIBRARIES = libtestutils.la
+libtestutils_la_SOURCES = \
+       testutils.c \
+       testutils.h
 
 # automake-style tests
 
-TESTS = amflock-test
+# automake-style tests
+
+TESTS = amflock-test event-test semaphore-test quoting-test \
+       ipc-binary-test hexencode-test fileheader-test match-test
 noinst_PROGRAMS = $(TESTS)
 
 amflock_test_SOURCES = amflock-test.c
-amflock_test_LDADD = libamanda.la
+amflock_test_LDADD = libamanda.la libtestutils.la
+
+event_test_SOURCES = event-test.c
+event_test_LDADD = libamanda.la libtestutils.la
+
+semaphore_test_SOURCES = semaphore-test.c
+semaphore_test_LDADD = libamanda.la libtestutils.la
+
+quoting_test_SOURCES = quoting-test.c
+quoting_test_LDADD = libamanda.la libtestutils.la
+
+ipc_binary_test_SOURCES = ipc-binary-test.c
+ipc_binary_test_LDADD = libamanda.la libtestutils.la
+
+hexencode_test_SOURCES = hexencode-test.c
+hexencode_test_LDADD = libamanda.la libtestutils.la
+
+fileheader_test_SOURCES = fileheader-test.c
+fileheader_test_LDADD = libamanda.la libtestutils.la
+
+match_test_SOURCES = match-test.c
+match_test_LDADD = libamanda.la libtestutils.la
 
 # scripts
 
-# divide scripts up both by language and by destination directory.
+# divide scripts up both by language and destination directory
 sbin_SCRIPTS_PERL = \
            amgpgcrypt \
-           amcryptsimple
+           amcryptsimple \
+           amgetconf
+
+amlibexec_SCRIPTS_PERL =
 
 sbin_SCRIPTS_SHELL = \
            amcrypt \
@@ -212,25 +247,22 @@ sbin_SCRIPTS_SHELL = \
            amcrypt-ossl \
            amcrypt-ossl-asym
 
-amlibexec_SCRIPTS_PERL = 
+amlibexec_SCRIPTS_SHELL = 
 
 SCRIPTS_INCLUDE = \
            amanda-sh-lib.sh
 
 EXTRA_DIST += amanda-sh-lib.sh.in
 
-CHECK_PERL = $(sbin_SCRIPTS_PERL) $(amlibexec_SCRIPTS_PERL)
-SCRIPTS_PERL = $(CHECK_PERL)
+SCRIPTS_PERL = $(sbin_SCRIPTS_PERL) $(amlibexec_SCRIPTS_PERL)
 SCRIPTS_SHELL = $(sbin_SCRIPTS_SHELL) $(amlibexec_SCRIPTS_SHELL)
+
 amlibexec_DATA = $(SCRIPTS_INCLUDE)
 amlibexec_SCRIPTS = $(amlibexec_SCRIPTS_PERL) $(amlibexec_SCRIPTS_SHELL)
 sbin_SCRIPTS = $(sbin_SCRIPTS_PERL) $(sbin_SCRIPTS_SHELL)
 
 # installation
 
-INSTALLPERMS_data = dest=$(sbindir) chown=amanda $(sbin_SCRIPTS) \
-                   dest=$(amlibexecdir) chown=amanda $(amlibexec_SCRIPTS) $(amlibexec_DATA)
-
 lint:
        @echo $(LINT) $(libamanda_la_SOURCES)
        @$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $(libamanda_la_SOURCES)
@@ -246,3 +278,7 @@ listlibsrc:
 %.test.c: $(srcdir)/%.c
        echo '#define TEST' >$@
        echo '#include "$<"' >>$@
+
+distclean-local:
+       if test `cd $(srcdir) && pwd` != `pwd`; then rm -f svn-info.h; fi
+MAINTAINERCLEANFILES+=svn-info.h