X-Git-Url: https://git.gag.com/?p=debian%2Famanda;a=blobdiff_plain;f=recover-src%2FMakefile.am;h=2dfe457161560535b710dfed0b226f3b8fef33f2;hp=364f6dedbc6b784b8e52cab24657060f6fff4f35;hb=12179dea039515c06168c0037d048566a3f623de;hpb=94c03cae686e4196a345d72452fda2a5203768ce diff --git a/recover-src/Makefile.am b/recover-src/Makefile.am index 364f6de..2dfe457 100644 --- a/recover-src/Makefile.am +++ b/recover-src/Makefile.am @@ -2,8 +2,10 @@ INCLUDES = -I$(top_builddir)/common-src \ -I$(top_srcdir)/common-src \ - -I$(top_srcdir)/client-src \ - -I$(top_srcdir)/tape-src + -I$(top_srcdir)/client-src + +LINT=@AMLINT@ +LINTFLAGS=@AMLINTFLAGS@ LIB_EXTENSION = la @@ -22,22 +24,31 @@ endif LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \ @LEXLIB@ \ - ../client-src/libamclient.$(LIB_EXTENSION) -if WANT_SERVER -LDADD += ../tape-src/libamtape.$(LIB_EXTENSION) -endif -LDADD += ../common-src/libamanda.$(LIB_EXTENSION) \ + ../client-src/libamclient.$(LIB_EXTENSION) \ + ../common-src/libamanda.$(LIB_EXTENSION) \ $(READLINE_LIBS) -amrecover_SOURCES = amrecover.c \ +amrecover_CSRC = amrecover.c \ display_commands.c extract_list.c \ - help.c set_commands.c \ - uparse.y uscan.l + help.c set_commands.c + +amrecover_SOURCES = $(amrecover_CSRC) uparse.y uscan.l noinst_HEADERS = amrecover.h uparse.h AM_YFLAGS = -d +# so that uscan.c is never generated before uparse.h +# otherwise we might have makedepend problems +$(srcdir)/uscan.c: $(srcdir)/uparse.h + +uscan.$(OBJEXT): $(srcdir)/uscan.c + $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $< + +uparse.$(OBJEXT): $(srcdir)/uparse.c + $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $< + + install-exec-hook: @list="$(sbin_PROGRAMS)"; \ for p in $$list; do \ @@ -50,6 +61,17 @@ install-exec-hook: chmod o-rwx $$pa; \ done -# so that uscan.c is never generated before uparse.h -# otherwise we might have makedepend problems -uscan.c: uparse.h + +lint: + @f="$(amrecover_CSRC)"; \ + (cd ../common-src; make listlibsrc); \ + f="$$f "`cat ../common-src/listlibsrc.output`; \ + (cd ../server-src; make listlibsrc); \ + f="$$f "`cat ../server-src/listlibsrc.output`; \ + echo $(LINT) $$f; \ + $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I../config $(INCLUDES) $$f;\ + if [ $$? -ne 0 ]; then \ + exit 1; \ + fi; \ + exit 0 +