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