Imported Debian patch 2.5.0-1
[debian/amanda] / recover-src / Makefile.am
1 # Makefile for Amanda file recovery programs.
2
3 INCLUDES =      -I$(top_builddir)/common-src \
4                 -I$(top_srcdir)/common-src   \
5                 -I$(top_srcdir)/client-src   \
6                 -I$(top_srcdir)/tape-src
7
8 LIB_EXTENSION = la
9
10 sbin_PROGRAMS =         amrecover
11
12 if WANT_RUNTIME_PSEUDO_RELOC
13 AM_LDFLAGS = -Wl,-enable-runtime-pseudo-reloc
14 endif
15
16 ###
17 # Because libamanda includes routines (e.g. regex) provided by some system
18 # libraries, and because of the way libtool sets up the command line, we
19 # need to list libamanda twice here, first to override the system library
20 # routines, and second to pick up any references in the other libraries.
21 ###
22
23 LDADD = ../common-src/libamanda.$(LIB_EXTENSION) \
24         @LEXLIB@ \
25         ../client-src/libamclient.$(LIB_EXTENSION)
26 if WANT_SERVER
27 LDADD += ../tape-src/libamtape.$(LIB_EXTENSION)
28 endif
29 LDADD += ../common-src/libamanda.$(LIB_EXTENSION) \
30         $(READLINE_LIBS)
31
32 amrecover_SOURCES =     amrecover.c                                     \
33                         display_commands.c              extract_list.c  \
34                         help.c                          set_commands.c  \
35                         uparse.y                        uscan.l
36
37 noinst_HEADERS =        amrecover.h uparse.h
38
39 AM_YFLAGS =             -d
40
41 install-exec-hook:
42         @list="$(sbin_PROGRAMS)"; \
43         for p in $$list; do \
44                 pa=$(DESTDIR)$(sbindir)/`echo $$p|sed '$(transform)'`; \
45                 echo chown $(BINARY_OWNER) $$pa; \
46                 chown $(BINARY_OWNER) $$pa; \
47                 echo chgrp $(SETUID_GROUP) $$pa; \
48                 chgrp $(SETUID_GROUP) $$pa; \
49                 echo chmod o-rwx $$pa; \
50                 chmod o-rwx $$pa; \
51         done
52
53 # so that uscan.c is never generated before uparse.h
54 # otherwise we might have makedepend problems
55 uscan.c: uparse.h