X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=restore-src%2FMakefile.am;h=fa14e255f8c95bd6e662449e034079ae600b8c6c;hb=94a044f90357edefa6f4ae9f0b1d5885b0e34aee;hp=ac4ee903decb687a7ee16a60874c2011a8c3c2ad;hpb=1194fb66aa28d9929c3f2bef3cc6c1c3f40a60a4;p=debian%2Famanda diff --git a/restore-src/Makefile.am b/restore-src/Makefile.am index ac4ee90..fa14e25 100644 --- a/restore-src/Makefile.am +++ b/restore-src/Makefile.am @@ -1,16 +1,27 @@ # Makefile for Amanda restore programs. +include $(top_srcdir)/config/automake/installperms.am +include $(top_srcdir)/config/automake/precompile.am + INCLUDES = -I$(top_builddir)/common-src \ -I$(top_srcdir)/common-src \ - -I$(top_srcdir)/tape-src \ - -I$(top_srcdir)/server-src + -I$(top_srcdir)/device-src \ + -I$(top_srcdir)/server-src \ + -I$(top_srcdir)/amandad-src \ + -I$(top_srcdir)/gnulib + +AM_CFLAGS = $(AMANDA_WARNING_CFLAGS) +AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS) + +LINT=@AMLINT@ +LINTFLAGS=@AMLINTFLAGS@ -lib_LTLIBRARIES = librestore.la +amlib_LTLIBRARIES = librestore.la LIB_EXTENSION = la sbin_PROGRAMS = amrestore amfetchdump -libexec_PROGRAMS = amidxtaped +amlibexec_PROGRAMS = amidxtaped ### # Because libamanda includes routines (e.g. regex) provided by some system @@ -19,8 +30,14 @@ libexec_PROGRAMS = amidxtaped # routines, and second to pick up any references in the other libraries. ### -LDADD = librestore.$(LIB_EXTENSION) \ - ../common-src/libamanda.$(LIB_EXTENSION) +LDADD = librestore.$(LIB_EXTENSION) \ + ../common-src/libamanda.$(LIB_EXTENSION) \ + ../gnulib/libgnu.$(LIB_EXTENSION) \ + $(READLINE_LIBS) + +amidxtaped_LDADD = $(LDADD) \ + ../gnulib/libgnu.$(LIB_EXTENSION) \ + ../amandad-src/libamandad.$(LIB_EXTENSION) amidxtaped_SOURCES = amidxtaped.c @@ -29,25 +46,30 @@ amfetchdump_SOURCES = amfetchdump.c librestore_la_SOURCES = restore.c librestore_la_LDFLAGS = -release $(VERSION) librestore_la_LIBADD = ../common-src/libamanda.$(LIB_EXTENSION) \ - ../tape-src/libamtape.$(LIB_EXTENSION) \ - ../server-src/libamserver.$(LIB_EXTENSION) + ../server-src/libamserver.$(LIB_EXTENSION) \ + ../device-src/libamdevice.$(LIB_EXTENSION) noinst_HEADERS = restore.h -install-exec-hook: - @list="$(sbin_PROGRAMS)"; \ - for p in $$list; do \ - pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \ - echo chown $(BINARY_OWNER) $$pa; \ - chown $(BINARY_OWNER) $$pa; \ - echo chgrp $(SETUID_GROUP) $$pa; \ - chgrp $(SETUID_GROUP) $$pa; \ - done - @list="$(libexec_PROGRAMS)"; \ - for p in $$list; do \ - pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \ - echo chown $(BINARY_OWNER) $$pa; \ - chown $(BINARY_OWNER) $$pa; \ - echo chgrp $(SETUID_GROUP) $$pa; \ - chgrp $(SETUID_GROUP) $$pa; \ - done +INSTALLPERMS_exec = \ + dest=$(sbindir) chown=amanda $(sbin_PROGRAMS) \ + dest=$(amlibexecdir) chown=amanda $(amlibexec_PROGRAMS) + +lint: + @ for p in $(amlibexec_PROGRAMS) $(sbin_PROGRAMS); do \ + f="$$p.c $(librestore_la_SOURCES)"; \ + (cd ../common-src; make listlibsrc); \ + f="$$f "`cat ../common-src/listlibsrc.output`; \ + (cd ../server-src; make listlibsrc); \ + f="$$f "`cat ../server-src/listlibsrc.output`; \ + (cd ../tape-src; make listlibsrc); \ + f="$$f "`cat ../tape-src/listlibsrc.output`; \ + echo $(LINT) $$f; \ + $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config \ + $(INCLUDES) $$f; \ + if [ $$? -ne 0 ]; then \ + exit 1; \ + fi; \ + done; \ + exit 0 +