Imported Upstream version 2.4.4p3
[debian/amanda] / changer-src / Makefile.am
1 # Makefile for Amanda tape changer programs.
2
3 INCLUDES =              -I$(top_srcdir)/common-src -I$(top_srcdir)/server-src -I$(top_srcdir)/tape-src
4
5 LIB_EXTENSION = la
6
7 if WANT_CHIO_SCSI
8 CHIO_SCSI = chg-scsi-chio
9 endif
10
11 if WANT_CHG_SCSI
12 CHG_SCSI = chg-scsi
13 endif
14
15 libexec_PROGRAMS =      $(CHG_SCSI)
16 EXTRA_PROGRAMS =        $(CHIO_SCSI)
17
18 libexec_SCRIPTS =       chg-manual      chg-multi       chg-mtx         \
19                         chg-rth         chg-chs         chg-chio        \
20                         chg-zd-mtx      chg-juke        chg-rait        \
21                         chg-null        chg-mcutil      chg-disk        \
22                         chg-iomega
23
24 ###
25 # Because libamanda includes routines (e.g. regex) provided by some system
26 # libraries, and because of the way libtool sets up the command line, we
27 # need to list libamanda twice here, first to override the system library
28 # routines, and second to pick up any references in the other libraries.
29 ###
30
31 LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
32         ../server-src/libamserver.$(LIB_EXTENSION) \
33         ../tape-src/libamtape.$(LIB_EXTENSION) \
34         ../common-src/libamanda.$(LIB_EXTENSION)
35
36 SUFFIXES =              .pl .sh
37
38 chg_scsi_SOURCES =      chg-scsi.c libscsi.h scsi-defs.h \
39         scsi-aix.c scsi-changer-driver.c scsi-hpux_new.c scsi-irix.c \
40         scsi-linux.c scsi-solaris.c scsi-bsd.c scsi-cam.c sense.c 
41
42 chg_scsi_chio_SOURCES = chg-scsi-chio.c scsi-hpux.c scsi-chio.c libscsi.h
43
44 EXTRA_DIST = scsi-proto.c
45
46 .pl:
47                         cat $< > $@
48                         chmod a+x $@
49                         -test -z "$(PERL)" || $(PERL) -c $@
50
51 .sh:
52                         cat $< > $@
53                         chmod a+x $@
54
55 install-exec-hook:
56         @list="$(sbin_PROGRAMS) $(sbin_SCRIPTS)"; \
57         for p in $$list; do \
58                 pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
59                 echo chown $(BINARY_OWNER) $$pa; \
60                 chown $(BINARY_OWNER) $$pa; \
61                 echo chgrp $(SETUID_GROUP) $$pa; \
62                 chgrp $(SETUID_GROUP) $$pa; \
63         done
64         @list="$(libexec_PROGRAMS) $(libexec_SCRIPTS)"; \
65         for p in $$list; do \
66                 pa=$(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \
67                 echo chown $(BINARY_OWNER) $$pa; \
68                 chown $(BINARY_OWNER) $$pa; \
69                 echo chgrp $(SETUID_GROUP) $$pa; \
70                 chgrp $(SETUID_GROUP) $$pa; \
71         done