Blame recover-src/Makefile.am

Packit 23ab03
# Makefile for Amanda file recovery programs.
Packit 23ab03
Packit 23ab03
include $(top_srcdir)/config/automake/vars.am
Packit 23ab03
include $(top_srcdir)/config/automake/installperms.am
Packit 23ab03
include $(top_srcdir)/config/automake/precompile.am
Packit 23ab03
Packit 23ab03
AM_CPPFLAGS =	-I$(top_builddir)/common-src \
Packit 23ab03
		-I$(top_srcdir)/common-src   \
Packit 23ab03
		-I$(top_srcdir)/client-src   \
Packit 23ab03
		-I$(top_srcdir)/amandad-src   \
Packit 23ab03
		-I$(top_srcdir)/gnulib
Packit 23ab03
Packit 23ab03
AM_CFLAGS = $(AMANDA_WARNING_CFLAGS) $(AMANDA_FILE_CFLAGS)
Packit 23ab03
AM_LDFLAGS = $(AMANDA_STATIC_LDFLAGS)
Packit 23ab03
Packit 23ab03
LINT=$(AMLINT)
Packit 23ab03
LINTFLAGS=$(AMLINTFLAGS)
Packit 23ab03
Packit 23ab03
sbin_PROGRAMS =		amrecover
Packit 23ab03
Packit 23ab03
###
Packit 23ab03
# Because libamanda includes routines (e.g. regex) provided by some system
Packit 23ab03
# libraries, and because of the way libtool sets up the command line, we
Packit 23ab03
# need to list libamanda twice here, first to override the system library
Packit 23ab03
# routines, and second to pick up any references in the other libraries.
Packit 23ab03
###
Packit 23ab03
Packit 23ab03
LDADD = ../common-src/libamanda.la \
Packit 23ab03
	@LEXLIB@ \
Packit 23ab03
	$(READLINE_LIBS) \
Packit 23ab03
	../client-src/libamclient.la \
Packit 23ab03
	../common-src/libamanda.la
Packit 23ab03
Packit 23ab03
amrecover_CSRC =	amrecover.c					\
Packit 23ab03
			display_commands.c		extract_list.c	\
Packit 23ab03
			help.c				set_commands.c
Packit 23ab03
Packit 23ab03
amrecover_SOURCES =	$(amrecover_CSRC)	uparse.y	uscan.l
Packit 23ab03
Packit 23ab03
noinst_HEADERS =	amrecover.h uparse.h
Packit 23ab03
Packit 23ab03
EXTRA_DIST += uscan.c
Packit 23ab03
Packit 23ab03
AM_YFLAGS =		-d
Packit 23ab03
Packit 23ab03
# so that uscan.c is never generated before uparse.h
Packit 23ab03
# otherwise we might have makedepend problems
Packit 23ab03
uscan.c: uparse.h
Packit 23ab03
Packit 23ab03
# these two commands are specially defined to omit $(AMANDA_WARNING_CFLAGS)
Packit 23ab03
# since we don't want warnings for generated code
Packit 23ab03
uscan.$(OBJEXT): uscan.c ../common-src/amanda.h uparse.h
Packit 23ab03
	$(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -c $<
Packit 23ab03
Packit 23ab03
uparse.$(OBJEXT): uparse.c ../common-src/amanda.h amrecover.h
Packit 23ab03
	$(CC) $(CFLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -c $<
Packit 23ab03
Packit 23ab03
lint:
Packit 23ab03
	@f="$(amrecover_CSRC)";							\
Packit 23ab03
	(cd ../common-src; make listlibsrc);					\
Packit 23ab03
	f="$$f "`cat ../common-src/listlibsrc.output`;				\
Packit 23ab03
	(cd ../server-src; make listlibsrc);					\
Packit 23ab03
	f="$$f "`cat ../server-src/listlibsrc.output`;				\
Packit 23ab03
	echo $(LINT) $$f;							\
Packit 23ab03
	$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(top_builddir)/config $(AM_CPPFLAGS) $$f;\
Packit 23ab03
	if [ $$? -ne 0 ]; then							\
Packit 23ab03
	    exit 1;								\
Packit 23ab03
	fi;									\
Packit 23ab03
        exit 0
Packit 23ab03