1
# Makefile.am - use automake to generate Makefile.in
3
# Copyright (C) 2010, 2011 Arthur de Jong
5
# This library is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU Lesser General Public
7
# License as published by the Free Software Foundation; either
8
# version 2.1 of the License, or (at your option) any later version.
10
# This library is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
# Lesser General Public License for more details.
15
# You should have received a copy of the GNU Lesser General Public
16
# License along with this library; if not, write to the Free Software
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20
pynslcddir = $(datadir)/pynslcd
22
pynslcd_PYTHON = pynslcd.py cfg.py common.py tio.py mypidfile.py \
23
alias.py ether.py group.py host.py netgroup.py network.py \
24
pam.py passwd.py shadow.py
25
nodist_pynslcd_PYTHON = constants.py config.py
26
CLEANFILES = $(nodist_pynslcd_PYTHON)
28
all-local: $(nodist_pynslcd_PYTHON)
30
# clean up locally created compiled Python files
34
# create a symbolic link for the pynslcd daemon and fix permissions
36
chmod a+rx $(DESTDIR)$(pynslcddir)/pynslcd.py
37
$(MKDIR_P) $(DESTDIR)$(sbindir)
38
[ -L $(DESTDIR)$(sbindir)/pynslcd ] || $(LN_S) $(pynslcddir)/pynslcd.py $(DESTDIR)$(sbindir)/pynslcd
40
# generate constants module
41
constants.py: $(top_srcdir)/nslcd.h Makefile
42
( echo "# This file is automatically generated from nslcd.h." ; \
43
echo "# See that file for details." ; \
45
sed -n 's| */\*.*\*/ *||;s/^.define *\(NSLCD_[A-Z_]*\) */\1 = /p' \