1## Process this file with automake to produce Makefile.in
2AUTOMAKE_OPTIONS = 1.10 foreign
3
4include $(top_srcdir)/config/automake/vars.am
5include $(top_srcdir)/config/automake/installperms.am
6
7ACLOCAL_AMFLAGS = --force -I config -I . -I config/gettext-macros -I config/gnulib -I config/amanda -I config/macro-archive -I /usr/share/aclocal
8
9if WANT_CLIENT
10CLIENT_SUBDIRS = client-src application-src
11endif
12if WANT_SERVER
13SERVER_SUBDIRS = device-src server-src changer-src
14endif
15if WANT_RECOVER
16RECOVER_SUBDIRS = recover-src oldrecover-src
17endif
18if WANT_AMPLOT
19PLOT_SUBDIRS = amplot
20endif
21if WANT_NDMP
22NDMP_SUBDIRS = ndmp-src
23endif
24# order is significant, don't change it arbitrarily
25SUBDIRS = . \
26	gnulib \
27	config \
28	common-src \
29	amar-src \
30	amandad-src \
31	xfer-src \
32	$(NDMP_SUBDIRS) \
33	$(TAPE_SUBDIRS) \
34	$(CLIENT_SUBDIRS) \
35	$(SERVER_SUBDIRS) \
36	$(RESTORE_SUBDIRS) \
37	$(RECOVER_SUBDIRS) \
38	$(PLOT_SUBDIRS) \
39	perl \
40	po \
41	man \
42	example \
43	packaging \
44	installcheck
45
46pkgdata_DATA = \
47	ReleaseNotes	\
48	COPYRIGHT	\
49	NEWS		\
50	ChangeLog
51
52EXTRA_DIST += $(SNAPSHOT_STAMP) \
53	$(pkgdata_DATA)			\
54        autogen 			\
55	contrib/README			\
56	contrib/dbbackup.README		\
57	contrib/dbbackup.ksh		\
58	contrib/dbbackup.sql		\
59	contrib/dbbackup.tcl		\
60	contrib/mkamandisk		\
61	contrib/set_prod_link.pl	\
62	contrib/gsc/README		\
63	contrib/gsc/cfggsc.c		\
64	contrib/gsc/defgsc.c		\
65	contrib/gsc/gsc.add		\
66	contrib/gsc/gscdd.c		\
67	contrib/gsc/gscdds.h		\
68	contrib/gsc/makefile		\
69	contrib/gsc/tstinq.c		\
70	contrib/gsc/ucfggsc.c		\
71	patches/regex-3.6alpha.patch	\
72	patches/samba-largefs.patch	\
73	patches/tar-1.12.patch		\
74	UPGRADING			\
75	DEVELOPING			\
76	VERSION				\
77	FULL_VERSION
78
79FULL_VERSION: VERSION
80	$(srcdir)/config/set_full_version $(top_srcdir)
81
82config.status: FULL_VERSION
83
84libtool: $(LIBTOOL_DEPS)
85	$(SHELL) ./config.status --recheck
86
87# empty out the installperms manifest file when we start
88install-exec-local: installperms-init
89install-data-local: installperms-init
90
91## This is only meaningful for snapshots, but it won't hurt releases.
92CONFIG_STATUS = config.status
93$(CONFIG_STATUS): $(SNAPSHOT_STAMP)
94SNAPSHOT:
95	: SNAPSHOT file was removed, will reconfigure...
96
97lint:
98	(cd amandad-src; make lint)
99	(cd changer-src; make lint)
100	(cd client-src; make lint)
101	(cd common-src; make lint)
102	(cd oldrecover-src; make lint)
103	(cd recover-src; make lint)
104	(cd server-src; make lint)
105	(cd xfer-src; make lint)
106
107## Do not release the *.test.c sources.  They get built on the fly and
108## would contain a path from the distribution machine, which will just
109## confuse the target user.
110
111dist-hook:
112	find $(distdir)/. -name '*.test.c' -exec rm {} \;
113
114# ensure that configure gets the right arguments for distcheck; this keeps the
115# user/group through to the distcheck, rather than defaulting back to 'amanda'.
116DISTCHECK_CONFIGURE_FLAGS = --with-user=$(CLIENT_LOGIN) --with-group=$(SETUID_GROUP) --with-owner=$(BINARY_OWNER) --disable-installperms --without-amperldir --without-force-uid --with-tmpdir=$(AMANDA_TMPDIR) SINGLE_USERID=yes CLOBBER_MY_CONFIG=OK
117