X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=changer-src%2FMakefile.am;h=2471aa25c22da162a6166d5cdeae53c5e353f191;hb=12179dea039515c06168c0037d048566a3f623de;hp=490e987702b095353e2e68486bcd1fc1f9c01fe1;hpb=94c03cae686e4196a345d72452fda2a5203768ce;p=debian%2Famanda diff --git a/changer-src/Makefile.am b/changer-src/Makefile.am index 490e987..2471aa2 100644 --- a/changer-src/Makefile.am +++ b/changer-src/Makefile.am @@ -5,6 +5,9 @@ INCLUDES = -I$(top_builddir)/common-src \ -I$(top_srcdir)/server-src \ -I$(top_srcdir)/tape-src +LINT=@AMLINT@ +LINTFLAGS=@AMLINTFLAGS@ + LIB_EXTENSION = la if WANT_CHIO_SCSI @@ -36,15 +39,18 @@ CLEANFILES = $(libexec_SCRIPTS) LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \ ../server-src/libamserver.$(LIB_EXTENSION) \ ../tape-src/libamtape.$(LIB_EXTENSION) \ - ../common-src/libamanda.$(LIB_EXTENSION) + ../common-src/libamanda.$(LIB_EXTENSION) \ + $(READLINE_LIBS) SUFFIXES = .pl .sh -chg_scsi_SOURCES = chg-scsi.c libscsi.h scsi-defs.h \ - scsi-aix.c scsi-changer-driver.c scsi-hpux_new.c scsi-irix.c \ - scsi-linux.c scsi-solaris.c scsi-bsd.c scsi-cam.c sense.c +chg_scsi_CSRC = chg-scsi.c scsi-aix.c scsi-changer-driver.c \ + scsi-hpux_new.c scsi-irix.c scsi-linux.c scsi-solaris.c \ + scsi-bsd.c scsi-cam.c sense.c +chg_scsi_SOURCES = libscsi.h scsi-defs.h $(chg_scsi_CSRC) -chg_scsi_chio_SOURCES = chg-scsi-chio.c scsi-hpux.c scsi-chio.c libscsi.h +chg_scsi_chio_CSRC = chg-scsi-chio.c scsi-hpux.c scsi-chio.c +chg_scsi_chio_SOURCES = libscsi.h $(chg_scsi_chio_CSRC) EXTRA_DIST = scsi-proto.c @@ -74,3 +80,21 @@ install-exec-hook: echo chgrp $(SETUID_GROUP) $$pa; \ chgrp $(SETUID_GROUP) $$pa; \ done + +lint: + @ for p in $(libexec_PROGRAMS) $(EXTRA_PROGRAMS); do \ + f="$$p.c $(libamandad_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../config \ + $(INCLUDES) $$f; \ + if [ $$? -ne 0 ]; then \ + exit 1; \ + fi; \ + done; \ + exit 0