1#
2#  Copyright 2005  Red Hat, Inc.
3#
4#  Permission to use, copy, modify, distribute, and sell this software and its
5#  documentation for any purpose is hereby granted without fee, provided that
6#  the above copyright notice appear in all copies and that both that
7#  copyright notice and this permission notice appear in supporting
8#  documentation, and that the name of Red Hat not be used in
9#  advertising or publicity pertaining to distribution of the software without
10#  specific, written prior permission.  Red Hat makes no
11#  representations about the suitability of this software for any purpose.  It
12#  is provided "as is" without express or implied warranty.
13#
14#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20#  PERFORMANCE OF THIS SOFTWARE.
21
22SUBDIRS = app-defaults chooser config greeter include man xdm xdmshell
23
24ACLOCAL_AMFLAGS = -I m4
25
26# This ensures distcheck is performed in a location where user has write access
27DISTCHECK_CONFIGURE_FLAGS = \
28	--with-appdefaultdir=\$${datadir}/X11/app-defaults \
29	--with-systemdsystemunitdir=\$${libdir}/systemd/system
30
31if LINT
32ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
33		$(AM_CPPFLAGS) $(CPPFLAGS)
34
35lint:
36	$(LINT) $(ALL_LINT_FLAGS) $(xdm_CFLAGS) $(xdm_SOURCES) $(xdm_LIBS)
37	(cd xdm && $(MAKE) $(AM_MAKEFLAGS) lint)
38	(cd xdmshell && $(MAKE) $(AM_MAKEFLAGS) lint)
39	(cd greeter && $(MAKE) $(AM_MAKEFLAGS) lint)
40	(cd chooser && $(MAKE) $(AM_MAKEFLAGS) lint)
41endif LINT
42
43if HAVE_SYSTEMD
44systemdsystemunit_DATA = xdm.service
45
46xdm.service: xdm.service.in Makefile
47if USE_SYSTEMD_DAEMON
48	$(AM_V_GEN)$(SED) -e 's|BINDIR|$(bindir)|g' < ${srcdir}/xdm.service.in > $@
49else !USE_SYSTEMD_DAEMON
50	$(AM_V_GEN)$(SED) -e 's|BINDIR|$(bindir)|g' -e '/[Nn]otify/d' < ${srcdir}/xdm.service.in > $@
51endif !USE_SYSTEMD_DAEMON
52
53endif HAVE_SYSTEMD
54CLEANFILES = xdm.service
55EXTRA_DIST = xdm.service.in README.md
56
57MAINTAINERCLEANFILES = ChangeLog INSTALL
58
59.PHONY: ChangeLog INSTALL
60
61INSTALL:
62	$(INSTALL_CMD)
63
64ChangeLog:
65	$(CHANGELOG_CMD)
66
67dist-hook: ChangeLog INSTALL
68