X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=tape-src%2FMakefile.am;h=2bfce44903b866fd5bc830656d1ffb3b1aabb1d0;hb=refs%2Ftags%2Fupstream%2F2.5.1;hp=e2cfcf78f4daa89d66bb458ddb3135d19f7461ff;hpb=94c03cae686e4196a345d72452fda2a5203768ce;p=debian%2Famanda diff --git a/tape-src/Makefile.am b/tape-src/Makefile.am index e2cfcf7..2bfce44 100644 --- a/tape-src/Makefile.am +++ b/tape-src/Makefile.am @@ -3,6 +3,9 @@ INCLUDES = -I$(top_builddir)/common-src \ -I$(top_srcdir)/common-src +LINT=@AMLINT@ +LINTFLAGS=@AMLINTFLAGS@ + lib_LTLIBRARIES = libamtape.la LIB_EXTENSION = la @@ -77,3 +80,29 @@ amtapeio.test.c: $(srcdir)/tapeio.c tapetype: @echo "Use amtapetype instead" + +lint: + @ for p in $(sbin_PROGRAMS); do \ + if [ $$p = "amtapetype" ]; then \ + s="$(amtapetype_SOURCES)"; \ + else \ + s=$$p.c; \ + fi; \ + f="$$s $(libamandad_la_SOURCES)"; \ + f="$$f "`(cd ../common-src; make listlibsrc 2>&1 > /dev/null)`; \ + (cd ../common-src; make listlibsrc); \ + f="$$f "`cat ../common-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 $(libamtape_la_SOURCES); do \ + listlibsrcs="$$listlibsrcs `pwd`/$$p"; \ + done; \ + echo $$listlibsrcs > listlibsrc.output