]> git.gag.com Git - debian/amanda/blob - recover-src/Makefile.am
d5859b78fb5d59c377de3b001289790a7b1f63fd
[debian/amanda] / recover-src / Makefile.am
1 # Makefile for Amanda file recovery programs.
2
3 include $(top_srcdir)/config/automake/vars.am
4 include $(top_srcdir)/config/automake/installperms.am
5 include $(top_srcdir)/config/automake/precompile.am
6
7 INCLUDES =      -I$(top_builddir)/common-src \
8                 -I$(top_srcdir)/common-src   \
9                 -I$(top_srcdir)/client-src   \
10                 -I$(top_srcdir)/amandad-src   \
11                 -I$(top_srcdir)/gnulib
12
13 AM_CFLAGS = $(AMANDA_WARNING_CFLAGS)
14 AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
15
16 LINT=$(AMLINT)
17 LINTFLAGS=$(AMLINTFLAGS)
18
19 sbin_PROGRAMS =         amrecover
20
21 ###
22 # Because libamanda includes routines (e.g. regex) provided by some system
23 # libraries, and because of the way libtool sets up the command line, we
24 # need to list libamanda twice here, first to override the system library
25 # routines, and second to pick up any references in the other libraries.
26 ###
27
28 LDADD = ../common-src/libamanda.la \
29         @LEXLIB@ \
30         $(READLINE_LIBS) \
31         ../client-src/libamclient.la \
32         ../common-src/libamanda.la
33
34 amrecover_CSRC =        amrecover.c                                     \
35                         display_commands.c              extract_list.c  \
36                         help.c                          set_commands.c
37
38 amrecover_SOURCES =     $(amrecover_CSRC)       uparse.y        uscan.l
39
40 noinst_HEADERS =        amrecover.h uparse.h
41
42 AM_YFLAGS =             -d
43
44 # so that uscan.c is never generated before uparse.h
45 # otherwise we might have makedepend problems
46 uscan.c: uparse.h
47
48 # these two commands are specially defined to omit $(AMANDA_WARNING_CFLAGS)
49 # since we don't want warnings for generated code
50 uscan.$(OBJEXT): uscan.c ../common-src/amanda.h uparse.h
51         $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
52
53 uparse.$(OBJEXT): uparse.c ../common-src/amanda.h amrecover.h
54         $(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) -c $<
55
56 INSTALLPERMS_exec = \
57         dest=$(sbindir) chown=amanda chmod=0750 $(sbin_PROGRAMS)
58
59 lint:
60         @f="$(amrecover_CSRC)";                                                 \
61         (cd ../common-src; make listlibsrc);                                    \
62         f="$$f "`cat ../common-src/listlibsrc.output`;                          \
63         (cd ../server-src; make listlibsrc);                                    \
64         f="$$f "`cat ../server-src/listlibsrc.output`;                          \
65         echo $(LINT) $$f;                                                       \
66         $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(INCLUDES) $$f;\
67         if [ $$? -ne 0 ]; then                                                  \
68             exit 1;                                                             \
69         fi;                                                                     \
70         exit 0
71